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

Comply with RISC-V toolchain conventions for vendor extensions. #105

Open
5 tasks
resistor opened this issue Jan 18, 2025 · 3 comments
Open
5 tasks

Comply with RISC-V toolchain conventions for vendor extensions. #105

resistor opened this issue Jan 18, 2025 · 3 comments

Comments

@resistor
Copy link
Collaborator

Cheriot v1 needs to conform to standardized conventions for RISC-V vendor extensions in order to be acceptable to upstream LLVM. These conventions are documented here: https://github.com/riscv-non-isa/riscv-toolchain-conventions/blob/main/src/toolchain-conventions.adoc#conventions-for-vendor-extensions

  • Xcheriotv1 subtarget feature is defined and used
  • Instruction mnemonics are prefixed with "ct."
  • CSRs are prefixed with "ct."
  • Relocations use R_RISCV_VENDOR to exist in a vendor-specific namespace
  • All prefixes and identifiers are upstreamed into the official toolchain conventions document
@davidchisnall
Copy link

We will also need to provide assembly macros or, ideally, aliases (so inline assembly works) for the current instruction mnemonics.

@resistor
Copy link
Collaborator Author

We will also need to provide assembly macros or, ideally, aliases (so inline assembly works) for the current instruction mnemonics.

Won't that run into an issue with name collisions with Zcheri?

@davidchisnall
Copy link

No Zcheri is renaming all of the instructions to have stupid names (e.g. candperm -> acperm). I think hiding the aliases behind an opt-in flag should be fine.

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

No branches or pull requests

2 participants