mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-24 23:40:39 +01:00
[v1.04][RISCV] Define to enum
This commit is contained in:
@@ -29,35 +29,34 @@ static const struct extension extension_list[] = {
|
||||
{ 's' - 'a', "(S) Supervisor-level Instructions" }
|
||||
};
|
||||
|
||||
#define RISCV_ISA_EXT_MAX 64
|
||||
#define RISCV_ISA_EXT_MAX 64
|
||||
#define RISCV_ISA_EXT_NAME_LEN_MAX 32
|
||||
#define RISCV_ISA_EXT_BASE 26
|
||||
#define RISCV_ISA_EXT_BASE 26
|
||||
|
||||
// This enum represent the logical ID for multi-letter RISC-V ISA extensions.
|
||||
// The logical ID should start from RISCV_ISA_EXT_BASE and must not exceed
|
||||
// RISCV_ISA_EXT_MAX.
|
||||
#define RISCV_ISA_EXT_BASE 26
|
||||
|
||||
#define RISCV_ISA_EXT_SSCOFPMF 26
|
||||
#define RISCV_ISA_EXT_SSTC 27
|
||||
#define RISCV_ISA_EXT_SVINVAL 28
|
||||
#define RISCV_ISA_EXT_SVPBMT 29
|
||||
#define RISCV_ISA_EXT_ZBB 30
|
||||
#define RISCV_ISA_EXT_ZICBOM 31
|
||||
#define RISCV_ISA_EXT_ZIHINTPAUSE 32
|
||||
#define RISCV_ISA_EXT_SVNAPOT 33
|
||||
#define RISCV_ISA_EXT_ZICBOZ 34
|
||||
#define RISCV_ISA_EXT_SMAIA 35
|
||||
#define RISCV_ISA_EXT_SSAIA 36
|
||||
#define RISCV_ISA_EXT_ZBA 37
|
||||
#define RISCV_ISA_EXT_ZBS 38
|
||||
#define RISCV_ISA_EXT_ZICNTR 39
|
||||
#define RISCV_ISA_EXT_ZICSR 40
|
||||
#define RISCV_ISA_EXT_ZIFENCEI 41
|
||||
#define RISCV_ISA_EXT_ZIHPM 42
|
||||
|
||||
#define RISCV_ISA_EXT_MAX 64
|
||||
#define RISCV_ISA_EXT_NAME_LEN_MAX 32
|
||||
enum riscv_isa_ext_id {
|
||||
RISCV_ISA_EXT_SSCOFPMF = RISCV_ISA_EXT_BASE,
|
||||
RISCV_ISA_EXT_SSTC,
|
||||
RISCV_ISA_EXT_SVINVAL,
|
||||
RISCV_ISA_EXT_SVPBMT,
|
||||
RISCV_ISA_EXT_ZBB,
|
||||
RISCV_ISA_EXT_ZICBOM,
|
||||
RISCV_ISA_EXT_ZIHINTPAUSE,
|
||||
RISCV_ISA_EXT_SVNAPOT,
|
||||
RISCV_ISA_EXT_ZICBOZ,
|
||||
RISCV_ISA_EXT_SMAIA,
|
||||
RISCV_ISA_EXT_SSAIA,
|
||||
RISCV_ISA_EXT_ZBA,
|
||||
RISCV_ISA_EXT_ZBS,
|
||||
RISCV_ISA_EXT_ZICNTR,
|
||||
RISCV_ISA_EXT_ZICSR,
|
||||
RISCV_ISA_EXT_ZIFENCEI,
|
||||
RISCV_ISA_EXT_ZIHPM,
|
||||
RISCV_ISA_EXT_ID_MAX
|
||||
};
|
||||
static_assert(RISCV_ISA_EXT_ID_MAX <= RISCV_ISA_EXT_MAX);
|
||||
|
||||
struct cpuInfo* get_cpu_info(void);
|
||||
char* get_str_topology(struct cpuInfo* cpu, struct topology* topo);
|
||||
|
||||
Reference in New Issue
Block a user