about summary refs log tree commit diff stats
path: root/miasm/arch
diff options
context:
space:
mode:
Diffstat (limited to 'miasm/arch')
-rw-r--r--miasm/arch/aarch64/arch.py2
-rw-r--r--miasm/arch/arm/arch.py8
2 files changed, 6 insertions, 4 deletions
diff --git a/miasm/arch/aarch64/arch.py b/miasm/arch/aarch64/arch.py
index 050aa638..f05a0a15 100644
--- a/miasm/arch/aarch64/arch.py
+++ b/miasm/arch/aarch64/arch.py
@@ -420,7 +420,7 @@ class instruction_aarch64(instruction):
             else:
                 return "[%s]" % color_expr_html(expr.args[0], loc_db)
         elif isinstance(expr, m2_expr.ExprOp) and expr.op == 'segm':
-            arg = color_expr_html(expr.args[1], loc_db)
+            arg = expr.args[1]
             if isinstance(arg, m2_expr.ExprId):
                 arg = str(arg)
             elif arg.op == 'LSL' and int(arg.args[1]) == 0:
diff --git a/miasm/arch/arm/arch.py b/miasm/arch/arm/arch.py
index affa9866..7b07387c 100644
--- a/miasm/arch/arm/arch.py
+++ b/miasm/arch/arm/arch.py
@@ -481,7 +481,7 @@ class instruction_arm(instruction):
         else:
             r, s = expr.args[0].args
         if isinstance(s, ExprOp) and s.op in expr2shift_dct:
-            s = ' '.join(
+            s_html = ' '.join(
                 str(x)
                 for x in (
                         color_expr_html(s.args[0], loc_db),
@@ -489,14 +489,16 @@ class instruction_arm(instruction):
                         color_expr_html(s.args[1], loc_db)
                 )
             )
+        else:
+            s_html = color_expr_html(s, loc_db)
 
         if isinstance(expr, ExprOp) and expr.op == 'postinc':
             o = '[%s]' % color_expr_html(r, loc_db)
             if s and not (isinstance(s, ExprInt) and int(s) == 0):
-                o += ', %s' % color_expr_html(s, loc_db)
+                o += ', %s' % s_html
         else:
             if s and not (isinstance(s, ExprInt) and int(s) == 0):
-                o = '[%s, %s]' % (color_expr_html(r, loc_db), color_expr_html(s, loc_db))
+                o = '[%s, %s]' % (color_expr_html(r, loc_db), s_html)
             else:
                 o = '[%s]' % color_expr_html(r, loc_db)