about summary refs log tree commit diff stats
path: root/miasm2/arch/arm/sem.py
diff options
context:
space:
mode:
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