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

Incorrect detailed disassembly of AArch64 ldr and ldapr instructions #1839

Closed
stevielavern opened this issue Feb 22, 2022 · 2 comments
Closed

Comments

@stevielavern
Copy link
Contributor

There are a few bugs in the detailed disassembly of AArch64 load instructions:

  1. ldr* instructions report operand 1 with type WRITE instead of READ:
$ cstool -d arm64 '41 00 40 F9'
 0  41 00 40 f9  ldr	x1, [x2]
	ID: 393 (ldr)
	op_count: 2
		operands[0].type: REG = x1
		operands[0].access: WRITE
		operands[1].type: MEM
			operands[1].mem.base: REG = x2
		operands[1].access: WRITE.          <---- should be READ
	Registers read: x2
	Registers modified: x1
  1. ldapr instructions lack access information both on registers and operands:
$ cstool -d arm64 '88 c2 bf f8'
 0  88 c2 bf f8  ldapr	x8, [x20]
	ID: 329 (ldapr)
	op_count: 2
		operands[0].type: REG = x8
		operands[1].type: MEM
			operands[1].mem.base: REG = x20
	Registers read: x20
stevielavern added a commit to stevielavern/capstone that referenced this issue Feb 22, 2022
stevielavern added a commit to stevielavern/capstone that referenced this issue Feb 22, 2022
@stevielavern
Copy link
Contributor Author

The PR includes a unit test for both bugs, but it only fixes the 2nd one because I don't yet know how to fix the 1st one (ldr). Any help is appreciated.

@kabeor
Copy link
Member

kabeor commented Feb 28, 2022

1st fixed in #1845

@kabeor kabeor closed this as completed Feb 28, 2022
kabeor added a commit that referenced this issue Feb 28, 2022
Fix AArch64 ldapr detailed information #1839
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

2 participants