x86 EFLAGS: Difference between revisions
Jump to navigation
Jump to search
C macros |
→C macro constants: fix resvd flags (again xd) |
||
Line 116: | Line 116: | ||
<pre>#define X86_EFLAGS_CF 1 /* Carry Flag [S] */ | <pre>#define X86_EFLAGS_CF 1 /* Carry Flag [S] */ | ||
#define X86_EFLAGS_rsvd_2 2 /* Always clear [ | #define X86_EFLAGS_rsvd_2 2 /* Always clear [0] */ | ||
#define X86_EFLAGS_PF 3 /* Parity Flag [S] */ | #define X86_EFLAGS_PF 3 /* Parity Flag [S] */ | ||
#define X86_EFLAGS_rsvd_4 4 /* Always set [1] */ | #define X86_EFLAGS_rsvd_4 4 /* Always set [1] */ | ||
Line 129: | Line 129: | ||
#define X86_EFLAGS_IOPL 13 /* I/O Privilege Level [X] */ | #define X86_EFLAGS_IOPL 13 /* I/O Privilege Level [X] */ | ||
#define X86_EFLAGS_NT 14 /* Nested Task [X] */ | #define X86_EFLAGS_NT 14 /* Nested Task [X] */ | ||
#define X86_EFLAGS_rsvd_15 15 /* Always clear [ | #define X86_EFLAGS_rsvd_15 15 /* Always clear [0] */ | ||
#define X86_EFLAGS_RF 16 /* Resume Flag [X] */ | #define X86_EFLAGS_RF 16 /* Resume Flag [X] */ | ||
#define X86_EFLAGS_VM 17 /* Virtual-8086 Mode [X] */ | #define X86_EFLAGS_VM 17 /* Virtual-8086 Mode [X] */ |
Revision as of 03:10, 20 March 2025
EFLAGS table
Bit | Type /val.[1] |
Name | Abbreviation |
---|---|---|---|
1 | S | Carry Flag | CF
|
2 | 0 | Always clear | rsvd_2 [2]
|
3 | S | Parity Flag | PF
|
4 | 1 | Always set | rsvd_4
|
5 | S | Auxiliary Carry Flag | AF
|
6 | 1 | Always set | rsvd_6
|
7 | S | Zero Flag | ZF
|
8 | S | Sign Flag | SF
|
9 | X | Trap Flag | TF
|
10 | X | Interrupt Enable Flag | IF
|
11 | C | Direction Flag | DF
|
12 | S | Overflow Flag | OF
|
13 | X | I/O Privilege Level | IOPL
|
14 | X | Nested Task | NT
|
15 | 0 | Always clear | rsvd_15
|
16 | X | Resume Flag | RF
|
17 | X | Virtual-8086 Mode | VM
|
18 | X | Alignment Check / Access Control | AC
|
19 | X | Virtual Interrupt Flag | VIF
|
20 | X | Virtual Interrupt Pending | VIP
|
21 | X | ID Flag | ID
|
C macro constants
#define X86_EFLAGS_CF 1 /* Carry Flag [S] */ #define X86_EFLAGS_rsvd_2 2 /* Always clear [0] */ #define X86_EFLAGS_PF 3 /* Parity Flag [S] */ #define X86_EFLAGS_rsvd_4 4 /* Always set [1] */ #define X86_EFLAGS_AF 5 /* Auxiliary Carry Flag [S] */ #define X86_EFLAGS_rsvd_6 6 /* Always set [1] */ #define X86_EFLAGS_ZF 7 /* Zero Flag [S] */ #define X86_EFLAGS_SF 8 /* Sign Flag [S] */ #define X86_EFLAGS_TF 9 /* Trap Flag [X] */ #define X86_EFLAGS_IF 10 /* Interrupt Enable Flag [X] */ #define X86_EFLAGS_DF 11 /* Direction Flag [C] */ #define X86_EFLAGS_OF 12 /* Overflow Flag [S] */ #define X86_EFLAGS_IOPL 13 /* I/O Privilege Level [X] */ #define X86_EFLAGS_NT 14 /* Nested Task [X] */ #define X86_EFLAGS_rsvd_15 15 /* Always clear [0] */ #define X86_EFLAGS_RF 16 /* Resume Flag [X] */ #define X86_EFLAGS_VM 17 /* Virtual-8086 Mode [X] */ #define X86_EFLAGS_AC 18 /* Alignment Check / Access Control [X] */ #define X86_EFLAGS_VIF 19 /* Virtual Interrupt Flag [X] */ #define X86_EFLAGS_VIP 20 /* Virtual Interrupt Pending [X] */ #define X86_EFLAGS_ID 21 /* ID Flag [X] */