Skip to content
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

How was encodings made? #13

Open
playX18 opened this issue Nov 7, 2024 · 2 comments
Open

How was encodings made? #13

playX18 opened this issue Nov 7, 2024 · 2 comments

Comments

@playX18
Copy link

playX18 commented Nov 7, 2024

Is it hand-made or somehow parsed from Intel manual? I am using instrs.txt in my project but looking to add RW info for operands and doing it by hand is quite painful.

@aengelke
Copy link
Owner

aengelke commented Nov 7, 2024

Is it hand-made or somehow parsed from Intel manual?

Hand-made and fuzz-tested against Intels XED.

add RW info for operands and doing it by hand is quite painful.

I do have plans to add rw-info and info on implicit operands at some point. It will be a larger effort, though, and I might want to add APX and AVX10.2 support first.

I am using instrs.txt in my project

Happy to hear this is helpful!

@playX18
Copy link
Author

playX18 commented Nov 7, 2024

Is it hand-made or somehow parsed from Intel manual?

Hand-made and fuzz-tested against Intels XED.

add RW info for operands and doing it by hand is quite painful.

I do have plans to add rw-info and info on implicit operands at some point. It will be a larger effort, though, and I might want to add APX and AVX10.2 support first.

I am using instrs.txt in my project

Happy to hear this is helpful!

Glad to hear that you will work on RW info! I'll be waiting for it then. I tried to do it manually by adding [RrWwXx]: prefix to all operands and perhaps I can even make a PR then, but it would take me lots of time to make it complete...

My project is here if you're interested: https://github.com/playx18/uasm. I am also using your disarm project for ARM JIT but it's still WIP.

One thing I could not figure out from parseinstrs.py is how can I make encoder more easy to use: I tried to make it emit enum Encoding {...} which would contain all possible encodings and then match on opcode + operands passed to emit() to find out suitable encoding. So instead of doing add64rr() and add32rm() user could simply do add(RAX, RDI) and add(EAX, ptr(RDI, 16));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants