-
Notifications
You must be signed in to change notification settings - Fork 15
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
DO NOT MERGE: Experiments with instruction encoding extraction #15
base: sof-gcc10.2
Are you sure you want to change the base?
Conversation
The tools in this directory product JSON files describing instruction encodings based on the binutils overlay file xtensa-modules.c. The input format accepted is a .tar.gz or .tar.bz2 overlay tarball as accepted by a crosstools-ng build. Just run "make" in this directory to produce a JSON file for each machine description. (It takes surprisingly long to compile these files, so feel free to build in parallel to speed the process!). Signed-off-by: Andy Ross <[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 @andyross - does Maciej need to review ?
Indeed, this is going to take a few passes to get right and Maciej (I couldn't find his github handle, though I've pointed him and @cujomalainey here) will need to figure out how to apply this and what needs to change. Really this was a weekend hack to see what could be recovered (turns out... almost everything I think, it wasn't so much difficult as it was obtuse). |
Wow this is awesome, if Maciej gives this the thumbs up we can stop banging our heads on license headers. |
@andyross can you convert this to a WIP so it doesn't get merged? |
@andyross also thinking would this go in Zephyr SDK directly or does Zephyr SDK clone this repo as part of SDK build ? |
Nothing this generates is going to be useful except to produce a toolchain. So somewhere along the path to a HiFi-enabled SDK toolchain is where this wants to live, but I'm no llvm expert (nor gcc for that matter, nor SDK build/CI person). I submitted it here just to have somewhere to discuss it and because this is the best single source for overlay files (Zephyr's SDK lacks the Mediatek and AMD files still). |
@andyross this should probably upstream with Maciej's work in LLVM after the xtensa core is merged, but it can be carried here until that time. |
Not for merge yet, but all the data these scripts operate on is here, so it's a logical place to put it for now.
Fundamentally this is a data extraction project to recover a first-principles description of the Xtensa instruction formats from the executable C code in their existing overlay files.