Support Signed Lifted IL Shift Amounts in Custom Architectures #6090
Labels
Component: API
Issue needs changes to the API
Component: Architecture
Issue needs changes to an architecture plugin
Core: LLIL
Issue involves Low Level IL
Lifting
issues related to LLIL lifting
State: Awaiting Triage
Issue is waiting for more in-depth triage from a developer
Type: Enhancement
Issue is a small enhancement to existing functionality
What is the feature you'd like to have?
Support negative/signed shift amounts in arithmetic and logical shifts. At present, an IL arithmetic shift right with a shift amount of
0xFFFFFFFF
on a 32-bit architecture results in an attempted shift ofval >> 4294967295
, resulting in a value filled with whatever the upper-most bit was. I would like to see either additional Lifted IL operations that accept a signed shift amount, or to have the existing Lifted IL operations interpret the shift amount argument as a signed value, with corresponding documented semantics.Is your feature request related to a problem?
Hexagon provides arithmetic and logical shift operations for both left- and right- shifts that take a shift amount from a register. The architecture defines the semantics for a negative shift amount as a shift of the same type (arithmetic or logical) in the opposite direction. This is presently somewhat tricky to lift, and would introduce additional conditionals into the IL flow for every shift operation of this type.
The text was updated successfully, but these errors were encountered: