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 support for the Intel syntax produced by MSVC and ICC #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pleroy
Copy link

@pleroy pleroy commented Feb 2, 2025

The changes to add the Intel syntax are rather large and required some restructuring. Here is an overview of the changes:

  1. There is a new class, ParserX86Intel , to parse the Intel syntax. It produces instruction forms in the order of the syntax, i.e., the first operand is the destination.
  2. In order to gather properties that don't depend on the syntax, such as the properties of the registers, there is a new class ParserX86 which is the superclass of ParserX86ATT and ParserX86Intel.
  3. The matching of markers is now done on the instruction forms because it needs to be independent from details like the syntax of numeric literals that should only be known to the parser.
  4. There is a new phase in between parsing and semantics, the "normalization". Its purpose is to align the instructions with the data found in the ISA and architecture models. For Intel, this obviously involves swapping the operands. But it also exists for the other parsers: for AT&T for instance, it does the mov/movq adjustment so that the rest of the code doesn't have to care about it.
  5. The semantics is largely unchanged, except that it checks that the instructions it processes have been normalized.
  6. There are, of course, extensive tests and data files.

Fix #106.

@JanLJL JanLJL self-assigned this Feb 3, 2025
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

Successfully merging this pull request may close these issues.

[REQUEST] Support Intel assembly syntax
2 participants