Vector35 / Vector35/binaryninja-api
Handle ABIs that pass and return floating point values split across multiple integer registers
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
The ARM EABI specifies that floating point values be passed and returned in integer registers. Single precision (float or float32) values fit into single registers, but double precision (double or float64) values must be placed in pairs of 32-bit integer registers.
Thus a function like atan2, with this signature in C: double atan2(double, double), would look in the binary like it was int32 atan2(int32, int32, int32, int32).
Ideally, Binary Ninja should support this syntax to capture its true semantics:
double@r0:r1 atan2(double @ r0:r1, double @ r2:r3)
There are (at least) two parts to adding support for this:
- The type parser:
- needs to be able to handle register specifiers in return types
- needs to be able to handle split register specifiers
- The analysis needs to be able to deal with split register parameters and returns, including being aware of the type conversion that they imply.
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.
Research direction
Start with the type parser requirements: register specifiers in return types and split register specifiers. Then examine analysis handling for split-register parameters and returns; the work is done when the shown atan2 signature is accepted and its implied type conversions are handled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- reverse-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100