about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2018-07-18 19:04:37 +0200
committerGitHub <noreply@github.com>2018-07-18 19:04:37 +0200
commit300b8e412a615fcc7f125126fab25aae5889af1c (patch)
tree157b224791106de8c3b9c5227945a26603efde94
parent63edfb9952969263f284b236678fbf93f81e6ac0 (diff)
parent741a777ef226461f63fa40cb06e8b3406110393f (diff)
downloadmiasm-300b8e412a615fcc7f125126fab25aae5889af1c.tar.gz
miasm-300b8e412a615fcc7f125126fab25aae5889af1c.zip
Merge pull request #807 from serpilliere/fix_aarch64_sem
Aarch64: fix remaining ExprLoc
-rw-r--r--miasm2/arch/aarch64/sem.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/miasm2/arch/aarch64/sem.py b/miasm2/arch/aarch64/sem.py
index a17c0f14..646065f4 100644
--- a/miasm2/arch/aarch64/sem.py
+++ b/miasm2/arch/aarch64/sem.py
@@ -637,8 +637,10 @@ def cbnz(arg1, arg2):
 @sbuild.parse
 def tbz(arg1, arg2, arg3):
     bitmask = m2_expr.ExprInt(1, arg1.size) << arg2
-    dst = m2_expr.ExprId(
-        ir.get_next_loc_key(instr), 64) if arg1 & bitmask else arg3
+    dst = m2_expr.ExprLoc(
+        ir.get_next_loc_key(instr),
+        64
+    ) if arg1 & bitmask else arg3
     PC = dst
     ir.IRDst = dst
 
@@ -646,8 +648,10 @@ def tbz(arg1, arg2, arg3):
 @sbuild.parse
 def tbnz(arg1, arg2, arg3):
     bitmask = m2_expr.ExprInt(1, arg1.size) << arg2
-    dst = arg3 if arg1 & bitmask else m2_expr.ExprId(
-        ir.get_next_loc_key(instr), 64)
+    dst = arg3 if arg1 & bitmask else m2_expr.ExprLoc(
+        ir.get_next_loc_key(instr),
+        64
+    )
     PC = dst
     ir.IRDst = dst