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

Introduce vendor prefix for Rivos custom extensions #72

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

preames
Copy link

@preames preames commented Jan 24, 2025

This change reserves the vendor prefix "rv." for Rivos's custom extensions.

This change reserves the vendor prefix "rv." for Rivos's custom extensions.  

Signed-off-by: Philip Reames <preames@rivosinc.com>
@TommyMurphyTM1234
Copy link

Might "rv" perhaps get confused with official "RISC-V" standard extensions?

@preames
Copy link
Author

preames commented Jan 24, 2025

Might "rv" perhaps get confused with official "RISC-V" standard extensions?

The mnemonics for standard extensions are not prefixed.

@TommyMurphyTM1234
Copy link

Might "rv" perhaps get confused with official "RISC-V" standard extensions?

The mnemonics for standard extensions are not prefixed.

I appreciate that, but isn't it possible that some casual observers won't know that and might mistakenly assume that "rv" prefixed extensions might be official/standard/non-proprietary RISC-V? Especially since "RV" is so widely used as an informal way to refer to RISC-V features in general. An easy way to eliminate the possibility of such confusion might be by using a different prefix here?

@cmuellner
Copy link
Collaborator

We talked about this in the SIG Toolchain call today.

I acknowledge the potential for confusion with an rv. prefix.
However, vendor code is not expected to be emitted without explicitly enabling it (similar arguments apply to other occurrences of vendor instructions like hand-written assembly).

Where it might cause confusion is in the intrinsic names.
There, we have a prefix of __riscv_ followed by the vendor prefix.
With accepting rv, we could get intrinsics like __riscv_rv_vadd_vv_i8m1() (similar to __riscv_vadd_vv_i8m1).

I stated that I wouldn't block this PR, but I'd like to hear opinions from GCC and LLVM maintainers on this.

@cmuellner
Copy link
Collaborator

The consensus in the RISC-V LLVM sync-up call (lead by @asb) was to accept this.

@kito-cheng, any opinion here?

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.

3 participants