1
0
mirror of https://github.com/google/cpu_features.git synced 2025-07-02 05:33:17 +02:00

Add macros for RISCV hwcaps (#246)

Co-authored-by: Michael Roe <michael-roe@users.noreply.github.com>
This commit is contained in:
michael-roe
2022-07-21 20:58:04 +01:00
committed by GitHub
parent c1620a979e
commit c7c7751682

View File

@ -176,6 +176,17 @@ CPU_FEATURES_START_CPP_NAMESPACE
#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000
#endif
// https://elixir.bootlin.com/linux/latest/source/arch/riscv/include/uapi/asm/hwcap.h
#define RISCV_HWCAP_A (1UL << ('A' - 'A'))
#define RISCV_HWCAP_C (1UL << ('C' - 'A'))
#define RISCV_HWCAP_D (1UL << ('D' - 'A'))
#define RISCV_HWCAP_E (1UL << ('E' - 'A'))
#define RISCV_HWCAP_F (1UL << ('F' - 'A'))
#define RISCV_HWCAP_I (1UL << ('I' - 'A'))
#define RISCV_HWCAP_M (1UL << ('M' - 'A'))
#define RISCV_HWCAP_V (1UL << ('V' - 'A'))
#define RISCV_HWCAP_Q (1UL << ('Q' - 'A'))
typedef struct {
unsigned long hwcaps;
unsigned long hwcaps2;