about summary refs log tree commit diff stats
path: root/miasm2/arch/aarch64/sem.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--miasm2/arch/aarch64/sem.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/miasm2/arch/aarch64/sem.py b/miasm2/arch/aarch64/sem.py
index e4702a4f..7052f423 100644
--- a/miasm2/arch/aarch64/sem.py
+++ b/miasm2/arch/aarch64/sem.py
@@ -622,6 +622,25 @@ def ldrsh(ir, instr, arg1, arg2):
 def ldrsw(ir, instr, arg1, arg2):
     return ldrs_size(ir, instr, arg1, arg2, 32)
 
+def ldaxrb(ir, instr, arg1, arg2):
+    # TODO XXX no memory lock implemented
+    assert arg2.is_op('preinc')
+    assert len(arg2.args) == 1
+    ptr = arg2.args[0]
+    e = []
+    e.append(ExprAssign(arg1, ExprMem(ptr, 8).zeroExtend(arg1.size)))
+    return e, []
+
+
+def stlxrb(ir, instr, arg1, arg2, arg3):
+    assert arg3.is_op('preinc')
+    assert len(arg3.args) == 1
+    ptr = arg3.args[0]
+    e = []
+    e.append(ExprAssign(ExprMem(ptr, 8), arg2[:8]))
+    # TODO XXX here, force update success
+    e.append(ExprAssign(arg1, ExprInt(0, arg1.size)))
+    return e, []
 
 
 def l_str(ir, instr, arg1, arg2):
@@ -1319,6 +1338,9 @@ mnemo_func.update({
     'ldrsh': ldrsh,
     'ldrsw': ldrsw,
 
+    'ldaxrb': ldaxrb,
+    'stlxrb': stlxrb,
+
     'str': l_str,
     'strb': strb,
     'strh': strh,