about summary refs log tree commit diff stats
path: root/miasm2/arch/arm/sem.py
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2015-10-07 18:26:36 +0200
committerCamille Mougey <commial@gmail.com>2015-10-07 18:26:36 +0200
commitcbb7a7bb62734b9a5ca2d2a126b060c8c7b72588 (patch)
treeae629a947d20bd469911906f27babe936ad53ca1 /miasm2/arch/arm/sem.py
parenteb3cdbbd84e9c616b03408e5ec80cc4edb2ad41f (diff)
parent97bf3087b71b5bfbeb6bf17a6ce7d4addb59ee39 (diff)
downloadmiasm-cbb7a7bb62734b9a5ca2d2a126b060c8c7b72588.tar.gz
miasm-cbb7a7bb62734b9a5ca2d2a126b060c8c7b72588.zip
Merge pull request #224 from serpilliere/arm_rev
Arch/arm: add rev mnemonic;
Diffstat (limited to 'miasm2/arch/arm/sem.py')
-rw-r--r--miasm2/arch/arm/sem.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/miasm2/arch/arm/sem.py b/miasm2/arch/arm/sem.py
index bbab8d59..678f10a8 100644
--- a/miasm2/arch/arm/sem.py
+++ b/miasm2/arch/arm/sem.py
@@ -924,6 +924,15 @@ def bfc(ir, instr, a, b, c):
         e.append(ExprAff(ir.IRDst, r))
     return e
 
+def rev(ir, instr, a, b):
+    e = []
+    c = ExprCompose([(b[:8],      24, 32),
+                     (b[8:16],    16, 24),
+                     (b[16:24],   8, 16),
+                     (b[24:32],   0, 8)])
+    e.append(ExprAff(a, c))
+    return e
+
 
 
 COND_EQ = 0
@@ -1067,6 +1076,7 @@ mnemo_condm0 = {'add': add,
                 'sxth': sxth,
                 'ubfx': ubfx,
                 'bfc': bfc,
+                'rev': rev,
                 }
 
 mnemo_condm1 = {'adds': add,