about summary refs log tree commit diff stats
path: root/miasm2/arch/arm/sem.py
diff options
context:
space:
mode:
authorserpilliere <fabrice.desclaux@cea.fr>2015-02-21 21:09:57 +0100
committerserpilliere <fabrice.desclaux@cea.fr>2015-02-22 01:48:27 +0100
commit287109263e24e924e7ec551b1443d53e7d60da87 (patch)
treef42c490bf51de9733de0290aa92a51a534269067 /miasm2/arch/arm/sem.py
parentdd2da246f676ff827201c9eee3ae698081875bf7 (diff)
downloadmiasm-287109263e24e924e7ec551b1443d53e7d60da87.tar.gz
miasm-287109263e24e924e7ec551b1443d53e7d60da87.zip
Arch: remove code which uses expression modifications
Diffstat (limited to 'miasm2/arch/arm/sem.py')
-rw-r--r--miasm2/arch/arm/sem.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/miasm2/arch/arm/sem.py b/miasm2/arch/arm/sem.py
index 06f6bddf..2261fb3f 100644
--- a/miasm2/arch/arm/sem.py
+++ b/miasm2/arch/arm/sem.py
@@ -1191,10 +1191,11 @@ class ir_arml(ir):
             if args[-1].op == 'rrx':
                 args[-1] = ExprCompose(
                     [(args[-1].args[0][1:], 0, 31), (cf, 31, 32)])
-            elif (args[-1].op in ['<<', '>>', '<<a', 'a>>', '<<<', '>>>'] and
-                  isinstance(args[-1].args[-1], ExprId)):
-                args[-1].args = args[-1].args[:-1] + (
-                    args[-1].args[-1][:8].zeroExtend(32),)
+            elif args[-1].op in ['<<', '>>', '<<a', 'a>>', '<<<', '>>>']:
+                if isinstance(args[-1].args[-1], ExprId):
+                    args[-1] = ExprOp(args[-1].op,
+                                      args[-1].args[0],
+                                      args[-1].args[-1][:8].zeroExtend(32))
         instr_ir, extra_ir = get_mnemo_expr(self, instr, *args)
         # if self.name.startswith('B'):
         #    return instr_ir, extra_ir