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

add x86 instruction simplifier #15

Open
robertmuth opened this issue Mar 13, 2022 · 1 comment
Open

add x86 instruction simplifier #15

robertmuth opened this issue Mar 13, 2022 · 1 comment
Labels

Comments

@robertmuth
Copy link
Owner

The simplifier accepts an x86 instruction and returns a semantically equivalent but "better" x86 instruction.
"better" usually means short encoding.

This would be implemented in CpuX64/ in a table driven fashion. The table itself can hopefully be derived more or less automatically from the existing x86 opcode table.

The feature would me used by CodeGenX64/codegen.py::_SimplifyCpuIns()

@robertmuth
Copy link
Owner Author

One way to implement this feature is to have a table that groups related instructions - roughly those with the same opcode prefix and then checks within those groups for better encodings.

The groups might also be helpful for translating from a more standard asm notation to Cwerg x86 instruction instructions.

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

No branches or pull requests

1 participant