diff --git a/hermit/arch/x86/include/asm/processor.h b/hermit/arch/x86/include/asm/processor.h index 803404789..b17a88dec 100644 --- a/hermit/arch/x86/include/asm/processor.h +++ b/hermit/arch/x86/include/asm/processor.h @@ -81,6 +81,30 @@ extern "C" { // feature list 0x00000007:0 #define CPU_FEATURE_AVX2 (1 << 5) + +/* + * EFLAGS bits + */ +#define EFLAGS_CF (1 << 0) /* Carry Flag */ +#define EFLAGS_FIXED (1 << 1) /* Bit 1 - always on */ +#define EFLAGS_PF (1 << 2) /* Parity Flag */ +#define EFLAGS_AF (1 << 4) /* Auxiliary carry Flag */ +#define EFLAGS_ZF (1 << 6) /* Zero Flag */ +#define EFLAGS_SF (1 << 7) /* Sign Flag */ +#define EFLAGS_TF (1 << 8) /* Trap Flag */ +#define EFLAGS_IF (1 << 9) /* Interrupt Flag */ +#define EFLAGS_DF (1 << 10) /* Direction Flag */ +#define EFLAGS_OF (1 << 11) /* Overflow Flag */ +#define EFLAGS_IOPL (1 << 12) /* I/O Privilege Level (2 bits) */ +#define EFLAGS_NT (1 << 14) /* Nested Task */ +#define EFLAGS_RF (1 << 16) /* Resume Flag */ +#define EFLAGS_VM (1 << 17) /* Virtual Mode */ +#define EFLAGS_AC (1 << 18) /* Alignment Check/Access Control */ +#define EFLAGS_VIF (1 << 19) /* Virtual Interrupt Flag */ +#define EFLAGS_VIP (1 << 20) /* Virtual Interrupt Pending */ +#define EFLAGS_ID (1 << 21) /* CPUID detection */ + + // x86 control registers /// Protected Mode Enable