riscv-non-isa / riscv-c-api-doc

Documentation of the RISC-V C API
https://jira.riscv.org/browse/RVG-4
Creative Commons Attribution 4.0 International
75 stars 41 forks source link

__builtin_riscv_pause not listed in document #81

Open KaiYG opened 5 months ago

KaiYG commented 5 months ago

I notice that __builtin_riscv_pause has been supported on GCC for a while but not listed in risc-c-api-doc. Is it an official api and just not yet updated to the document?

cmuellner commented 5 months ago

The name __builtin_riscv_pause does not conform with the naming convention of RISC-V intrinsics (which need a prefix __riscv_).

In other words, there is no defined interoperable intrinsic function to emit a PAUSE instruction.

To introduce one, the following steps could be taken: