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