-
Notifications
You must be signed in to change notification settings - Fork 298
Improve lifting of BEXTR instruction for x86 #6287
Copy link
Copy link
Open
Labels
Arch: x86Issues with the x86/x64 architecture pluginIssues with the x86/x64 architecture pluginComponent: ArchitectureIssue needs changes to an architecture pluginIssue needs changes to an architecture pluginEffort: TrivialIssues require < 1 day of workIssues require < 1 day of workImpact: LowIssue is a papercut or has a good, supported workaroundIssue is a papercut or has a good, supported workaround
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
Arch: x86Issues with the x86/x64 architecture pluginIssues with the x86/x64 architecture pluginComponent: ArchitectureIssue needs changes to an architecture pluginIssue needs changes to an architecture pluginEffort: TrivialIssues require < 1 day of workIssues require < 1 day of workImpact: LowIssue is a papercut or has a good, supported workaroundIssue is a papercut or has a good, supported workaround
What is the feature you'd like to have?
Lifting of the BEXTR instruction is currently handled as an intrinsic.
This produces hard to understand HLIL, and could be improved if it was lifted to a bit-shift/mask instead.
Assembly:
HLIL:
IDA output:
Is your feature request related to a problem?
Can replicate above assembly by pasting these bytes:
b902010000c4e270f7c7c3Are any alternative solutions acceptable?
Separating the start/len of the bextr intrinsic into 2 separate arguments (and making intrinsic name shorter) could make it more readable, but bit-shift/mask would be best.