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 instruction names #1

Open
ThinkOpenly opened this issue Nov 10, 2023 · 1 comment
Open

Add instruction names #1

ThinkOpenly opened this issue Nov 10, 2023 · 1 comment
Labels
good first issue Good for newcomers

Comments

@ThinkOpenly
Copy link
Owner

It would be really nice to be able to extract the names of the respective instructions from their definitions. One suggestion is to use "attributes":

$[name jump and link register]
union clause ast = RISCV_JALR : (bits(12), regidx, regidx)
@ThinkOpenly
Copy link
Owner Author

Commit 65fca04 includes some additional names, and a mechanism for adding names for instructions whose mnemonics are within mappings:

mapping itype_mnemonic : iop <-> string = {
  $[name add immediate]
    RISCV_ADDI  <-> "addi",
  $[name set less than immediate]
    RISCV_SLTI  <-> "slti",
[...]

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

No branches or pull requests

1 participant