-
Notifications
You must be signed in to change notification settings - Fork 273
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
adds armv8 (aarch64) lifter #1291
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The name to string conversion could throw an error when a name is not interned, which could happen, for example, when the cache written by one version of the program is read by another version in which some name is no longer present. In the case of a missing name we represent it as `id:<repr>` where `<repr>` is the hexadecimal representation of the missing name hash.
It makes it much easier to write lifters.
The added semantic primitives are - lnot - extract - concat - select Also tweaked casts and reciprocal to handle static cases. And tweaks all monoids to choose the most significant (widest) sort instead of default to the word size.
right now it is not working as expected
the trivial executable works, echo is not yet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Aarch64 lifter (in Primus Lisp)
The lifter is written in Primus Lisp and is complete enough to lift and correctly execute our test binaries. The number of lifted instructions is about 50 but it is easy to add new ones (do not forget to contribute them back to us). I am planning on writing a guide on writing lifters in Primus Lisp but before that (and after that as well) I am always ready to help in our Gitter channel (or in Git Discussions).
During the development of the lifter, I have discovered a few shortcomings which were overcome so the pull request includes some other modifications, including qualify of life changes, bug fixes, and other improvements. They are described in detail below.
Adds
--show-addr
and--show-memory
tobap mc
andbap objdump
It is much easier to write lifters with them. Essentially, I am just doing
and getting a list of instructions for each chunk of memory and lifting all
that miss semantics.
Removes pseudo-registers special semantics from Primus Lisp lifter
It didn't really work well aside from toy examples, mostly because pseudo-registers were only handled by the Primus Lisp lifter but were left intact by any other semantics provider. This resulted in a situation where pseudo-registers were sometimes handled and sometimes not. This PR moves the responsibility of properly handling pseudo-registers to the semantics itself (i.e., to the core theory instances), which makes perfect sense and immediately enables them for old lifters (e.g., BIL lifter). Therefore, we can now close #1176, there are no more writes or reads from the ZERO register (despite that we didn't touch neither BIL lifter nor MIPS lifter).
Adds Theory.Target.has_roles
A faster way of checking register roles (rather than getting the set of registers that has the role and then checking for set membership)
resolves #1087
resolves #1176