blob: 68d57b130ad6729f684a1641c3da06e45e13be4d [file] [log] [blame]
pbrooka7812ae2008-11-17 14:43:54 +00001#include "def-helper.h"
bellardb5b38f62008-05-12 22:05:13 +00002
pbrooka7812ae2008-11-17 14:43:54 +00003DEF_HELPER_FLAGS_1(cc_compute_all, TCG_CALL_PURE, i32, int)
4DEF_HELPER_FLAGS_1(cc_compute_c, TCG_CALL_PURE, i32, int)
5
6DEF_HELPER_0(lock, void)
7DEF_HELPER_0(unlock, void)
8DEF_HELPER_2(write_eflags, void, tl, i32)
9DEF_HELPER_0(read_eflags, tl)
10DEF_HELPER_1(divb_AL, void, tl)
11DEF_HELPER_1(idivb_AL, void, tl)
12DEF_HELPER_1(divw_AX, void, tl)
13DEF_HELPER_1(idivw_AX, void, tl)
14DEF_HELPER_1(divl_EAX, void, tl)
15DEF_HELPER_1(idivl_EAX, void, tl)
bellard437a88a2008-05-22 16:11:04 +000016#ifdef TARGET_X86_64
pbrooka7812ae2008-11-17 14:43:54 +000017DEF_HELPER_1(mulq_EAX_T0, void, tl)
18DEF_HELPER_1(imulq_EAX_T0, void, tl)
19DEF_HELPER_2(imulq_T0_T1, tl, tl, tl)
20DEF_HELPER_1(divq_EAX, void, tl)
21DEF_HELPER_1(idivq_EAX, void, tl)
bellard437a88a2008-05-22 16:11:04 +000022#endif
bellardb5b38f62008-05-12 22:05:13 +000023
pbrooka7812ae2008-11-17 14:43:54 +000024DEF_HELPER_1(aam, void, int)
25DEF_HELPER_1(aad, void, int)
26DEF_HELPER_0(aaa, void)
27DEF_HELPER_0(aas, void)
28DEF_HELPER_0(daa, void)
29DEF_HELPER_0(das, void)
bellard437a88a2008-05-22 16:11:04 +000030
pbrooka7812ae2008-11-17 14:43:54 +000031DEF_HELPER_1(lsl, tl, tl)
32DEF_HELPER_1(lar, tl, tl)
33DEF_HELPER_1(verr, void, tl)
34DEF_HELPER_1(verw, void, tl)
35DEF_HELPER_1(lldt, void, int)
36DEF_HELPER_1(ltr, void, int)
37DEF_HELPER_2(load_seg, void, int, int)
38DEF_HELPER_3(ljmp_protected, void, int, tl, int)
39DEF_HELPER_4(lcall_real, void, int, tl, int, int)
40DEF_HELPER_4(lcall_protected, void, int, tl, int, int)
41DEF_HELPER_1(iret_real, void, int)
42DEF_HELPER_2(iret_protected, void, int, int)
43DEF_HELPER_2(lret_protected, void, int, int)
44DEF_HELPER_1(read_crN, tl, int)
45DEF_HELPER_2(write_crN, void, int, tl)
46DEF_HELPER_1(lmsw, void, tl)
47DEF_HELPER_0(clts, void)
48DEF_HELPER_2(movl_drN_T0, void, int, tl)
49DEF_HELPER_1(invlpg, void, tl)
bellardb5b38f62008-05-12 22:05:13 +000050
pbrooka7812ae2008-11-17 14:43:54 +000051DEF_HELPER_3(enter_level, void, int, int, tl)
bellardb5b38f62008-05-12 22:05:13 +000052#ifdef TARGET_X86_64
pbrooka7812ae2008-11-17 14:43:54 +000053DEF_HELPER_3(enter64_level, void, int, int, tl)
bellardb5b38f62008-05-12 22:05:13 +000054#endif
pbrooka7812ae2008-11-17 14:43:54 +000055DEF_HELPER_0(sysenter, void)
56DEF_HELPER_1(sysexit, void, int)
bellardb5b38f62008-05-12 22:05:13 +000057#ifdef TARGET_X86_64
pbrooka7812ae2008-11-17 14:43:54 +000058DEF_HELPER_1(syscall, void, int)
59DEF_HELPER_1(sysret, void, int)
bellardb5b38f62008-05-12 22:05:13 +000060#endif
pbrooka7812ae2008-11-17 14:43:54 +000061DEF_HELPER_1(hlt, void, int)
62DEF_HELPER_1(monitor, void, tl)
63DEF_HELPER_1(mwait, void, int)
64DEF_HELPER_0(debug, void)
Jan Kiszkaa2397802009-05-10 22:30:53 +020065DEF_HELPER_0(reset_rf, void)
pbrooka7812ae2008-11-17 14:43:54 +000066DEF_HELPER_2(raise_interrupt, void, int, int)
67DEF_HELPER_1(raise_exception, void, int)
68DEF_HELPER_0(cli, void)
69DEF_HELPER_0(sti, void)
70DEF_HELPER_0(set_inhibit_irq, void)
71DEF_HELPER_0(reset_inhibit_irq, void)
72DEF_HELPER_2(boundw, void, tl, int)
73DEF_HELPER_2(boundl, void, tl, int)
74DEF_HELPER_0(rsm, void)
75DEF_HELPER_1(into, void, int)
76DEF_HELPER_1(cmpxchg8b, void, tl)
bellard1b9d9eb2008-05-22 09:52:38 +000077#ifdef TARGET_X86_64
pbrooka7812ae2008-11-17 14:43:54 +000078DEF_HELPER_1(cmpxchg16b, void, tl)
bellard1b9d9eb2008-05-22 09:52:38 +000079#endif
pbrooka7812ae2008-11-17 14:43:54 +000080DEF_HELPER_0(single_step, void)
81DEF_HELPER_0(cpuid, void)
82DEF_HELPER_0(rdtsc, void)
83DEF_HELPER_0(rdpmc, void)
84DEF_HELPER_0(rdmsr, void)
85DEF_HELPER_0(wrmsr, void)
bellardb5b38f62008-05-12 22:05:13 +000086
pbrooka7812ae2008-11-17 14:43:54 +000087DEF_HELPER_1(check_iob, void, i32)
88DEF_HELPER_1(check_iow, void, i32)
89DEF_HELPER_1(check_iol, void, i32)
90DEF_HELPER_2(outb, void, i32, i32)
91DEF_HELPER_1(inb, tl, i32)
92DEF_HELPER_2(outw, void, i32, i32)
93DEF_HELPER_1(inw, tl, i32)
94DEF_HELPER_2(outl, void, i32, i32)
95DEF_HELPER_1(inl, tl, i32)
bellardb8b6a502008-05-15 16:46:30 +000096
pbrooka7812ae2008-11-17 14:43:54 +000097DEF_HELPER_2(svm_check_intercept_param, void, i32, i64)
98DEF_HELPER_2(vmexit, void, i32, i64)
99DEF_HELPER_3(svm_check_io, void, i32, i32, i32)
100DEF_HELPER_2(vmrun, void, int, int)
101DEF_HELPER_0(vmmcall, void)
102DEF_HELPER_1(vmload, void, int)
103DEF_HELPER_1(vmsave, void, int)
104DEF_HELPER_0(stgi, void)
105DEF_HELPER_0(clgi, void)
106DEF_HELPER_0(skinit, void)
107DEF_HELPER_1(invlpga, void, int)
bellard19e6c4b2008-05-12 19:10:44 +0000108
109/* x86 FPU */
110
pbrooka7812ae2008-11-17 14:43:54 +0000111DEF_HELPER_1(flds_FT0, void, i32)
112DEF_HELPER_1(fldl_FT0, void, i64)
113DEF_HELPER_1(fildl_FT0, void, s32)
114DEF_HELPER_1(flds_ST0, void, i32)
115DEF_HELPER_1(fldl_ST0, void, i64)
116DEF_HELPER_1(fildl_ST0, void, s32)
117DEF_HELPER_1(fildll_ST0, void, s64)
118DEF_HELPER_0(fsts_ST0, i32)
119DEF_HELPER_0(fstl_ST0, i64)
120DEF_HELPER_0(fist_ST0, s32)
121DEF_HELPER_0(fistl_ST0, s32)
122DEF_HELPER_0(fistll_ST0, s64)
123DEF_HELPER_0(fistt_ST0, s32)
124DEF_HELPER_0(fisttl_ST0, s32)
125DEF_HELPER_0(fisttll_ST0, s64)
126DEF_HELPER_1(fldt_ST0, void, tl)
127DEF_HELPER_1(fstt_ST0, void, tl)
128DEF_HELPER_0(fpush, void)
129DEF_HELPER_0(fpop, void)
130DEF_HELPER_0(fdecstp, void)
131DEF_HELPER_0(fincstp, void)
132DEF_HELPER_1(ffree_STN, void, int)
133DEF_HELPER_0(fmov_ST0_FT0, void)
134DEF_HELPER_1(fmov_FT0_STN, void, int)
135DEF_HELPER_1(fmov_ST0_STN, void, int)
136DEF_HELPER_1(fmov_STN_ST0, void, int)
137DEF_HELPER_1(fxchg_ST0_STN, void, int)
138DEF_HELPER_0(fcom_ST0_FT0, void)
139DEF_HELPER_0(fucom_ST0_FT0, void)
140DEF_HELPER_0(fcomi_ST0_FT0, void)
141DEF_HELPER_0(fucomi_ST0_FT0, void)
142DEF_HELPER_0(fadd_ST0_FT0, void)
143DEF_HELPER_0(fmul_ST0_FT0, void)
144DEF_HELPER_0(fsub_ST0_FT0, void)
145DEF_HELPER_0(fsubr_ST0_FT0, void)
146DEF_HELPER_0(fdiv_ST0_FT0, void)
147DEF_HELPER_0(fdivr_ST0_FT0, void)
148DEF_HELPER_1(fadd_STN_ST0, void, int)
149DEF_HELPER_1(fmul_STN_ST0, void, int)
150DEF_HELPER_1(fsub_STN_ST0, void, int)
151DEF_HELPER_1(fsubr_STN_ST0, void, int)
152DEF_HELPER_1(fdiv_STN_ST0, void, int)
153DEF_HELPER_1(fdivr_STN_ST0, void, int)
154DEF_HELPER_0(fchs_ST0, void)
155DEF_HELPER_0(fabs_ST0, void)
156DEF_HELPER_0(fxam_ST0, void)
157DEF_HELPER_0(fld1_ST0, void)
158DEF_HELPER_0(fldl2t_ST0, void)
159DEF_HELPER_0(fldl2e_ST0, void)
160DEF_HELPER_0(fldpi_ST0, void)
161DEF_HELPER_0(fldlg2_ST0, void)
162DEF_HELPER_0(fldln2_ST0, void)
163DEF_HELPER_0(fldz_ST0, void)
164DEF_HELPER_0(fldz_FT0, void)
165DEF_HELPER_0(fnstsw, i32)
166DEF_HELPER_0(fnstcw, i32)
167DEF_HELPER_1(fldcw, void, i32)
168DEF_HELPER_0(fclex, void)
169DEF_HELPER_0(fwait, void)
170DEF_HELPER_0(fninit, void)
171DEF_HELPER_1(fbld_ST0, void, tl)
172DEF_HELPER_1(fbst_ST0, void, tl)
173DEF_HELPER_0(f2xm1, void)
174DEF_HELPER_0(fyl2x, void)
175DEF_HELPER_0(fptan, void)
176DEF_HELPER_0(fpatan, void)
177DEF_HELPER_0(fxtract, void)
178DEF_HELPER_0(fprem1, void)
179DEF_HELPER_0(fprem, void)
180DEF_HELPER_0(fyl2xp1, void)
181DEF_HELPER_0(fsqrt, void)
182DEF_HELPER_0(fsincos, void)
183DEF_HELPER_0(frndint, void)
184DEF_HELPER_0(fscale, void)
185DEF_HELPER_0(fsin, void)
186DEF_HELPER_0(fcos, void)
187DEF_HELPER_2(fstenv, void, tl, int)
188DEF_HELPER_2(fldenv, void, tl, int)
189DEF_HELPER_2(fsave, void, tl, int)
190DEF_HELPER_2(frstor, void, tl, int)
191DEF_HELPER_2(fxsave, void, tl, int)
192DEF_HELPER_2(fxrstor, void, tl, int)
193DEF_HELPER_1(bsf, tl, tl)
194DEF_HELPER_1(bsr, tl, tl)
bellard19e6c4b2008-05-12 19:10:44 +0000195
196/* MMX/SSE */
197
pbrooka7812ae2008-11-17 14:43:54 +0000198DEF_HELPER_0(enter_mmx, void)
199DEF_HELPER_0(emms, void)
200DEF_HELPER_2(movq, void, ptr, ptr)
bellard5af45182008-05-12 16:47:36 +0000201
202#define SHIFT 0
203#include "ops_sse_header.h"
204#define SHIFT 1
205#include "ops_sse_header.h"
206
pbrooka7812ae2008-11-17 14:43:54 +0000207DEF_HELPER_2(rclb, tl, tl, tl)
208DEF_HELPER_2(rclw, tl, tl, tl)
209DEF_HELPER_2(rcll, tl, tl, tl)
210DEF_HELPER_2(rcrb, tl, tl, tl)
211DEF_HELPER_2(rcrw, tl, tl, tl)
212DEF_HELPER_2(rcrl, tl, tl, tl)
bellardb6abf972008-05-17 12:44:31 +0000213#ifdef TARGET_X86_64
pbrooka7812ae2008-11-17 14:43:54 +0000214DEF_HELPER_2(rclq, tl, tl, tl)
215DEF_HELPER_2(rcrq, tl, tl, tl)
bellardb6abf972008-05-17 12:44:31 +0000216#endif
217
pbrooka7812ae2008-11-17 14:43:54 +0000218#include "def-helper.h"