Head files are included in the second patch in case the name needs to be changed.
RV32 / 64:
orc.b
__builtin_riscv_orc_b_32 __builtin_riscv_orc_b_64 _rv_orc_b _rv32_orc_b _rv64_orc_b
Differential D99320
[RISCV] [1/2] Add intrinsic for Zbb extension LevyHsu on Mar 25 2021, 12:22 AM. Authored by
Details Head files are included in the second patch in case the name needs to be changed. RV32 / 64: __builtin_riscv_orc_b_32 __builtin_riscv_orc_b_64 _rv_orc_b _rv32_orc_b _rv64_orc_b
Diff Detail
Event TimelineComment Actions
Comment Actions
Comment Actions
Comment Actions Can I just check the reasoning on the naming? I see that the bitmanip 0.93 spec proposes _{rv,rv32,rv64}_{opname} intrinsics. Does the __builtin__{riscv,riscv32,riscv64}_opname format match what GCC are doing / planning to do here? Precedent for RVV, for other archs, or something else? Just trying to determine to what these names are an open item of discussion vs matching something else. EDIT: I see Craig commented on this point in https://reviews.llvm.org/D99009#2660456 Comment Actions Yeah the big open for naming is the name of the intrinsic header. Whether it should be rvintrin.h or riscv_intrinsic.h. The builtins in this patch are builtin_riscv_orc_b_32 I've update the description summary to reflect this since it change during development. The Zbr patch uses the following without a 32/64 suffix. There's a difference because orc.b needs to be available for 32-bit on RV32 and RV64 per the spec so we have two builtins. crc32.b intrinsics in the spec are defined only for xlen so we have a single builtin. @kito-cheng do you know how gcc will name builtins? Comment Actions Created an issue for continue discuses on riscv-c-api-doc Comment Actions I'm going to approve this. If we need to change the builtin names in the future that's easy enough to do. |
Can we select between the 32 and 64 bit version in the header based on __riscv_xlen so we only need 2 builtins, rather than 3?