helper.h (8578B)
1DEF_HELPER_FLAGS_4(cc_compute_all, TCG_CALL_NO_RWG_SE, tl, tl, tl, tl, int) 2DEF_HELPER_FLAGS_4(cc_compute_c, TCG_CALL_NO_RWG_SE, tl, tl, tl, tl, int) 3 4DEF_HELPER_3(write_eflags, void, env, tl, i32) 5DEF_HELPER_1(read_eflags, tl, env) 6DEF_HELPER_2(divb_AL, void, env, tl) 7DEF_HELPER_2(idivb_AL, void, env, tl) 8DEF_HELPER_2(divw_AX, void, env, tl) 9DEF_HELPER_2(idivw_AX, void, env, tl) 10DEF_HELPER_2(divl_EAX, void, env, tl) 11DEF_HELPER_2(idivl_EAX, void, env, tl) 12#ifdef TARGET_X86_64 13DEF_HELPER_2(divq_EAX, void, env, tl) 14DEF_HELPER_2(idivq_EAX, void, env, tl) 15#endif 16DEF_HELPER_FLAGS_2(cr4_testbit, TCG_CALL_NO_WG, void, env, i32) 17 18DEF_HELPER_FLAGS_2(bndck, TCG_CALL_NO_WG, void, env, i32) 19DEF_HELPER_FLAGS_3(bndldx32, TCG_CALL_NO_WG, i64, env, tl, tl) 20DEF_HELPER_FLAGS_3(bndldx64, TCG_CALL_NO_WG, i64, env, tl, tl) 21DEF_HELPER_FLAGS_5(bndstx32, TCG_CALL_NO_WG, void, env, tl, tl, i64, i64) 22DEF_HELPER_FLAGS_5(bndstx64, TCG_CALL_NO_WG, void, env, tl, tl, i64, i64) 23DEF_HELPER_1(bnd_jmp, void, env) 24 25DEF_HELPER_2(aam, void, env, int) 26DEF_HELPER_2(aad, void, env, int) 27DEF_HELPER_1(aaa, void, env) 28DEF_HELPER_1(aas, void, env) 29DEF_HELPER_1(daa, void, env) 30DEF_HELPER_1(das, void, env) 31 32DEF_HELPER_2(lsl, tl, env, tl) 33DEF_HELPER_2(lar, tl, env, tl) 34DEF_HELPER_2(verr, void, env, tl) 35DEF_HELPER_2(verw, void, env, tl) 36DEF_HELPER_2(lldt, void, env, int) 37DEF_HELPER_2(ltr, void, env, int) 38DEF_HELPER_3(load_seg, void, env, int, int) 39DEF_HELPER_4(ljmp_protected, void, env, int, tl, tl) 40DEF_HELPER_5(lcall_real, void, env, int, tl, int, int) 41DEF_HELPER_5(lcall_protected, void, env, int, tl, int, tl) 42DEF_HELPER_2(iret_real, void, env, int) 43DEF_HELPER_3(iret_protected, void, env, int, int) 44DEF_HELPER_3(lret_protected, void, env, int, int) 45DEF_HELPER_1(clts, void, env) 46 47#ifndef CONFIG_USER_ONLY 48DEF_HELPER_FLAGS_3(set_dr, TCG_CALL_NO_WG, void, env, int, tl) 49DEF_HELPER_FLAGS_2(get_dr, TCG_CALL_NO_WG, tl, env, int) 50#endif /* !CONFIG_USER_ONLY */ 51 52DEF_HELPER_1(sysenter, void, env) 53DEF_HELPER_2(sysexit, void, env, int) 54#ifdef TARGET_X86_64 55DEF_HELPER_2(syscall, void, env, int) 56DEF_HELPER_2(sysret, void, env, int) 57#endif 58DEF_HELPER_FLAGS_2(pause, TCG_CALL_NO_WG, noreturn, env, int) 59DEF_HELPER_FLAGS_1(debug, TCG_CALL_NO_WG, noreturn, env) 60DEF_HELPER_1(reset_rf, void, env) 61DEF_HELPER_FLAGS_3(raise_interrupt, TCG_CALL_NO_WG, noreturn, env, int, int) 62DEF_HELPER_FLAGS_2(raise_exception, TCG_CALL_NO_WG, noreturn, env, int) 63DEF_HELPER_1(cli, void, env) 64DEF_HELPER_1(sti, void, env) 65DEF_HELPER_1(clac, void, env) 66DEF_HELPER_1(stac, void, env) 67DEF_HELPER_3(boundw, void, env, tl, int) 68DEF_HELPER_3(boundl, void, env, tl, int) 69 70#ifndef CONFIG_USER_ONLY 71DEF_HELPER_1(rsm, void, env) 72#endif /* !CONFIG_USER_ONLY */ 73 74DEF_HELPER_2(into, void, env, int) 75DEF_HELPER_2(cmpxchg8b_unlocked, void, env, tl) 76DEF_HELPER_2(cmpxchg8b, void, env, tl) 77#ifdef TARGET_X86_64 78DEF_HELPER_2(cmpxchg16b_unlocked, void, env, tl) 79DEF_HELPER_2(cmpxchg16b, void, env, tl) 80#endif 81DEF_HELPER_FLAGS_1(single_step, TCG_CALL_NO_WG, noreturn, env) 82DEF_HELPER_1(rechecking_single_step, void, env) 83DEF_HELPER_1(cpuid, void, env) 84DEF_HELPER_1(rdtsc, void, env) 85DEF_HELPER_1(rdtscp, void, env) 86DEF_HELPER_FLAGS_1(rdpmc, TCG_CALL_NO_WG, noreturn, env) 87 88#ifndef CONFIG_USER_ONLY 89DEF_HELPER_3(outb, void, env, i32, i32) 90DEF_HELPER_2(inb, tl, env, i32) 91DEF_HELPER_3(outw, void, env, i32, i32) 92DEF_HELPER_2(inw, tl, env, i32) 93DEF_HELPER_3(outl, void, env, i32, i32) 94DEF_HELPER_2(inl, tl, env, i32) 95DEF_HELPER_FLAGS_3(check_io, TCG_CALL_NO_WG, void, env, i32, i32) 96DEF_HELPER_FLAGS_4(bpt_io, TCG_CALL_NO_WG, void, env, i32, i32, tl) 97DEF_HELPER_2(svm_check_intercept, void, env, i32) 98DEF_HELPER_4(svm_check_io, void, env, i32, i32, i32) 99DEF_HELPER_3(vmrun, void, env, int, int) 100DEF_HELPER_1(vmmcall, void, env) 101DEF_HELPER_2(vmload, void, env, int) 102DEF_HELPER_2(vmsave, void, env, int) 103DEF_HELPER_1(stgi, void, env) 104DEF_HELPER_1(clgi, void, env) 105DEF_HELPER_FLAGS_2(flush_page, TCG_CALL_NO_RWG, void, env, tl) 106DEF_HELPER_FLAGS_2(hlt, TCG_CALL_NO_WG, noreturn, env, int) 107DEF_HELPER_FLAGS_2(monitor, TCG_CALL_NO_WG, void, env, tl) 108DEF_HELPER_FLAGS_2(mwait, TCG_CALL_NO_WG, noreturn, env, int) 109DEF_HELPER_1(rdmsr, void, env) 110DEF_HELPER_1(wrmsr, void, env) 111DEF_HELPER_FLAGS_2(read_crN, TCG_CALL_NO_RWG, tl, env, int) 112DEF_HELPER_FLAGS_3(write_crN, TCG_CALL_NO_RWG, void, env, int, tl) 113#endif /* !CONFIG_USER_ONLY */ 114 115/* x86 FPU */ 116 117DEF_HELPER_2(flds_FT0, void, env, i32) 118DEF_HELPER_2(fldl_FT0, void, env, i64) 119DEF_HELPER_2(fildl_FT0, void, env, s32) 120DEF_HELPER_2(flds_ST0, void, env, i32) 121DEF_HELPER_2(fldl_ST0, void, env, i64) 122DEF_HELPER_2(fildl_ST0, void, env, s32) 123DEF_HELPER_2(fildll_ST0, void, env, s64) 124DEF_HELPER_1(fsts_ST0, i32, env) 125DEF_HELPER_1(fstl_ST0, i64, env) 126DEF_HELPER_1(fist_ST0, s32, env) 127DEF_HELPER_1(fistl_ST0, s32, env) 128DEF_HELPER_1(fistll_ST0, s64, env) 129DEF_HELPER_1(fistt_ST0, s32, env) 130DEF_HELPER_1(fisttl_ST0, s32, env) 131DEF_HELPER_1(fisttll_ST0, s64, env) 132DEF_HELPER_2(fldt_ST0, void, env, tl) 133DEF_HELPER_2(fstt_ST0, void, env, tl) 134DEF_HELPER_1(fpush, void, env) 135DEF_HELPER_1(fpop, void, env) 136DEF_HELPER_1(fdecstp, void, env) 137DEF_HELPER_1(fincstp, void, env) 138DEF_HELPER_2(ffree_STN, void, env, int) 139DEF_HELPER_1(fmov_ST0_FT0, void, env) 140DEF_HELPER_2(fmov_FT0_STN, void, env, int) 141DEF_HELPER_2(fmov_ST0_STN, void, env, int) 142DEF_HELPER_2(fmov_STN_ST0, void, env, int) 143DEF_HELPER_2(fxchg_ST0_STN, void, env, int) 144DEF_HELPER_1(fcom_ST0_FT0, void, env) 145DEF_HELPER_1(fucom_ST0_FT0, void, env) 146DEF_HELPER_1(fcomi_ST0_FT0, void, env) 147DEF_HELPER_1(fucomi_ST0_FT0, void, env) 148DEF_HELPER_1(fadd_ST0_FT0, void, env) 149DEF_HELPER_1(fmul_ST0_FT0, void, env) 150DEF_HELPER_1(fsub_ST0_FT0, void, env) 151DEF_HELPER_1(fsubr_ST0_FT0, void, env) 152DEF_HELPER_1(fdiv_ST0_FT0, void, env) 153DEF_HELPER_1(fdivr_ST0_FT0, void, env) 154DEF_HELPER_2(fadd_STN_ST0, void, env, int) 155DEF_HELPER_2(fmul_STN_ST0, void, env, int) 156DEF_HELPER_2(fsub_STN_ST0, void, env, int) 157DEF_HELPER_2(fsubr_STN_ST0, void, env, int) 158DEF_HELPER_2(fdiv_STN_ST0, void, env, int) 159DEF_HELPER_2(fdivr_STN_ST0, void, env, int) 160DEF_HELPER_1(fchs_ST0, void, env) 161DEF_HELPER_1(fabs_ST0, void, env) 162DEF_HELPER_1(fxam_ST0, void, env) 163DEF_HELPER_1(fld1_ST0, void, env) 164DEF_HELPER_1(fldl2t_ST0, void, env) 165DEF_HELPER_1(fldl2e_ST0, void, env) 166DEF_HELPER_1(fldpi_ST0, void, env) 167DEF_HELPER_1(fldlg2_ST0, void, env) 168DEF_HELPER_1(fldln2_ST0, void, env) 169DEF_HELPER_1(fldz_ST0, void, env) 170DEF_HELPER_1(fldz_FT0, void, env) 171DEF_HELPER_1(fnstsw, i32, env) 172DEF_HELPER_1(fnstcw, i32, env) 173DEF_HELPER_2(fldcw, void, env, i32) 174DEF_HELPER_1(fclex, void, env) 175DEF_HELPER_1(fwait, void, env) 176DEF_HELPER_1(fninit, void, env) 177DEF_HELPER_2(fbld_ST0, void, env, tl) 178DEF_HELPER_2(fbst_ST0, void, env, tl) 179DEF_HELPER_1(f2xm1, void, env) 180DEF_HELPER_1(fyl2x, void, env) 181DEF_HELPER_1(fptan, void, env) 182DEF_HELPER_1(fpatan, void, env) 183DEF_HELPER_1(fxtract, void, env) 184DEF_HELPER_1(fprem1, void, env) 185DEF_HELPER_1(fprem, void, env) 186DEF_HELPER_1(fyl2xp1, void, env) 187DEF_HELPER_1(fsqrt, void, env) 188DEF_HELPER_1(fsincos, void, env) 189DEF_HELPER_1(frndint, void, env) 190DEF_HELPER_1(fscale, void, env) 191DEF_HELPER_1(fsin, void, env) 192DEF_HELPER_1(fcos, void, env) 193DEF_HELPER_3(fstenv, void, env, tl, int) 194DEF_HELPER_3(fldenv, void, env, tl, int) 195DEF_HELPER_3(fsave, void, env, tl, int) 196DEF_HELPER_3(frstor, void, env, tl, int) 197DEF_HELPER_FLAGS_2(fxsave, TCG_CALL_NO_WG, void, env, tl) 198DEF_HELPER_FLAGS_2(fxrstor, TCG_CALL_NO_WG, void, env, tl) 199DEF_HELPER_FLAGS_3(xsave, TCG_CALL_NO_WG, void, env, tl, i64) 200DEF_HELPER_FLAGS_3(xsaveopt, TCG_CALL_NO_WG, void, env, tl, i64) 201DEF_HELPER_FLAGS_3(xrstor, TCG_CALL_NO_WG, void, env, tl, i64) 202DEF_HELPER_FLAGS_2(xgetbv, TCG_CALL_NO_WG, i64, env, i32) 203DEF_HELPER_FLAGS_3(xsetbv, TCG_CALL_NO_WG, void, env, i32, i64) 204DEF_HELPER_FLAGS_2(rdpkru, TCG_CALL_NO_WG, i64, env, i32) 205DEF_HELPER_FLAGS_3(wrpkru, TCG_CALL_NO_WG, void, env, i32, i64) 206 207DEF_HELPER_FLAGS_2(pdep, TCG_CALL_NO_RWG_SE, tl, tl, tl) 208DEF_HELPER_FLAGS_2(pext, TCG_CALL_NO_RWG_SE, tl, tl, tl) 209 210/* MMX/SSE */ 211 212DEF_HELPER_2(ldmxcsr, void, env, i32) 213DEF_HELPER_1(update_mxcsr, void, env) 214DEF_HELPER_1(enter_mmx, void, env) 215DEF_HELPER_1(emms, void, env) 216DEF_HELPER_3(movq, void, env, ptr, ptr) 217 218#define SHIFT 0 219#include "ops_sse_header.h" 220#define SHIFT 1 221#include "ops_sse_header.h" 222 223DEF_HELPER_3(rclb, tl, env, tl, tl) 224DEF_HELPER_3(rclw, tl, env, tl, tl) 225DEF_HELPER_3(rcll, tl, env, tl, tl) 226DEF_HELPER_3(rcrb, tl, env, tl, tl) 227DEF_HELPER_3(rcrw, tl, env, tl, tl) 228DEF_HELPER_3(rcrl, tl, env, tl, tl) 229#ifdef TARGET_X86_64 230DEF_HELPER_3(rclq, tl, env, tl, tl) 231DEF_HELPER_3(rcrq, tl, env, tl, tl) 232#endif 233 234DEF_HELPER_1(rdrand, tl, env)