1
0
mirror of https://github.com/google/cpu_features.git synced 2025-07-01 13:21:13 +02:00

Add RISCV vector extension (#289)

Co-authored-by: Michael Roe <michael-roe@users.noreply.github.com>
This commit is contained in:
michael-roe
2023-04-24 14:36:22 +01:00
committed by GitHub
parent 5607a689e0
commit 75ec988188
4 changed files with 28 additions and 0 deletions

View File

@ -36,6 +36,7 @@ typedef struct {
int D : 1; // Standard Extension for Double-Precision Floating-Point
int Q : 1; // Standard Extension for Quad-Precision Floating-Point
int C : 1; // Standard Extension for Compressed Instructions
int V : 1; // Standard Extension for Vector Instructions
int Zicsr : 1; // Control and Status Register (CSR)
int Zifencei : 1; // Instruction-Fetch Fence
} RiscvFeatures;
@ -55,6 +56,7 @@ typedef enum {
RISCV_D,
RISCV_Q,
RISCV_C,
RISCV_V,
RISCV_Zicsr,
RISCV_Zifencei,
RISCV_LAST_,

View File

@ -214,6 +214,7 @@ CPU_FEATURES_START_CPP_NAMESPACE
#define RISCV_HWCAP_D (1UL << ('D' - 'A'))
#define RISCV_HWCAP_Q (1UL << ('Q' - 'A'))
#define RISCV_HWCAP_C (1UL << ('C' - 'A'))
#define RISCV_HWCAP_V (1UL << ('V' - 'A'))
typedef struct {
unsigned long hwcaps;