summaryrefslogtreecommitdiff
path: root/src/arch/arm/v7/opdefs/cmp_A8837.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/v7/opdefs/cmp_A8837.d')
-rw-r--r--src/arch/arm/v7/opdefs/cmp_A8837.d56
1 files changed, 29 insertions, 27 deletions
diff --git a/src/arch/arm/v7/opdefs/cmp_A8837.d b/src/arch/arm/v7/opdefs/cmp_A8837.d
index bcfe5d2..76b7a76 100644
--- a/src/arch/arm/v7/opdefs/cmp_A8837.d
+++ b/src/arch/arm/v7/opdefs/cmp_A8837.d
@@ -2,7 +2,7 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
* ##FILE## - traduction d'instructions ARMv7
*
- * Copyright (C) 2014 Cyrille Bagard
+ * Copyright (C) 2015 Cyrille Bagard
*
* This file is part of Chrysalide.
*
@@ -23,54 +23,56 @@
@title CMP (immediate)
-@encoding(t1) {
+@desc Compare (immediate) subtracts an immediate value from a register value. It updates the condition flags based on the result, and discards the result.
- @half 0 0 1 0 1 Rn(3) imm8(8)
+@encoding (t1) {
- @syntax <Rn> <const>
+ @half 0 0 1 0 1 Rn(3) imm8(8)
- @conv {
+ @syntax <reg_N> <imm32>
- Rn = Register(Rn)
- const = ZeroExtend(imm8, 8, 32)
+ @conv {
- }
+ reg_N = Register(Rn)
+ imm32 = ZeroExtend(imm8, 32)
+
+ }
}
-@encoding(T2) {
+@encoding (T2) {
- @word 1 1 1 1 0 i(1) 0 1 1 0 1 1 Rn(4) 0 imm3(3) 1 1 1 1 imm8(8)
+ @word 1 1 1 1 0 i(1) 0 1 1 0 1 1 Rn(4) 0 imm3(3) 1 1 1 1 imm8(8)
- @syntax <Rn> <const>
+ @syntax ".W" <reg_N> <imm32>
- @conv {
+ @conv {
- Rn = Register(Rn)
- const = ThumbExpandImm(i:imm3:imm8)
+ reg_N = Register(Rn)
+ imm32 = ThumbExpandImm(i:imm3:imm8)
- }
+ }
- @rules {
+}
- if (Rn == '1111') ; unpredictable
+@encoding (A1) {
- }
+ @word cond(4) 0 0 1 1 0 1 0 1 Rn(4) 0 0 0 0 imm12(12)
-}
+ @syntax <reg_N> <imm32>
-@encoding(A1) {
+ @conv {
- @word cond(4) 0 0 1 1 0 1 0 1 Rn(4) 0 0 0 0 imm12(12)
+ reg_N = Register(Rn)
+ imm32 = ARMExpandImm(imm12)
- @syntax {c} <Rn> <const>
+ }
- @conv {
+ @rules {
- c = Condition(cond)
- Rn = Register(Rn)
- const = ARMExpandImm(imm12)
+ chk_call StoreCondition(cond)
- }
+ }
}
+