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