1 | #ifndef DEF_HELPER
|
---|
2 | #define DEF_HELPER(ret, name, params) ret name params;
|
---|
3 | #endif
|
---|
4 |
|
---|
5 | DEF_HELPER(void, helper_lock, (void))
|
---|
6 | DEF_HELPER(void, helper_unlock, (void))
|
---|
7 | DEF_HELPER(void, helper_write_eflags, (target_ulong t0, uint32_t update_mask))
|
---|
8 | DEF_HELPER(target_ulong, helper_read_eflags, (void))
|
---|
9 | #ifdef VBOX
|
---|
10 | DEF_HELPER(void, helper_write_eflags_vme, (target_ulong t0))
|
---|
11 | DEF_HELPER(target_ulong, helper_read_eflags_vme, (void))
|
---|
12 | #endif
|
---|
13 | DEF_HELPER(void, helper_divb_AL, (target_ulong t0))
|
---|
14 | DEF_HELPER(void, helper_idivb_AL, (target_ulong t0))
|
---|
15 | DEF_HELPER(void, helper_divw_AX, (target_ulong t0))
|
---|
16 | DEF_HELPER(void, helper_idivw_AX, (target_ulong t0))
|
---|
17 | DEF_HELPER(void, helper_divl_EAX, (target_ulong t0))
|
---|
18 | DEF_HELPER(void, helper_idivl_EAX, (target_ulong t0))
|
---|
19 | #ifdef TARGET_X86_64
|
---|
20 | DEF_HELPER(void, helper_mulq_EAX_T0, (target_ulong t0))
|
---|
21 | DEF_HELPER(void, helper_imulq_EAX_T0, (target_ulong t0))
|
---|
22 | DEF_HELPER(target_ulong, helper_imulq_T0_T1, (target_ulong t0, target_ulong t1))
|
---|
23 | DEF_HELPER(void, helper_divq_EAX, (target_ulong t0))
|
---|
24 | DEF_HELPER(void, helper_idivq_EAX, (target_ulong t0))
|
---|
25 | #endif
|
---|
26 |
|
---|
27 | DEF_HELPER(void, helper_aam, (int base))
|
---|
28 | DEF_HELPER(void, helper_aad, (int base))
|
---|
29 | DEF_HELPER(void, helper_aaa, (void))
|
---|
30 | DEF_HELPER(void, helper_aas, (void))
|
---|
31 | DEF_HELPER(void, helper_daa, (void))
|
---|
32 | DEF_HELPER(void, helper_das, (void))
|
---|
33 |
|
---|
34 | DEF_HELPER(target_ulong, helper_lsl, (target_ulong selector1))
|
---|
35 | DEF_HELPER(target_ulong, helper_lar, (target_ulong selector1))
|
---|
36 | DEF_HELPER(void, helper_verr, (target_ulong selector1))
|
---|
37 | DEF_HELPER(void, helper_verw, (target_ulong selector1))
|
---|
38 | DEF_HELPER(void, helper_lldt, (int selector))
|
---|
39 | DEF_HELPER(void, helper_ltr, (int selector))
|
---|
40 | DEF_HELPER(void, helper_load_seg, (int seg_reg, int selector))
|
---|
41 | DEF_HELPER(void, helper_ljmp_protected, (int new_cs, target_ulong new_eip,
|
---|
42 | int next_eip_addend))
|
---|
43 | DEF_HELPER(void, helper_lcall_real, (int new_cs, target_ulong new_eip1,
|
---|
44 | int shift, int next_eip))
|
---|
45 | DEF_HELPER(void, helper_lcall_protected, (int new_cs, target_ulong new_eip,
|
---|
46 | int shift, int next_eip_addend))
|
---|
47 | DEF_HELPER(void, helper_iret_real, (int shift))
|
---|
48 | DEF_HELPER(void, helper_iret_protected, (int shift, int next_eip))
|
---|
49 | DEF_HELPER(void, helper_lret_protected, (int shift, int addend))
|
---|
50 | DEF_HELPER(target_ulong, helper_read_crN, (int reg))
|
---|
51 | DEF_HELPER(void, helper_write_crN, (int reg, target_ulong t0))
|
---|
52 | DEF_HELPER(void, helper_lmsw, (target_ulong t0))
|
---|
53 | DEF_HELPER(void, helper_clts, (void))
|
---|
54 | DEF_HELPER(void, helper_movl_drN_T0, (int reg, target_ulong t0))
|
---|
55 | DEF_HELPER(void, helper_invlpg, (target_ulong addr))
|
---|
56 |
|
---|
57 | DEF_HELPER(void, helper_enter_level, (int level, int data32, target_ulong t1))
|
---|
58 | #ifdef TARGET_X86_64
|
---|
59 | DEF_HELPER(void, helper_enter64_level, (int level, int data64, target_ulong t1))
|
---|
60 | #endif
|
---|
61 | DEF_HELPER(void, helper_sysenter, (void))
|
---|
62 | DEF_HELPER(void, helper_sysexit, (int dflag))
|
---|
63 | #ifdef TARGET_X86_64
|
---|
64 | DEF_HELPER(void, helper_syscall, (int next_eip_addend))
|
---|
65 | DEF_HELPER(void, helper_sysret, (int dflag))
|
---|
66 | #endif
|
---|
67 | DEF_HELPER(void, helper_hlt, (int next_eip_addend))
|
---|
68 | DEF_HELPER(void, helper_monitor, (target_ulong ptr))
|
---|
69 | DEF_HELPER(void, helper_mwait, (int next_eip_addend))
|
---|
70 | DEF_HELPER(void, helper_debug, (void))
|
---|
71 | DEF_HELPER(void, helper_raise_interrupt, (int intno, int next_eip_addend))
|
---|
72 | DEF_HELPER(void, helper_raise_exception, (int exception_index))
|
---|
73 | DEF_HELPER(void, helper_cli, (void))
|
---|
74 | DEF_HELPER(void, helper_sti, (void))
|
---|
75 | #ifdef VBOX
|
---|
76 | DEF_HELPER(void, helper_cli_vme, (void))
|
---|
77 | DEF_HELPER(void, helper_sti_vme, (void))
|
---|
78 | #endif
|
---|
79 | DEF_HELPER(void, helper_set_inhibit_irq, (void))
|
---|
80 | DEF_HELPER(void, helper_reset_inhibit_irq, (void))
|
---|
81 | DEF_HELPER(void, helper_boundw, (target_ulong a0, int v))
|
---|
82 | DEF_HELPER(void, helper_boundl, (target_ulong a0, int v))
|
---|
83 | DEF_HELPER(void, helper_rsm, (void))
|
---|
84 | DEF_HELPER(void, helper_into, (int next_eip_addend))
|
---|
85 | DEF_HELPER(void, helper_cmpxchg8b, (target_ulong a0))
|
---|
86 | #ifdef TARGET_X86_64
|
---|
87 | DEF_HELPER(void, helper_cmpxchg16b, (target_ulong a0))
|
---|
88 | #endif
|
---|
89 | DEF_HELPER(void, helper_single_step, (void))
|
---|
90 | DEF_HELPER(void, helper_cpuid, (void))
|
---|
91 | DEF_HELPER(void, helper_rdtsc, (void))
|
---|
92 | DEF_HELPER(void, helper_rdpmc, (void))
|
---|
93 | DEF_HELPER(void, helper_rdmsr, (void))
|
---|
94 | DEF_HELPER(void, helper_wrmsr, (void))
|
---|
95 | #ifdef VBOX
|
---|
96 | DEF_HELPER(void, helper_rdtscp, (void))
|
---|
97 | #endif
|
---|
98 |
|
---|
99 | DEF_HELPER(void, helper_check_iob, (uint32_t t0))
|
---|
100 | DEF_HELPER(void, helper_check_iow, (uint32_t t0))
|
---|
101 | DEF_HELPER(void, helper_check_iol, (uint32_t t0))
|
---|
102 | #ifdef VBOX
|
---|
103 | DEF_HELPER(void, helper_check_external_event, (void))
|
---|
104 | DEF_HELPER(void, helper_dump_state, (void))
|
---|
105 | DEF_HELPER(void, helper_sync_seg, (uint32_t t0))
|
---|
106 | #endif
|
---|
107 | DEF_HELPER(void, helper_outb, (uint32_t port, uint32_t data))
|
---|
108 | DEF_HELPER(target_ulong, helper_inb, (uint32_t port))
|
---|
109 | DEF_HELPER(void, helper_outw, (uint32_t port, uint32_t data))
|
---|
110 | DEF_HELPER(target_ulong, helper_inw, (uint32_t port))
|
---|
111 | DEF_HELPER(void, helper_outl, (uint32_t port, uint32_t data))
|
---|
112 | DEF_HELPER(target_ulong, helper_inl, (uint32_t port))
|
---|
113 |
|
---|
114 | DEF_HELPER(void, helper_svm_check_intercept_param, (uint32_t type, uint64_t param))
|
---|
115 | DEF_HELPER(void, helper_vmexit, (uint32_t exit_code, uint64_t exit_info_1))
|
---|
116 | DEF_HELPER(void, helper_svm_check_io, (uint32_t port, uint32_t param,
|
---|
117 | uint32_t next_eip_addend))
|
---|
118 | DEF_HELPER(void, helper_vmrun, (int aflag, int next_eip_addend))
|
---|
119 | DEF_HELPER(void, helper_vmmcall, (void))
|
---|
120 | DEF_HELPER(void, helper_vmload, (int aflag))
|
---|
121 | DEF_HELPER(void, helper_vmsave, (int aflag))
|
---|
122 | DEF_HELPER(void, helper_stgi, (void))
|
---|
123 | DEF_HELPER(void, helper_clgi, (void))
|
---|
124 | DEF_HELPER(void, helper_skinit, (void))
|
---|
125 | DEF_HELPER(void, helper_invlpga, (int aflag))
|
---|
126 |
|
---|
127 | /* x86 FPU */
|
---|
128 |
|
---|
129 | DEF_HELPER(void, helper_flds_FT0, (uint32_t val))
|
---|
130 | DEF_HELPER(void, helper_fldl_FT0, (uint64_t val))
|
---|
131 | DEF_HELPER(void, helper_fildl_FT0, (int32_t val))
|
---|
132 | DEF_HELPER(void, helper_flds_ST0, (uint32_t val))
|
---|
133 | DEF_HELPER(void, helper_fldl_ST0, (uint64_t val))
|
---|
134 | DEF_HELPER(void, helper_fildl_ST0, (int32_t val))
|
---|
135 | DEF_HELPER(void, helper_fildll_ST0, (int64_t val))
|
---|
136 | #ifndef VBOX
|
---|
137 | DEF_HELPER(uint32_t, helper_fsts_ST0, (void))
|
---|
138 | DEF_HELPER(uint64_t, helper_fstl_ST0, (void))
|
---|
139 | DEF_HELPER(int32_t, helper_fist_ST0, (void))
|
---|
140 | DEF_HELPER(int32_t, helper_fistl_ST0, (void))
|
---|
141 | DEF_HELPER(int64_t, helper_fistll_ST0, (void))
|
---|
142 | DEF_HELPER(int32_t, helper_fistt_ST0, (void))
|
---|
143 | DEF_HELPER(int32_t, helper_fisttl_ST0, (void))
|
---|
144 | DEF_HELPER(int64_t, helper_fisttll_ST0, (void))
|
---|
145 | #else
|
---|
146 | DEF_HELPER(RTCCUINTREG, helper_fsts_ST0, (void))
|
---|
147 | DEF_HELPER(uint64_t, helper_fstl_ST0, (void))
|
---|
148 | DEF_HELPER(RTCCINTREG, helper_fist_ST0, (void))
|
---|
149 | DEF_HELPER(RTCCINTREG, helper_fistl_ST0, (void))
|
---|
150 | DEF_HELPER(int64_t, helper_fistll_ST0, (void))
|
---|
151 | DEF_HELPER(RTCCINTREG, helper_fistt_ST0, (void))
|
---|
152 | DEF_HELPER(RTCCINTREG, helper_fisttl_ST0, (void))
|
---|
153 | DEF_HELPER(int64_t, helper_fisttll_ST0, (void))
|
---|
154 | #endif
|
---|
155 | DEF_HELPER(void, helper_fldt_ST0, (target_ulong ptr))
|
---|
156 | DEF_HELPER(void, helper_fstt_ST0, (target_ulong ptr))
|
---|
157 | DEF_HELPER(void, helper_fpush, (void))
|
---|
158 | DEF_HELPER(void, helper_fpop, (void))
|
---|
159 | DEF_HELPER(void, helper_fdecstp, (void))
|
---|
160 | DEF_HELPER(void, helper_fincstp, (void))
|
---|
161 | DEF_HELPER(void, helper_ffree_STN, (int st_index))
|
---|
162 | DEF_HELPER(void, helper_fmov_ST0_FT0, (void))
|
---|
163 | DEF_HELPER(void, helper_fmov_FT0_STN, (int st_index))
|
---|
164 | DEF_HELPER(void, helper_fmov_ST0_STN, (int st_index))
|
---|
165 | DEF_HELPER(void, helper_fmov_STN_ST0, (int st_index))
|
---|
166 | DEF_HELPER(void, helper_fxchg_ST0_STN, (int st_index))
|
---|
167 | DEF_HELPER(void, helper_fcom_ST0_FT0, (void))
|
---|
168 | DEF_HELPER(void, helper_fucom_ST0_FT0, (void))
|
---|
169 | DEF_HELPER(void, helper_fcomi_ST0_FT0, (void))
|
---|
170 | DEF_HELPER(void, helper_fucomi_ST0_FT0, (void))
|
---|
171 | DEF_HELPER(void, helper_fadd_ST0_FT0, (void))
|
---|
172 | DEF_HELPER(void, helper_fmul_ST0_FT0, (void))
|
---|
173 | DEF_HELPER(void, helper_fsub_ST0_FT0, (void))
|
---|
174 | DEF_HELPER(void, helper_fsubr_ST0_FT0, (void))
|
---|
175 | DEF_HELPER(void, helper_fdiv_ST0_FT0, (void))
|
---|
176 | DEF_HELPER(void, helper_fdivr_ST0_FT0, (void))
|
---|
177 | DEF_HELPER(void, helper_fadd_STN_ST0, (int st_index))
|
---|
178 | DEF_HELPER(void, helper_fmul_STN_ST0, (int st_index))
|
---|
179 | DEF_HELPER(void, helper_fsub_STN_ST0, (int st_index))
|
---|
180 | DEF_HELPER(void, helper_fsubr_STN_ST0, (int st_index))
|
---|
181 | DEF_HELPER(void, helper_fdiv_STN_ST0, (int st_index))
|
---|
182 | DEF_HELPER(void, helper_fdivr_STN_ST0, (int st_index))
|
---|
183 | DEF_HELPER(void, helper_fchs_ST0, (void))
|
---|
184 | DEF_HELPER(void, helper_fabs_ST0, (void))
|
---|
185 | DEF_HELPER(void, helper_fxam_ST0, (void))
|
---|
186 | DEF_HELPER(void, helper_fld1_ST0, (void))
|
---|
187 | DEF_HELPER(void, helper_fldl2t_ST0, (void))
|
---|
188 | DEF_HELPER(void, helper_fldl2e_ST0, (void))
|
---|
189 | DEF_HELPER(void, helper_fldpi_ST0, (void))
|
---|
190 | DEF_HELPER(void, helper_fldlg2_ST0, (void))
|
---|
191 | DEF_HELPER(void, helper_fldln2_ST0, (void))
|
---|
192 | DEF_HELPER(void, helper_fldz_ST0, (void))
|
---|
193 | DEF_HELPER(void, helper_fldz_FT0, (void))
|
---|
194 | #ifndef VBOX
|
---|
195 | DEF_HELPER(uint32_t, helper_fnstsw, (void))
|
---|
196 | DEF_HELPER(uint32_t, helper_fnstcw, (void))
|
---|
197 | #else
|
---|
198 | DEF_HELPER(RTCCUINTREG, helper_fnstsw, (void))
|
---|
199 | DEF_HELPER(RTCCUINTREG, helper_fnstcw, (void))
|
---|
200 | #endif
|
---|
201 | DEF_HELPER(void, helper_fldcw, (uint32_t val))
|
---|
202 | DEF_HELPER(void, helper_fclex, (void))
|
---|
203 | DEF_HELPER(void, helper_fwait, (void))
|
---|
204 | DEF_HELPER(void, helper_fninit, (void))
|
---|
205 | DEF_HELPER(void, helper_fbld_ST0, (target_ulong ptr))
|
---|
206 | DEF_HELPER(void, helper_fbst_ST0, (target_ulong ptr))
|
---|
207 | DEF_HELPER(void, helper_f2xm1, (void))
|
---|
208 | DEF_HELPER(void, helper_fyl2x, (void))
|
---|
209 | DEF_HELPER(void, helper_fptan, (void))
|
---|
210 | DEF_HELPER(void, helper_fpatan, (void))
|
---|
211 | DEF_HELPER(void, helper_fxtract, (void))
|
---|
212 | DEF_HELPER(void, helper_fprem1, (void))
|
---|
213 | DEF_HELPER(void, helper_fprem, (void))
|
---|
214 | DEF_HELPER(void, helper_fyl2xp1, (void))
|
---|
215 | DEF_HELPER(void, helper_fsqrt, (void))
|
---|
216 | DEF_HELPER(void, helper_fsincos, (void))
|
---|
217 | DEF_HELPER(void, helper_frndint, (void))
|
---|
218 | DEF_HELPER(void, helper_fscale, (void))
|
---|
219 | DEF_HELPER(void, helper_fsin, (void))
|
---|
220 | DEF_HELPER(void, helper_fcos, (void))
|
---|
221 | DEF_HELPER(void, helper_fstenv, (target_ulong ptr, int data32))
|
---|
222 | DEF_HELPER(void, helper_fldenv, (target_ulong ptr, int data32))
|
---|
223 | DEF_HELPER(void, helper_fsave, (target_ulong ptr, int data32))
|
---|
224 | DEF_HELPER(void, helper_frstor, (target_ulong ptr, int data32))
|
---|
225 | DEF_HELPER(void, helper_fxsave, (target_ulong ptr, int data64))
|
---|
226 | DEF_HELPER(void, helper_fxrstor, (target_ulong ptr, int data64))
|
---|
227 | DEF_HELPER(target_ulong, helper_bsf, (target_ulong t0))
|
---|
228 | DEF_HELPER(target_ulong, helper_bsr, (target_ulong t0))
|
---|
229 |
|
---|
230 | /* MMX/SSE */
|
---|
231 |
|
---|
232 | DEF_HELPER(void, helper_enter_mmx, (void))
|
---|
233 | DEF_HELPER(void, helper_emms, (void))
|
---|
234 | DEF_HELPER(void, helper_movq, (uint64_t *d, uint64_t *s))
|
---|
235 |
|
---|
236 | #define SHIFT 0
|
---|
237 | #include "ops_sse_header.h"
|
---|
238 | #define SHIFT 1
|
---|
239 | #include "ops_sse_header.h"
|
---|
240 |
|
---|
241 | DEF_HELPER(target_ulong, helper_rclb, (target_ulong t0, target_ulong t1))
|
---|
242 | DEF_HELPER(target_ulong, helper_rclw, (target_ulong t0, target_ulong t1))
|
---|
243 | DEF_HELPER(target_ulong, helper_rcll, (target_ulong t0, target_ulong t1))
|
---|
244 | DEF_HELPER(target_ulong, helper_rcrb, (target_ulong t0, target_ulong t1))
|
---|
245 | DEF_HELPER(target_ulong, helper_rcrw, (target_ulong t0, target_ulong t1))
|
---|
246 | DEF_HELPER(target_ulong, helper_rcrl, (target_ulong t0, target_ulong t1))
|
---|
247 | #ifdef TARGET_X86_64
|
---|
248 | DEF_HELPER(target_ulong, helper_rclq, (target_ulong t0, target_ulong t1))
|
---|
249 | DEF_HELPER(target_ulong, helper_rcrq, (target_ulong t0, target_ulong t1))
|
---|
250 | #endif
|
---|
251 |
|
---|
252 | #ifdef VBOX
|
---|
253 | void helper_external_event(void);
|
---|
254 | void helper_record_call(void);
|
---|
255 |
|
---|
256 | /* in op_helper.c */
|
---|
257 | void sync_seg(CPUX86State *env1, int seg_reg, int selector);
|
---|
258 | void sync_ldtr(CPUX86State *env1, int selector);
|
---|
259 |
|
---|
260 | #endif
|
---|
261 |
|
---|
262 | #undef DEF_HELPER
|
---|