1 /* i386 execution defines */
3 typedef unsigned char uint8_t;
4 typedef unsigned short uint16_t;
5 typedef unsigned int uint32_t;
6 typedef unsigned long long uint64_t;
8 typedef signed char int8_t;
9 typedef signed short int16_t;
10 typedef signed int int32_t;
11 typedef signed long long int64_t;
17 (((uint32_t)(__x) & (uint32_t)0x000000ffUL) << 24) | \
18 (((uint32_t)(__x) & (uint32_t)0x0000ff00UL) << 8) | \
19 (((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >> 8) | \
20 (((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) )); \
26 typedef struct FILE FILE;
29 extern int fprintf(FILE *, const char *, ...);
30 extern int printf(const char *, ...);
33 register unsigned int T0
asm("ebx");
34 register unsigned int T1
asm("esi");
35 register unsigned int A0
asm("edi");
36 register struct CPUX86State
*env
asm("ebp");
39 register unsigned int EAX
asm("r16");
40 register unsigned int ECX
asm("r17");
41 register unsigned int EDX
asm("r18");
42 register unsigned int EBX
asm("r19");
43 register unsigned int ESP
asm("r20");
44 register unsigned int EBP
asm("r21");
45 register unsigned int ESI
asm("r22");
46 register unsigned int EDI
asm("r23");
47 register unsigned int T0
asm("r24");
48 register unsigned int T1
asm("r25");
49 register unsigned int A0
asm("r26");
50 register struct CPUX86State
*env
asm("r27");
51 #define USE_INT_TO_FLOAT_HELPERS
62 register unsigned int T0
asm("r4");
63 register unsigned int T1
asm("r5");
64 register unsigned int A0
asm("r6");
65 register struct CPUX86State
*env
asm("r7");
68 register unsigned int T0
asm("s0");
69 register unsigned int T1
asm("s1");
70 register unsigned int A0
asm("s2");
71 register struct CPUX86State
*env
asm("s3");
74 register unsigned int T0
asm("l0");
75 register unsigned int T1
asm("l1");
76 register unsigned int A0
asm("l2");
77 register struct CPUX86State
*env
asm("l3");
80 /* force GCC to generate only one epilog at the end of the function */
81 #define FORCE_RET() asm volatile ("");
87 #define xglue(x, y) x ## y
88 #define glue(x, y) xglue(x, y)
91 #define EAX (env->regs[R_EAX])
94 #define ECX (env->regs[R_ECX])
97 #define EDX (env->regs[R_EDX])
100 #define EBX (env->regs[R_EBX])
103 #define ESP (env->regs[R_ESP])
106 #define EBP (env->regs[R_EBP])
109 #define ESI (env->regs[R_ESI])
112 #define EDI (env->regs[R_EDI])
117 #define CC_SRC (env->cc_src)
118 #define CC_DST (env->cc_dst)
119 #define CC_OP (env->cc_op)
122 #define FT0 (env->ft0)
123 #define ST0 (env->fpregs[env->fpstt])
124 #define ST(n) (env->fpregs[(env->fpstt + (n)) & 7])
127 extern int __op_param1
, __op_param2
, __op_param3
;
128 #define PARAM1 ((long)(&__op_param1))
129 #define PARAM2 ((long)(&__op_param2))
130 #define PARAM3 ((long)(&__op_param3))
132 #include "cpu-i386.h"
134 typedef struct CCTable
{
135 int (*compute_all
)(void); /* return all the flags */
136 int (*compute_c
)(void); /* return the C flag */
139 extern CCTable cc_table
[];
141 void load_seg(int seg_reg
, int selector
);