summaryrefslogtreecommitdiff
path: root/plugins/arm/v7/opdefs/eor_A8848.d
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/arm/v7/opdefs/eor_A8848.d')
-rw-r--r--plugins/arm/v7/opdefs/eor_A8848.d69
1 files changed, 57 insertions, 12 deletions
diff --git a/plugins/arm/v7/opdefs/eor_A8848.d b/plugins/arm/v7/opdefs/eor_A8848.d
index f38fa74..1248e43 100644
--- a/plugins/arm/v7/opdefs/eor_A8848.d
+++ b/plugins/arm/v7/opdefs/eor_A8848.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,28 +23,73 @@
@title EOR (register-shifted register)
-@desc Bitwise Exclusive OR (register-shifted register) performs a bitwise Exclusive OR of a register value and a register-shifted register value. It writes the result to the destination register, and can optionally update the condition flags based on the result.
+@id 47
+
+@desc {
+
+ Bitwise Exclusive OR (register-shifted register) performs a bitwise Exclusive OR of a register value and a register-shifted register value. It writes the result to the destination register, and can optionally update the condition flags based on the result.
+
+}
@encoding (A1) {
@word cond(4) 0 0 0 0 0 0 1 S(1) Rn(4) Rd(4) Rs(4) 0 type(2) 1 Rm(4)
- @syntax <reg_D> <reg_N> <reg_M> <reg_shift>
+ @syntax {
+
+ @assert {
+
+ S == 0
+
+ }
+
+ @conv {
+
+ reg_D = Register(Rd)
+ reg_N = Register(Rn)
+ reg_M = Register(Rm)
+ shift_t = UInt(type)
+ reg_S = Register(Rs)
+ shift = BuildRegShift(shift_t, reg_S)
+
+ }
+
+ @asm eor ?reg_D reg_N reg_M shift
- @conv {
+ @rules {
- reg_shift = RegisterShift(type, Rs)
- reg_D = Register(Rd)
- reg_N = Register(Rn)
- reg_M = Register(Rm)
- setflags = (S == '1')
+ check g_arm_instruction_set_cond(cond)
+
+ }
}
- @rules {
+ @syntax {
+
+ @assert {
+
+ S == 1
+
+ }
+
+ @conv {
+
+ reg_D = Register(Rd)
+ reg_N = Register(Rn)
+ reg_M = Register(Rm)
+ shift_t = UInt(type)
+ reg_S = Register(Rs)
+ shift = BuildRegShift(shift_t, reg_S)
+
+ }
+
+ @asm eors ?reg_D reg_N reg_M shift
+
+ @rules {
+
+ check g_arm_instruction_set_cond(cond)
- if (setflags); chk_call ExtendKeyword("s")
- chk_call StoreCondition(cond)
+ }
}