Tidy up src/cpu/cpu.h
This commit is contained in:
@@ -191,11 +191,17 @@ typedef struct {
|
|||||||
#define VID_FLAG 0x0020 /* in EFLAGS */
|
#define VID_FLAG 0x0020 /* in EFLAGS */
|
||||||
|
|
||||||
#define WP_FLAG 0x10000 /* in CR0 */
|
#define WP_FLAG 0x10000 /* in CR0 */
|
||||||
#define CR4_VME (1 << 0)
|
|
||||||
#define CR4_PVI (1 << 1)
|
#define CR4_VME (1 << 0) /* Virtual 8086 Mode Extensions */
|
||||||
#define CR4_PSE (1 << 4)
|
#define CR4_PVI (1 << 1) /* Protected-mode Virtual Interrupts */
|
||||||
#define CR4_PAE (1 << 5)
|
#define CR4_TSD (1 << 2) /* Time Stamp Disable */
|
||||||
#define CR4_PGE (1 << 7)
|
#define CR4_DE (1 << 3) /* Debugging Extensions */
|
||||||
|
#define CR4_PSE (1 << 4) /* Page Size Extension */
|
||||||
|
#define CR4_PAE (1 << 5) /* Physical Address Extension */
|
||||||
|
#define CR4_MCE (1 << 6) /* Machine Check Exception */
|
||||||
|
#define CR4_PGE (1 << 7) /* Page Global Enabled */
|
||||||
|
#define CR4_PCE (1 << 8) /* Performance-Monitoring Counter enable */
|
||||||
|
#define CR4_OSFXSR (1 << 9) /* Operating system support for FXSAVE and FXRSTOR instructions */
|
||||||
|
|
||||||
#define CPL ((cpu_state.seg_cs.access >> 5) & 3)
|
#define CPL ((cpu_state.seg_cs.access >> 5) & 3)
|
||||||
|
|
||||||
@@ -472,12 +478,6 @@ COMPILE_TIME_ASSERT(sizeof(cpu_state_t) <= 128)
|
|||||||
#define cpu_mod cpu_state.rm_data.rm_mod_reg.mod
|
#define cpu_mod cpu_state.rm_data.rm_mod_reg.mod
|
||||||
#define cpu_reg cpu_state.rm_data.rm_mod_reg.reg
|
#define cpu_reg cpu_state.rm_data.rm_mod_reg.reg
|
||||||
|
|
||||||
#define CR4_TSD (1 << 2)
|
|
||||||
#define CR4_DE (1 << 3)
|
|
||||||
#define CR4_MCE (1 << 6)
|
|
||||||
#define CR4_PCE (1 << 8)
|
|
||||||
#define CR4_OSFXSR (1 << 9)
|
|
||||||
|
|
||||||
/* Global variables. */
|
/* Global variables. */
|
||||||
extern cpu_state_t cpu_state;
|
extern cpu_state_t cpu_state;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user