Go to the documentation of this file.
30 #define HWCAP_RV(letter) (1ul << ((letter) - 'A'))
32 #if HAVE_SYS_HWPROBE_H
33 #include <sys/hwprobe.h>
39 #if HAVE_SYS_HWPROBE_H
40 struct riscv_hwprobe pairs[] = {
41 { RISCV_HWPROBE_KEY_BASE_BEHAVIOR, 0 },
42 { RISCV_HWPROBE_KEY_IMA_EXT_0, 0 },
46 if (pairs[0].
value & RISCV_HWPROBE_BASE_BEHAVIOR_IMA)
48 if (pairs[1].
value & RISCV_HWPROBE_IMA_FD)
50 if (pairs[1].
value & RISCV_HWPROBE_IMA_V)
53 if (pairs[1].
value & RISCV_HWPROBE_EXT_ZBA)
55 if (pairs[1].
value & RISCV_HWPROBE_EXT_ZBB)
57 #ifdef RISCV_HWPROBE_EXT_ZVBB
58 if (pairs[1].
value & RISCV_HWPROBE_EXT_ZVBB)
65 const unsigned long hwcap = getauxval(AT_HWCAP);
67 if (hwcap & HWCAP_RV(
'I'))
69 if (hwcap & HWCAP_RV(
'F'))
71 if (hwcap & HWCAP_RV(
'D'))
73 if (hwcap & HWCAP_RV(
'B'))
77 if (hwcap & HWCAP_RV(
'V'))
86 #if defined (__riscv_flen) && (__riscv_flen >= 32)
88 #if (__riscv_flen >= 64)
101 #ifdef __riscv_vector
103 #if __riscv_v_elen >= 64
106 #if __riscv_v_elen_fp >= 32
108 #if __riscv_v_elen_fp >= 64
#define AV_CPU_FLAG_RVB_BASIC
Basic bit-manipulations.
#define AV_CPU_FLAG_RV_ZVBB
Vector basic bit-manipulations.
#define AV_CPU_FLAG_RVF
F (single precision FP)
#define AV_CPU_FLAG_RVV_F64
Vectors of double's.
#define AV_CPU_FLAG_RVV_F32
Vectors of float's */.
#define FF_ARRAY_ELEMS(a)
#define AV_CPU_FLAG_RVB_ADDR
Address bit-manipulations.
#define AV_CPU_FLAG_RVD
D (double precision FP)
#define AV_CPU_FLAG_RVV_I32
Vectors of 8/16/32-bit int's */.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
#define AV_CPU_FLAG_RVI
I (full GPR bank)
#define AV_CPU_FLAG_RVV_I64
Vectors of 64-bit int's */.
int ff_get_cpu_flags_riscv(void)