about summary refs log tree commit diff stats
path: root/miasm/arch/arm/arch.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2021-12-06 22:53:58 +0100
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2021-12-06 22:53:58 +0100
commit990df9a9fcb5ae6f1142f49865404e42ec01439c (patch)
tree3d1f3c95500b7d17a8389a5075aa2ca9d414d6fa /miasm/arch/arm/arch.py
parent0cd2cad02dd1b300d61bdc985b09de65f92261b4 (diff)
downloadfocaccia-miasm-990df9a9fcb5ae6f1142f49865404e42ec01439c.tar.gz
focaccia-miasm-990df9a9fcb5ae6f1142f49865404e42ec01439c.zip
Fix html; Add reg test
Diffstat (limited to 'miasm/arch/arm/arch.py')
-rw-r--r--miasm/arch/arm/arch.py8
1 files changed, 5 insertions, 3 deletions
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)