RISC-V Built-in Functions (Using the GNU Compiler Collection (GCC))

#### 7.13.29 RISC-V Built-in Functions ¶

These built-in functions are available for the RISC-V family of processors.

RISC-V intrinsic headers define macros of the form `__riscv_intrinsic_extension` with the value `1` when GCC supports intrinsics for extension. These macros indicate compiler support for the intrinsic API and are independent of whether the corresponding ISA extension is enabled for the current compilation unit. Include `riscv_bitmanip.h` for scalar bit-manipulation intrinsics, `riscv_crypto.h` for scalar cryptography intrinsics, `riscv_vector.h` for vector intrinsics, and vendor intrinsic headers for vendor intrinsic extensions.

Built-in Function: `void *` __builtin_thread_pointer `(void)` ¶

  Returns the value that is currently set in the ‘`tp`’ register.

Built-in Function: `void` __builtin_riscv_pause `(void)` ¶

  Generates the `pause` (hint) machine instruction. If the target implements the Zihintpause extension, it indicates that the current hart should be temporarily paused or slowed down.