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

Improve lifting of some ARMv8 vector instructions like movi #5664

Open
fuzyll opened this issue Jun 25, 2024 · 0 comments
Open

Improve lifting of some ARMv8 vector instructions like movi #5664

fuzyll opened this issue Jun 25, 2024 · 0 comments
Assignees
Labels
Arch: ARM64 Issues with the AArch64 architecture plugin Component: Architecture Issue needs changes to an architecture plugin Effort: Medium Issue should take < 1 month Impact: Medium Issue is impactful with a bad, or no, workaround Type: Enhancement Issue is a small enhancement to existing functionality

Comments

@fuzyll
Copy link
Contributor

fuzyll commented Jun 25, 2024

What is the feature you'd like to have?
Some ARMv8 instructions, like the vector version of movi, are lifted in a way that causes a large amount of HLIL to be generated instead of a memset() or a single assignment like v0 = 0xaaaaaaaaaaaaaaaaaa.

Is your feature request related to a problem?
Any time you have an instruction like movi v0.16b, #0xaa, you will wind up with the following regardless of the type you give it:

18a95a254      v0.b = 0xaa
18a95a254      v0:1.b = 0xaa
18a95a254      v0:2.b = 0xaa
18a95a254      v0:3.b = 0xaa
18a95a254      v0:4.b = 0xaa
18a95a254      v0:5.b = 0xaa
18a95a254      v0:6.b = 0xaa
18a95a254      v0:7.b = 0xaa
18a95a254      v0:8.b = 0xaa
18a95a254      v0:9.b = 0xaa
18a95a254      v0:0xa.b = 0xaa
18a95a254      v0:0xb.b = 0xaa
18a95a254      v0:0xc.b = 0xaa
18a95a254      v0:0xd.b = 0xaa
18a95a254      v0:0xe.b = 0xaa
18a95a254      v0:0xf.b = 0xaa

This can happen quite frequently in some binaries and cause a real headache when trying to understand what the code is doing.

Are any alternative solutions acceptable?
Possibly? Really anything that doesn't expand into 16 HLIL instructions should be an improvement.

Additional Information:
This may be related to load/store splitting logic as well, unsure.

@fuzyll fuzyll added Type: Enhancement Issue is a small enhancement to existing functionality Component: Architecture Issue needs changes to an architecture plugin Arch: ARM64 Issues with the AArch64 architecture plugin Impact: Medium Issue is impactful with a bad, or no, workaround labels Jun 25, 2024
@galenbwill galenbwill self-assigned this Jun 25, 2024
@galenbwill galenbwill added the Effort: Medium Issue should take < 1 month label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: ARM64 Issues with the AArch64 architecture plugin Component: Architecture Issue needs changes to an architecture plugin Effort: Medium Issue should take < 1 month Impact: Medium Issue is impactful with a bad, or no, workaround Type: Enhancement Issue is a small enhancement to existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants