mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
add readable macros for the status flag
This commit is contained in:
parent
97eb56e95d
commit
ccbd363d6d
1 changed files with 24 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue