Intrinsic Functions for Vector Instructions

__STATIC_FORCEINLINE void __enable_vector (void)
__STATIC_FORCEINLINE void __disable_vector (void)
group Intrinsic Functions for Vector Instructions

Functions that generate RISC-V Vector instructions.

RISC-V Vector Intrinsic APIs are provided directly through compiler generated intrinsic function.

This intrinsic function support by compiler:

For Nuclei RISC-V GCC 10.2, it is an very old and not ratified version(no longer supported).

  • API header file can be found in lib/gcc/riscv-nuclei-elf/<gcc_ver>/include/riscv_vector.h

For Nuclei RISC-V GCC 13/Clang 17, the intrinsic API supported is v0.12 version, see https://github.com/riscv-non-isa/rvv-intrinsic-doc/releases/tag/v0.12.0

For Nuclei RISC-V GCC 14.2/Clang 19, the intrinsic API supported is v0.11.x version, see https://github.com/riscv-non-isa/rvv-intrinsic-doc/tree/v0.11.x

Functions

__STATIC_FORCEINLINE void __enable_vector (void)

Enable Vector Unit.

Set vector context status bits to enable vector unit, and set state to initial

__STATIC_FORCEINLINE void __disable_vector (void)

Disable Vector Unit.

Clear vector context status bits to disable vector unit