Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ldaxr #1504

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions miasm/arch/aarch64/sem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,15 @@ def ldrsh(ir, instr, arg1, arg2):
def ldrsw(ir, instr, arg1, arg2):
return ldrs_size(ir, instr, arg1, arg2, 32)

def ldaxr(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, arg1.size).zeroExtend(arg1.size)))
return e, []

def ldaxrb(ir, instr, arg1, arg2):
# TODO XXX no memory lock implemented
assert arg2.is_op('preinc')
Expand Down Expand Up @@ -2212,6 +2221,7 @@ def smull(arg1, arg2, arg3):
'ldar': ldr, # TODO memory barrier
'ldarb': ldrb,

'ldaxr': ldaxr,
'ldaxrb': ldaxrb,
'stlxrb': stlxrb,

Expand Down