Skip to content

Document .attribute reserved_registers#74

Open
kito-cheng wants to merge 2 commits intoriscv-non-isa:mainfrom
kito-cheng:reserved-register-attr
Open

Document .attribute reserved_registers#74
kito-cheng wants to merge 2 commits intoriscv-non-isa:mainfrom
kito-cheng:reserved-register-attr

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