Revision fc2b4c48 cpu-i386.h
b/cpu-i386.h | ||
---|---|---|
48 | 48 |
#define R_FS 4 |
49 | 49 |
#define R_GS 5 |
50 | 50 |
|
51 |
/* eflags masks */ |
|
51 | 52 |
#define CC_C 0x0001 |
52 | 53 |
#define CC_P 0x0004 |
53 | 54 |
#define CC_A 0x0010 |
... | ... | |
55 | 56 |
#define CC_S 0x0080 |
56 | 57 |
#define CC_O 0x0800 |
57 | 58 |
|
58 |
#define TRAP_FLAG 0x0100 |
|
59 |
#define INTERRUPT_FLAG 0x0200 |
|
60 |
#define DIRECTION_FLAG 0x0400 |
|
61 |
#define IOPL_FLAG_MASK 0x3000 |
|
62 |
#define NESTED_FLAG 0x4000 |
|
63 |
#define BYTE_FL 0x8000 /* Intel reserved! */ |
|
64 |
#define RF_FLAG 0x10000 |
|
65 |
#define VM_FLAG 0x20000 |
|
66 |
/* AC 0x40000 */ |
|
59 |
#define TF_MASK 0x00000100 |
|
60 |
#define IF_MASK 0x00000200 |
|
61 |
#define DF_MASK 0x00000400 |
|
62 |
#define IOPL_MASK 0x00003000 |
|
63 |
#define NT_MASK 0x00004000 |
|
64 |
#define RF_MASK 0x00010000 |
|
65 |
#define VM_MASK 0x00020000 |
|
66 |
#define AC_MASK 0x00040000 |
|
67 |
#define VIF_MASK 0x00080000 |
|
68 |
#define VIP_MASK 0x00100000 |
|
69 |
#define ID_MASK 0x00200000 |
|
67 | 70 |
|
68 | 71 |
#define EXCP00_DIVZ 1 |
69 | 72 |
#define EXCP01_SSTP 2 |
... | ... | |
158 | 161 |
/* standard registers */ |
159 | 162 |
uint32_t regs[8]; |
160 | 163 |
uint32_t eip; |
161 |
uint32_t eflags; |
|
164 |
uint32_t eflags; /* eflags register. During CPU emulation, CC |
|
165 |
flags and DF are set to zero because they are |
|
166 |
store elsewhere */ |
|
162 | 167 |
|
163 | 168 |
/* emulator internal eflags handling */ |
164 | 169 |
uint32_t cc_src; |
... | ... | |
183 | 188 |
SegmentDescriptorTable ldt; |
184 | 189 |
SegmentDescriptorTable idt; |
185 | 190 |
|
186 |
/* various CPU modes */ |
|
187 |
int vm86; |
|
188 |
|
|
189 | 191 |
/* exception/interrupt handling */ |
190 | 192 |
jmp_buf jmp_env; |
191 | 193 |
int exception_index; |
192 | 194 |
int interrupt_request; |
195 |
|
|
196 |
/* user data */ |
|
197 |
void *opaque; |
|
193 | 198 |
} CPUX86State; |
194 | 199 |
|
195 | 200 |
/* all CPU memory access use these macros */ |
... | ... | |
418 | 423 |
#define GEN_FLAG_CODE32_SHIFT 0 |
419 | 424 |
#define GEN_FLAG_ADDSEG_SHIFT 1 |
420 | 425 |
#define GEN_FLAG_SS32_SHIFT 2 |
421 |
#define GEN_FLAG_ST_SHIFT 3 |
|
426 |
#define GEN_FLAG_VM_SHIFT 3 |
|
427 |
#define GEN_FLAG_ST_SHIFT 4 |
|
422 | 428 |
|
423 | 429 |
int cpu_x86_gen_code(uint8_t *gen_code_buf, int max_code_size, |
424 | 430 |
int *gen_code_size_ptr, |
Also available in: Unified diff