-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
No Support for Later x86 Instructions (including AMX) #2503
Comments
Copy from my message from Rizin's Mattermost: I would strongly advise against using LLVM for x86. The table generation for the decoders is a completely different tool. Also the scripts you mentioned there are massively outdated. We use the Auto-Sync updater now (see #2015). For x86, I had the idea to use the Zydis disassembler in Capstone. Basically integrating it and write code to translate from their API to the Capstone one. I had no time yet to look into it. But if you have time I would very much welcome your effort! The most important thing is, to check license compatibility. I think Zydis is MIT? It should be compatible with Capstones BSD-3. After the license question is answered I think a route like this is sensible:
|
Hello! @flobernd and I are both rather busy right now, but I suspect that we'd both be happy to assist in an advisory role by answering questions where they come up if you do decide to go that route. :) One thing to keep in mind is that libraries with dependencies tend to be a PITA to deal with in C. I think currently Capstone only depends on libc, and your users may not appreciate if you add deps. We also learned this the hard way with Zycore. I'd love to see this happening, but it'd be dishonest to not point that out. |
Opened a discussion about this topic: #2505 |
Work environment
git clone
Expected behavior
Capstone should disassemble, e.g., AMX instructions.
Actual behavior
It fails to disassemble AMX instructions. Updating the LLVM tables seems to be failing for later versions of LLVM, and we need to work through the various errors.
Steps to reproduce the behavior
[Listed below]
Additional Logs, screenshots, source code, configuration dump, ...
I've noticed that the TableGen scripts in
suite/synctools/tablegen
were out-of-date (for example, more recent versions ofx86.td
include a line like this:So it seems as if simply upgrading the those scripts, along with the headers in
suite/synctools/tablegen/include
, and re-generating all of the.inc
files, should do the trick.Toward that end, I cloned a fresh copy of LLVM 18.1.8 (the same version as is available in Arch Linux, but I don't mind using earlier versions if there's a specific version that we should ultimately commit to), copied the
llvm-project/llvm/include
andllvm-project/llvm/lib/Target/X86/
directories intotablegen
, and re-ran the scripts according to theREADME
.Currently I'm stuck on Step 3 of the
suite/synctools/README
, where buildingstrinforeduce/strinforeduce.cpp
fails due to the namespaceMCID
being undefined. Please advise!The text was updated successfully, but these errors were encountered: