Skip to content
Merged
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions slothy/targets/aarch64/aarch64_neon.py
Original file line number Diff line number Diff line change
Expand Up @@ -2005,6 +2005,24 @@ def write(self):
return super().write()


class x_ldr_regidx(Ldr_X):
pattern = "ldr <Xa>, [<Xb>, <Xc>]"
inputs = ["Xb", "Xc"]
outputs = ["Xa"]

@classmethod
def make(cls, src):
obj = AArch64Instruction.build(cls, src)
obj.increment = None
obj.pre_index = None
obj.addr = obj.args_in[0]
return obj

def write(self):
assert self.pre_index is None
return super().write()


class x_ldr_with_postinc(Ldr_X):
pattern = "ldr <Xa>, [<Xc>], <imm>"
in_outs = ["Xc"]
Expand Down
1 change: 1 addition & 0 deletions tests/naive/aarch64/instructions.s
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ cmge v4.8h, v30.8h, v16.8h
cmhi v4.8h, v30.8h, v16.8h
mov x12, #0
ldr q24, [x3, x12, lsl #4]
ldr x6, [x3, x12]
clz v0.16b, v0.16b
cnt v0.16b, v0.16b
tbl v16.16b, {v16.16b}, v24.16b
Expand Down