summaryrefslogtreecommitdiff
path: root/plugins/arm/v7/opdefs/cb_A8829.d
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/arm/v7/opdefs/cb_A8829.d')
-rw-r--r--plugins/arm/v7/opdefs/cb_A8829.d47
1 files changed, 37 insertions, 10 deletions
diff --git a/plugins/arm/v7/opdefs/cb_A8829.d b/plugins/arm/v7/opdefs/cb_A8829.d
index 134e0f4..3ac923a 100644
--- a/plugins/arm/v7/opdefs/cb_A8829.d
+++ b/plugins/arm/v7/opdefs/cb_A8829.d
@@ -2,7 +2,7 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
* ##FILE## - traduction d'instructions ARMv7
*
- * Copyright (C) 2015 Cyrille Bagard
+ * Copyright (C) 2017 Cyrille Bagard
*
* This file is part of Chrysalide.
*
@@ -23,26 +23,53 @@
@title CBNZ, CBZ
-@desc Compare and Branch on Nonzero and Compare and Branch on Zero compare the value in a register with zero, and conditionally branch forward a constant value. They do not affect the condition flags.
+@id 28
+
+@desc {
+
+ Compare and Branch on Nonzero and Compare and Branch on Zero compare the value in a register with zero, and conditionally branch forward a constant value. They do not affect the condition flags.
+
+}
@encoding (t1) {
@half 1 0 1 1 op(1) 0 i(1) 1 imm5(5) Rn(3)
- @syntax <reg_N> <imm32>
+ @syntax {
+
+ @assert {
+
+ op == 0
+
+ }
+
+ @conv {
- @conv {
+ reg_N = Register(Rn)
+ imm32 = ZeroExtend(i:imm5:'0', 32)
- reg_N = Register(Rn)
- imm32 = ZeroExtend(i:imm5:'0', 32)
- nonzero = (op == '1')
+ }
+
+ @asm cbz reg_N imm32
}
- @rules {
+ @syntax {
+
+ @assert {
+
+ op == 1
+
+ }
+
+ @conv {
+
+ reg_N = Register(Rn)
+ imm32 = ZeroExtend(i:imm5:'0', 32)
+
+ }
- if (nonzero); chk_call ExtendKeyword("n")
- chk_call ExtendKeyword("z")
+ @asm cbnz reg_N imm32
}