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

Encourage versioned compatibility check via __riscv_v_intrinsic >= 1000000 #375

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

camel-cdr
Copy link
Contributor

@camel-cdr camel-cdr commented Oct 14, 2024

The document currently suggests checking for RISC-V Vector intrinsics support via #ifdef __riscv_v_intrinsic.
This shouldn't be recommended, as earlier compiler versions of both gcc and clang that implement draft of the specs v0.11 and v0.12 also define __riscv_v_intrinsics, and don't implement all features of the 1.0 spec: https://godbolt.org/z/r6aW7hE3o

Instead, checking for v1.0 compliance should be encouraged, e.g. with #if __riscv_v_intrinsic >= 1000000, or if the code is otherwise compatible via explicitly checking support for the supported draft spec version or higher, e.g. #if __riscv_v_intrinsic >= 12000.

BTW: I noticed that I'm included in "doc/preface.adoc" as "Camel Coder", it would be cool if that can be adjusted to "Olaf Bernstein"

@kito-cheng kito-cheng merged commit 61090d5 into riscv-non-isa:main Oct 17, 2024
4 checks passed
@kito-cheng
Copy link
Collaborator

Thanks :)

Also fixed your name by 1e9f86b :P

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.

2 participants