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

Document .attribute reserved_registers #74

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kito-cheng
Copy link
Collaborator

This PR is based on #73, Tag_RISCV_reserved_registers is introduced by riscv-non-isa/riscv-elf-psabi-doc#195 .

  • Adding new syntax for .attribute argument, accept register list style input:
RESERVED_REGS := '{' REG_LIST '}'

REG_LIST      := REG_LIST ',' REG_LIST
               | REG_RANGE
               | REG

REG_RANGE     := REG '-' REG

REG           := <register-name> | <abi-register-name> # e.g. x10, t3, f10 or fa2

For example: x6, x7, x8 and f10 are reserved, then the value of
Tag_RISCV_reserved_register is 0x400000001c1, and it also could be represent
as {x6, x7, x8, f10} or {x6-x8, f10}.

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.

1 participant