Support Signed Lifted IL Shift Amounts in Custom Architectures
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- compilers, reverse-engineering
Research direction
Start by examining the existing Lifted IL arithmetic and logical shift operations and the custom-architecture lifting paths described in the issue. Determine whether signed shift amounts should use new operations or changed argument semantics, then document the chosen behavior and verify it for negative amounts and opposite-direction shifts.
Written by the indexing model from the issue text.
Description
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 of val >> 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.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Vector35/binaryninja-api
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Vector35/binaryninja-api#8540 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Vector35/binaryninja-api#8516 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Vector35/binaryninja-api#8503 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Vector35/binaryninja-api#8446 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Vector35/binaryninja-api#8444 ·
All issues in Vector35/binaryninja-api
Similar issues
-
Website Doc Typo Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
autowarefoundation/autoware_universe#13413 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
automated-analysis bug memory-safety
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100