-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
x86 RzIL uplifting #2747
x86 RzIL uplifting #2747
Conversation
f796e31
to
1910f67
Compare
6a5d3db
to
6c182b7
Compare
70bfd16
to
eb4264b
Compare
32862f2
to
a21a050
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have annotated all the places that are not yet covered by asm tests, so you can check them off one after another. This may be somewhat tedious, but it is quite important to have these all type-checked, especially with different bitness. In particular, we need tests for x86_64
too.
Here is the coverage report I used: x86_il.c.gcov.txt
The overall design and structure looks very nice to me, great job already!
I have added tests for x86-64 and x86-16. I am now working on improving coverage. |
39f8592
to
1c4619f
Compare
* Implement functions for lifting x86 operands to RzIL * Implement RzIL for invalid instructions
* Create an enum for flags in x86 `EFLAGS` register * Add `x86_il_{get,set}_eflags` utility functions to deal with flags
* Add documentation format and documentation for the lifted instructions * Add `RET_NULL_IF_64BIT_OR_LOCK` macro for convenience * Add `MOD` and `SMOD` in `rz_il_opbuilder_*.h` for convenience
* Format according to clang-format
* Cast to correct types in case of address override prefix in case of `CMPS` instruction in 64 bits * Fix typo, and use `RDX` and `RAX`, instead of `EDX` and `EAX` in `DIV` implmentation for 64-bit operand
* Update lifting of `LODS`, `MOVS`, `SCAS` and `STOS` instructions to cast the memaddr to correct width
* Fix casting error in `ENTER`
* Makes it easier for future contributors and other people
b3041bd
to
7d8bdcd
Compare
Co-authored-by: Giovanni <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, great job! The x86_il.c
file will grow pretty big. No need to do it right now, but surely we will need to split it into categories - e.g. separate arithmetic ops from memory ops, etc
* Fix typos in Doxygen documentation * Add dummy implementation for `IN`, `OUT` and `WAIT`
* Implement `LOOP` family of instructions
@DMaroo run clang-format. |
Your checklist for this pull request
Detailed description
This PR intends to lift x86 ISA to RzIL. This is a GSoC 2022 project.
Relevant links:
Test plan
Highlighted in the proposal document.
Closing issues
Tracker issue: #2080
Notes
This is only the first in series of a bunch of pull requests which plan on lifting x86. The IL implementation in the PR has not been semantically verified but the generated IL code has been type checked.
More info on the plan can be found here: https://dmaroo.github.io/gsocx86lifting