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

Wrong assembly generated for: "add x0, x0, 1, lsl #12" (ARM64) #18619

Closed
ValdikSS opened this issue Apr 23, 2021 · 1 comment
Closed

Wrong assembly generated for: "add x0, x0, 1, lsl #12" (ARM64) #18619

ValdikSS opened this issue Apr 23, 2021 · 1 comment
Assignees
Milestone

Comments

@ValdikSS
Copy link

Description

rasm2 ARM64 ADD command seems to ignore LSL #XX and generates opcode without it.

Generated opcode with keystone:

$ kstool arm64 'add x0, x0, 1, lsl #12'
add x0, x0, 1, lsl #12 = [ 00 04 40 91 ]

Generated opcode with rasm2 commit 9a14c29:

$ rasm2 -a arm -b 64 'add x0, x0, 1, lsl #12'
00040091

$ rasm2 -a arm -b 64 'add x0, x0, 1'
00040091

The issue seems to be similar to #16969

@trufae trufae added this to the 5.3.0 milestone Apr 25, 2021
@trufae
Copy link
Collaborator

trufae commented Apr 25, 2021

Should be easy to fix, tagging for 5.3 if anyone is in the mood to tweak the r2 assembler to handle it properly go for it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants