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