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 access types for some AArch64 aliased instructions #1911

Closed
FinnWilkinson opened this issue Aug 11, 2022 · 2 comments
Closed

Incorrect access types for some AArch64 aliased instructions #1911

FinnWilkinson opened this issue Aug 11, 2022 · 2 comments

Comments

@FinnWilkinson
Copy link
Contributor

PR #1655 provided a fix for some alias instructions where the incorrect access type was being fetched due to a change in the number of operands.
For example, cmp x0, x1 is an alias of subs xzr, x0, x1, and the access rights for cmp are WRITE, READ respectively, when they should be READ, READ.

The fix from #1655 changes the printOperand function to use OpNum instead of MI->ac_idx to retrieve the access type from the map; which works for the case above, but for other instructions it retrieves the incorrect types.
For example, ldrsw x2, [x0], #4 should have access types x2=WRITE, [x0]=READ | WRITE, however with the change from #1655 the access types are x2=READ | WRITE, [x0]=READ | WRITE.

PR #1907 reverts the change made from #1655, as another solution will need implementing to ensure the access types are correct for all instructions, including aliases

FinnWilkinson added a commit to FinnWilkinson/capstone that referenced this issue Sep 30, 2022
Issue 1653 test commented out as the change made for this issue was reverted due to it being incomplete for all instructions. New issue capstone-engine#1911 has been opened to document that the original issue needs re-addressing.
@FinnWilkinson
Copy link
Contributor Author

FinnWilkinson commented Nov 23, 2023

@Rot127 With the merge of AArch64 auto-sync, can this issue be considered complete and thus closed? (As mentioned in some of the comments in #2055)

@Rot127
Copy link
Collaborator

Rot127 commented Nov 23, 2023

Yes, especially since we track the rest of incorrect access types of SME in #2196. You have to close it though. I am not a maintainer.

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