-
Notifications
You must be signed in to change notification settings - Fork 452
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
Added MSP430 support #392
base: master
Are you sure you want to change the base?
Added MSP430 support #392
Conversation
wow this is amazing! could you provide the llvm commit that you based this on? |
could you please split the bindings into separate pull reqs? |
I ran TableGen using this commit as a base: llvm-mirror/llvm@ebec1ca The *.td files themselves (and all the files for MSP430 under the Target/ folder) were taken from the latest LLVM commit as of when I cloned it: llvm-mirror/llvm@1b084f0 . Proper MSP430 support was added to LLVM in November, starting with this commit (and continuing in subsequent commits): llvm-mirror/llvm@695940b#diff-a2e1042efbf812d7279d8d7b393272f7 The TableGen files required some fairly minor modifications to work correctly. See the exact code I used for generating the *.inc files here: https://github.com/jfktrey/llvm/commits/msp430-keystone-integration I will split the binding into a separate PR |
Updated the CR to exclude bindings - I'll open up a separate PRs or two for those once this is merged, so that I can diff the PR against this commit for a cleaner review. If you'd prefer it another way, just let me know! |
please add your name to CREDITS.TXT too. let me review this before merging, will take some time on this huge update. |
Hi @aquynh , just wanted to see if you've had a chance to take a look or have any thoughts. |
my apologies for this super delay! will get back to you by this weekend. |
Hey @aquynh , just wanted to check back in here. I know it's a large merge. Let me know if there's anything you need from me. |
Hi, just checking in - is there anything I need to change? |
Overview of changes:
const_generator.py
Adding support for MSP430 was not trivial, since the required MC* classes only landed in LLVM in the past month. This means the code had to be backported to the 3.9.0 release that Keystone seems to be based off of. In short, I took the corrected TableGen .td files describing MSP430 from the latest commit, fixed those up to be built on a 3.9.0 branch, and used those generated .inc files. The remaining files are taken directly from the latest LLVM commit and fixed up to work with the 3.9.0 code. I added a few methods to some shared files in order to get these to work, but most of this is self-contained.
I validated correct code assembly for some example programs using kstool.