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

[MC][AsmParser] Rename mnemonics according to the specification #441

Open
Tracked by #444
atrosinenko opened this issue Mar 18, 2024 · 9 comments
Open
Tracked by #444

[MC][AsmParser] Rename mnemonics according to the specification #441

atrosinenko opened this issue Mar 18, 2024 · 9 comments

Comments

@atrosinenko
Copy link
Collaborator

atrosinenko commented Mar 18, 2024

At now, most instructions are supported with some mnemonic, but these mnemonics can differ in the public specification, pre-existing code (LLVM backend and standalone assembler) and possibly the updated spec.

This issue covers instruction mnemonics in a broad sense (for example, the <op> part in context.<op>) - those cases that can be resolved by simply changing string literals in C++ code or *.td files without changing any logic.

See #440 for conditional codes.

@atrosinenko
Copy link
Collaborator Author

As explained by @hedgar2017, replaced gas with ergs in asm mnemonics (not touching the intrinsic names yet): 3fc0963

@asl
Copy link
Collaborator

asl commented Mar 19, 2024

We will wait for the updated ISA spec to perform the rename

@asl
Copy link
Collaborator

asl commented Apr 2, 2024

@akiramenai @hedgar2017 @sayon So, what is the ultimate resolution on the assembler syntax from 1.6 ISA spec?

For example https://matter-labs.github.io/eravm-spec/spec.html#NearRetDefinition says:

Syntax
  ret in1
Legacy syntax
  ret.ok aliased as ret

How do you want to handle the legacy:

  1. Make backend produce only new variant, but let assembler accept the old one as an alias (and silently "upgrade"). So, it will be just ret and ret.ok will be treated as a mnemonic alias. Disassembler will produce new mnemonic.
  2. Make both backend and assembler support only new variant. Old one (ret.ok) will be rejected everywhere.

@hedgar2017
Copy link
Collaborator

@asl #2, let's reject all legacy.

@atrosinenko
Copy link
Collaborator Author

What is the new syntax for .first modifier of log and logl1 instructions?

@asl
Copy link
Collaborator

asl commented May 22, 2024

@sayon Please check the question above

@sayon
Copy link

sayon commented May 23, 2024

Let's do .f for first. I will update it in spec tonight. CC @hedgar2017

@hedgar2017
Copy link
Collaborator

Hey @sayon @atrosinenko, do we have a single place listing all mnemonics to sort them all out?

@sayon
Copy link

sayon commented May 23, 2024

Yes, in the isa redesign proposal, but i can make a separate summary table in spec for convenience -- been thinking about it.

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

No branches or pull requests

4 participants