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