[v1.03][RISCV] Add support for RISCV extensions

This commit is contained in:
Dr-Noob
2023-04-12 18:55:56 +02:00
parent 4405a262ca
commit 05744f4e40
6 changed files with 190 additions and 4 deletions

View File

@@ -120,16 +120,28 @@ struct features {
#endif
};
struct extensions {
char* str;
uint32_t mask;
};
struct cpuInfo {
VENDOR cpu_vendor;
VENDOR cpu_vendor;
struct uarch* arch;
struct hypervisor* hv;
struct frequency* freq;
struct cache* cach;
struct topology* topo;
struct features* feat;
int64_t peak_performance;
// Similar but not exactly equal
// to struct features
#ifdef ARCH_RISCV
struct extensions* ext;
#else
struct features* feat;
#endif
#if defined(ARCH_X86) || defined(ARCH_PPC)
// CPU name from model
char* cpu_name;