aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-22 16:11:04 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-22 16:11:04 +0000
commit437a88a51cfa9a0e7080153f3a54cfa45f424b76 (patch)
treed8bb3cb958e04d42ff8b3438ea2b0e611d30aec9
parent4dc81f2822187f4503d4bdb76785cafa5b28db0b (diff)
proper helper definition registering (all targets must do that)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4530 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--target-i386/helper.h381
-rw-r--r--target-i386/ops_sse_header.h328
-rw-r--r--target-i386/translate.c5
3 files changed, 361 insertions, 353 deletions
diff --git a/target-i386/helper.h b/target-i386/helper.h
index 9bbf4fc180..8e8f70b55b 100644
--- a/target-i386/helper.h
+++ b/target-i386/helper.h
@@ -1,220 +1,223 @@
-#define TCG_HELPER_PROTO
+#ifndef DEF_HELPER
+#define DEF_HELPER(ret, name, params) ret name params;
+#endif
-void helper_lock(void);
-void helper_unlock(void);
-void helper_write_eflags(target_ulong t0, uint32_t update_mask);
-target_ulong helper_read_eflags(void);
-void helper_divb_AL(target_ulong t0);
-void helper_idivb_AL(target_ulong t0);
-void helper_divw_AX(target_ulong t0);
-void helper_idivw_AX(target_ulong t0);
-void helper_divl_EAX(target_ulong t0);
-void helper_idivl_EAX(target_ulong t0);
+DEF_HELPER(void, helper_lock, (void))
+DEF_HELPER(void, helper_unlock, (void))
+DEF_HELPER(void, helper_write_eflags, (target_ulong t0, uint32_t update_mask))
+DEF_HELPER(target_ulong, helper_read_eflags, (void))
+DEF_HELPER(void, helper_divb_AL, (target_ulong t0))
+DEF_HELPER(void, helper_idivb_AL, (target_ulong t0))
+DEF_HELPER(void, helper_divw_AX, (target_ulong t0))
+DEF_HELPER(void, helper_idivw_AX, (target_ulong t0))
+DEF_HELPER(void, helper_divl_EAX, (target_ulong t0))
+DEF_HELPER(void, helper_idivl_EAX, (target_ulong t0))
#ifdef TARGET_X86_64
-void helper_mulq_EAX_T0(target_ulong t0);
-void helper_imulq_EAX_T0(target_ulong t0);
-target_ulong helper_imulq_T0_T1(target_ulong t0, target_ulong t1);
-void helper_divq_EAX(target_ulong t0);
-void helper_idivq_EAX(target_ulong t0);
+DEF_HELPER(void, helper_mulq_EAX_T0, (target_ulong t0))
+DEF_HELPER(void, helper_imulq_EAX_T0, (target_ulong t0))
+DEF_HELPER(target_ulong, helper_imulq_T0_T1, (target_ulong t0, target_ulong t1))
+DEF_HELPER(void, helper_divq_EAX, (target_ulong t0))
+DEF_HELPER(void, helper_idivq_EAX, (target_ulong t0))
#endif
-void helper_aam(int base);
-void helper_aad(int base);
-void helper_aaa(void);
-void helper_aas(void);
-void helper_daa(void);
-void helper_das(void);
+DEF_HELPER(void, helper_aam, (int base))
+DEF_HELPER(void, helper_aad, (int base))
+DEF_HELPER(void, helper_aaa, (void))
+DEF_HELPER(void, helper_aas, (void))
+DEF_HELPER(void, helper_daa, (void))
+DEF_HELPER(void, helper_das, (void))
-target_ulong helper_lsl(target_ulong selector1);
-target_ulong helper_lar(target_ulong selector1);
-void helper_verr(target_ulong selector1);
-void helper_verw(target_ulong selector1);
-void helper_lldt(int selector);
-void helper_ltr(int selector);
-void helper_load_seg(int seg_reg, int selector);
-void helper_ljmp_protected(int new_cs, target_ulong new_eip,
- int next_eip_addend);
-void helper_lcall_real(int new_cs, target_ulong new_eip1,
- int shift, int next_eip);
-void helper_lcall_protected(int new_cs, target_ulong new_eip,
- int shift, int next_eip_addend);
-void helper_iret_real(int shift);
-void helper_iret_protected(int shift, int next_eip);
-void helper_lret_protected(int shift, int addend);
-void helper_movl_crN_T0(int reg, target_ulong t0);
-void helper_lmsw(target_ulong t0);
-void helper_clts(void);
+DEF_HELPER(target_ulong, helper_lsl, (target_ulong selector1))
+DEF_HELPER(target_ulong, helper_lar, (target_ulong selector1))
+DEF_HELPER(void, helper_verr, (target_ulong selector1))
+DEF_HELPER(void, helper_verw, (target_ulong selector1))
+DEF_HELPER(void, helper_lldt, (int selector))
+DEF_HELPER(void, helper_ltr, (int selector))
+DEF_HELPER(void, helper_load_seg, (int seg_reg, int selector))
+DEF_HELPER(void, helper_ljmp_protected, (int new_cs, target_ulong new_eip,
+ int next_eip_addend))
+DEF_HELPER(void, helper_lcall_real, (int new_cs, target_ulong new_eip1,
+ int shift, int next_eip))
+DEF_HELPER(void, helper_lcall_protected, (int new_cs, target_ulong new_eip,
+ int shift, int next_eip_addend))
+DEF_HELPER(void, helper_iret_real, (int shift))
+DEF_HELPER(void, helper_iret_protected, (int shift, int next_eip))
+DEF_HELPER(void, helper_lret_protected, (int shift, int addend))
+DEF_HELPER(void, helper_movl_crN_T0, (int reg, target_ulong t0))
+DEF_HELPER(void, helper_lmsw, (target_ulong t0))
+DEF_HELPER(void, helper_clts, (void))
#if !defined(CONFIG_USER_ONLY)
-target_ulong helper_movtl_T0_cr8(void);
+DEF_HELPER(target_ulong, helper_movtl_T0_cr8, (void))
#endif
-void helper_movl_drN_T0(int reg, target_ulong t0);
-void helper_invlpg(target_ulong addr);
+DEF_HELPER(void, helper_movl_drN_T0, (int reg, target_ulong t0))
+DEF_HELPER(void, helper_invlpg, (target_ulong addr))
-void helper_enter_level(int level, int data32, target_ulong t1);
+DEF_HELPER(void, helper_enter_level, (int level, int data32, target_ulong t1))
#ifdef TARGET_X86_64
-void helper_enter64_level(int level, int data64, target_ulong t1);
+DEF_HELPER(void, helper_enter64_level, (int level, int data64, target_ulong t1))
#endif
-void helper_sysenter(void);
-void helper_sysexit(void);
+DEF_HELPER(void, helper_sysenter, (void))
+DEF_HELPER(void, helper_sysexit, (void))
#ifdef TARGET_X86_64
-void helper_syscall(int next_eip_addend);
-void helper_sysret(int dflag);
+DEF_HELPER(void, helper_syscall, (int next_eip_addend))
+DEF_HELPER(void, helper_sysret, (int dflag))
#endif
-void helper_hlt(void);
-void helper_monitor(target_ulong ptr);
-void helper_mwait(void);
-void helper_debug(void);
-void helper_raise_interrupt(int intno, int next_eip_addend);
-void helper_raise_exception(int exception_index);
-void helper_cli(void);
-void helper_sti(void);
-void helper_set_inhibit_irq(void);
-void helper_reset_inhibit_irq(void);
-void helper_boundw(target_ulong a0, int v);
-void helper_boundl(target_ulong a0, int v);
-void helper_rsm(void);
-void helper_into(int next_eip_addend);
-void helper_cmpxchg8b(target_ulong a0);
+DEF_HELPER(void, helper_hlt, (void))
+DEF_HELPER(void, helper_monitor, (target_ulong ptr))
+DEF_HELPER(void, helper_mwait, (void))
+DEF_HELPER(void, helper_debug, (void))
+DEF_HELPER(void, helper_raise_interrupt, (int intno, int next_eip_addend))
+DEF_HELPER(void, helper_raise_exception, (int exception_index))
+DEF_HELPER(void, helper_cli, (void))
+DEF_HELPER(void, helper_sti, (void))
+DEF_HELPER(void, helper_set_inhibit_irq, (void))
+DEF_HELPER(void, helper_reset_inhibit_irq, (void))
+DEF_HELPER(void, helper_boundw, (target_ulong a0, int v))
+DEF_HELPER(void, helper_boundl, (target_ulong a0, int v))
+DEF_HELPER(void, helper_rsm, (void))
+DEF_HELPER(void, helper_into, (int next_eip_addend))
+DEF_HELPER(void, helper_cmpxchg8b, (target_ulong a0))
#ifdef TARGET_X86_64
-void helper_cmpxchg16b(target_ulong a0);
+DEF_HELPER(void, helper_cmpxchg16b, (target_ulong a0))
#endif
-void helper_single_step(void);
-void helper_cpuid(void);
-void helper_rdtsc(void);
-void helper_rdpmc(void);
-void helper_rdmsr(void);
-void helper_wrmsr(void);
+DEF_HELPER(void, helper_single_step, (void))
+DEF_HELPER(void, helper_cpuid, (void))
+DEF_HELPER(void, helper_rdtsc, (void))
+DEF_HELPER(void, helper_rdpmc, (void))
+DEF_HELPER(void, helper_rdmsr, (void))
+DEF_HELPER(void, helper_wrmsr, (void))
-void helper_check_iob(uint32_t t0);
-void helper_check_iow(uint32_t t0);
-void helper_check_iol(uint32_t t0);
-void helper_outb(uint32_t port, uint32_t data);
-target_ulong helper_inb(uint32_t port);
-void helper_outw(uint32_t port, uint32_t data);
-target_ulong helper_inw(uint32_t port);
-void helper_outl(uint32_t port, uint32_t data);
-target_ulong helper_inl(uint32_t port);
+DEF_HELPER(void, helper_check_iob, (uint32_t t0))
+DEF_HELPER(void, helper_check_iow, (uint32_t t0))
+DEF_HELPER(void, helper_check_iol, (uint32_t t0))
+DEF_HELPER(void, helper_outb, (uint32_t port, uint32_t data))
+DEF_HELPER(target_ulong, helper_inb, (uint32_t port))
+DEF_HELPER(void, helper_outw, (uint32_t port, uint32_t data))
+DEF_HELPER(target_ulong, helper_inw, (uint32_t port))
+DEF_HELPER(void, helper_outl, (uint32_t port, uint32_t data))
+DEF_HELPER(target_ulong, helper_inl, (uint32_t port))
-void helper_svm_check_intercept_param(uint32_t type, uint64_t param);
-void helper_vmexit(uint32_t exit_code, uint64_t exit_info_1);
-void helper_svm_check_io(uint32_t port, uint32_t param,
- uint32_t next_eip_addend);
-void helper_vmrun(void);
-void helper_vmmcall(void);
-void helper_vmload(void);
-void helper_vmsave(void);
-void helper_stgi(void);
-void helper_clgi(void);
-void helper_skinit(void);
-void helper_invlpga(void);
+DEF_HELPER(void, helper_svm_check_intercept_param, (uint32_t type, uint64_t param))
+DEF_HELPER(void, helper_vmexit, (uint32_t exit_code, uint64_t exit_info_1))
+DEF_HELPER(void, helper_svm_check_io, (uint32_t port, uint32_t param,
+ uint32_t next_eip_addend))
+DEF_HELPER(void, helper_vmrun, (void))
+DEF_HELPER(void, helper_vmmcall, (void))
+DEF_HELPER(void, helper_vmload, (void))
+DEF_HELPER(void, helper_vmsave, (void))
+DEF_HELPER(void, helper_stgi, (void))
+DEF_HELPER(void, helper_clgi, (void))
+DEF_HELPER(void, helper_skinit, (void))
+DEF_HELPER(void, helper_invlpga, (void))
/* x86 FPU */
-void helper_flds_FT0(uint32_t val);
-void helper_fldl_FT0(uint64_t val);
-void helper_fildl_FT0(int32_t val);
-void helper_flds_ST0(uint32_t val);
-void helper_fldl_ST0(uint64_t val);
-void helper_fildl_ST0(int32_t val);
-void helper_fildll_ST0(int64_t val);
-uint32_t helper_fsts_ST0(void);
-uint64_t helper_fstl_ST0(void);
-int32_t helper_fist_ST0(void);
-int32_t helper_fistl_ST0(void);
-int64_t helper_fistll_ST0(void);
-int32_t helper_fistt_ST0(void);
-int32_t helper_fisttl_ST0(void);
-int64_t helper_fisttll_ST0(void);
-void helper_fldt_ST0(target_ulong ptr);
-void helper_fstt_ST0(target_ulong ptr);
-void helper_fpush(void);
-void helper_fpop(void);
-void helper_fdecstp(void);
-void helper_fincstp(void);
-void helper_ffree_STN(int st_index);
-void helper_fmov_ST0_FT0(void);
-void helper_fmov_FT0_STN(int st_index);
-void helper_fmov_ST0_STN(int st_index);
-void helper_fmov_STN_ST0(int st_index);
-void helper_fxchg_ST0_STN(int st_index);
-void helper_fcom_ST0_FT0(void);
-void helper_fucom_ST0_FT0(void);
-void helper_fcomi_ST0_FT0(void);
-void helper_fucomi_ST0_FT0(void);
-void helper_fadd_ST0_FT0(void);
-void helper_fmul_ST0_FT0(void);
-void helper_fsub_ST0_FT0(void);
-void helper_fsubr_ST0_FT0(void);
-void helper_fdiv_ST0_FT0(void);
-void helper_fdivr_ST0_FT0(void);
-void helper_fadd_STN_ST0(int st_index);
-void helper_fmul_STN_ST0(int st_index);
-void helper_fsub_STN_ST0(int st_index);
-void helper_fsubr_STN_ST0(int st_index);
-void helper_fdiv_STN_ST0(int st_index);
-void helper_fdivr_STN_ST0(int st_index);
-void helper_fchs_ST0(void);
-void helper_fabs_ST0(void);
-void helper_fxam_ST0(void);
-void helper_fld1_ST0(void);
-void helper_fldl2t_ST0(void);
-void helper_fldl2e_ST0(void);
-void helper_fldpi_ST0(void);
-void helper_fldlg2_ST0(void);
-void helper_fldln2_ST0(void);
-void helper_fldz_ST0(void);
-void helper_fldz_FT0(void);
-uint32_t helper_fnstsw(void);
-uint32_t helper_fnstcw(void);
-void helper_fldcw(uint32_t val);
-void helper_fclex(void);
-void helper_fwait(void);
-void helper_fninit(void);
-void helper_fbld_ST0(target_ulong ptr);
-void helper_fbst_ST0(target_ulong ptr);
-void helper_f2xm1(void);
-void helper_fyl2x(void);
-void helper_fptan(void);
-void helper_fpatan(void);
-void helper_fxtract(void);
-void helper_fprem1(void);
-void helper_fprem(void);
-void helper_fyl2xp1(void);
-void helper_fsqrt(void);
-void helper_fsincos(void);
-void helper_frndint(void);
-void helper_fscale(void);
-void helper_fsin(void);
-void helper_fcos(void);
-void helper_fxam_ST0(void);
-void helper_fstenv(target_ulong ptr, int data32);
-void helper_fldenv(target_ulong ptr, int data32);
-void helper_fsave(target_ulong ptr, int data32);
-void helper_frstor(target_ulong ptr, int data32);
-void helper_fxsave(target_ulong ptr, int data64);
-void helper_fxrstor(target_ulong ptr, int data64);
-target_ulong helper_bsf(target_ulong t0);
-target_ulong helper_bsr(target_ulong t0);
+DEF_HELPER(void, helper_flds_FT0, (uint32_t val))
+DEF_HELPER(void, helper_fldl_FT0, (uint64_t val))
+DEF_HELPER(void, helper_fildl_FT0, (int32_t val))
+DEF_HELPER(void, helper_flds_ST0, (uint32_t val))
+DEF_HELPER(void, helper_fldl_ST0, (uint64_t val))
+DEF_HELPER(void, helper_fildl_ST0, (int32_t val))
+DEF_HELPER(void, helper_fildll_ST0, (int64_t val))
+DEF_HELPER(uint32_t, helper_fsts_ST0, (void))
+DEF_HELPER(uint64_t, helper_fstl_ST0, (void))
+DEF_HELPER(int32_t, helper_fist_ST0, (void))
+DEF_HELPER(int32_t, helper_fistl_ST0, (void))
+DEF_HELPER(int64_t, helper_fistll_ST0, (void))
+DEF_HELPER(int32_t, helper_fistt_ST0, (void))
+DEF_HELPER(int32_t, helper_fisttl_ST0, (void))
+DEF_HELPER(int64_t, helper_fisttll_ST0, (void))
+DEF_HELPER(void, helper_fldt_ST0, (target_ulong ptr))
+DEF_HELPER(void, helper_fstt_ST0, (target_ulong ptr))
+DEF_HELPER(void, helper_fpush, (void))
+DEF_HELPER(void, helper_fpop, (void))
+DEF_HELPER(void, helper_fdecstp, (void))
+DEF_HELPER(void, helper_fincstp, (void))
+DEF_HELPER(void, helper_ffree_STN, (int st_index))
+DEF_HELPER(void, helper_fmov_ST0_FT0, (void))
+DEF_HELPER(void, helper_fmov_FT0_STN, (int st_index))
+DEF_HELPER(void, helper_fmov_ST0_STN, (int st_index))
+DEF_HELPER(void, helper_fmov_STN_ST0, (int st_index))
+DEF_HELPER(void, helper_fxchg_ST0_STN, (int st_index))
+DEF_HELPER(void, helper_fcom_ST0_FT0, (void))
+DEF_HELPER(void, helper_fucom_ST0_FT0, (void))
+DEF_HELPER(void, helper_fcomi_ST0_FT0, (void))
+DEF_HELPER(void, helper_fucomi_ST0_FT0, (void))
+DEF_HELPER(void, helper_fadd_ST0_FT0, (void))
+DEF_HELPER(void, helper_fmul_ST0_FT0, (void))
+DEF_HELPER(void, helper_fsub_ST0_FT0, (void))
+DEF_HELPER(void, helper_fsubr_ST0_FT0, (void))
+DEF_HELPER(void, helper_fdiv_ST0_FT0, (void))
+DEF_HELPER(void, helper_fdivr_ST0_FT0, (void))
+DEF_HELPER(void, helper_fadd_STN_ST0, (int st_index))
+DEF_HELPER(void, helper_fmul_STN_ST0, (int st_index))
+DEF_HELPER(void, helper_fsub_STN_ST0, (int st_index))
+DEF_HELPER(void, helper_fsubr_STN_ST0, (int st_index))
+DEF_HELPER(void, helper_fdiv_STN_ST0, (int st_index))
+DEF_HELPER(void, helper_fdivr_STN_ST0, (int st_index))
+DEF_HELPER(void, helper_fchs_ST0, (void))
+DEF_HELPER(void, helper_fabs_ST0, (void))
+DEF_HELPER(void, helper_fxam_ST0, (void))
+DEF_HELPER(void, helper_fld1_ST0, (void))
+DEF_HELPER(void, helper_fldl2t_ST0, (void))
+DEF_HELPER(void, helper_fldl2e_ST0, (void))
+DEF_HELPER(void, helper_fldpi_ST0, (void))
+DEF_HELPER(void, helper_fldlg2_ST0, (void))
+DEF_HELPER(void, helper_fldln2_ST0, (void))
+DEF_HELPER(void, helper_fldz_ST0, (void))
+DEF_HELPER(void, helper_fldz_FT0, (void))
+DEF_HELPER(uint32_t, helper_fnstsw, (void))
+DEF_HELPER(uint32_t, helper_fnstcw, (void))
+DEF_HELPER(void, helper_fldcw, (uint32_t val))
+DEF_HELPER(void, helper_fclex, (void))
+DEF_HELPER(void, helper_fwait, (void))
+DEF_HELPER(void, helper_fninit, (void))
+DEF_HELPER(void, helper_fbld_ST0, (target_ulong ptr))
+DEF_HELPER(void, helper_fbst_ST0, (target_ulong ptr))
+DEF_HELPER(void, helper_f2xm1, (void))
+DEF_HELPER(void, helper_fyl2x, (void))
+DEF_HELPER(void, helper_fptan, (void))
+DEF_HELPER(void, helper_fpatan, (void))
+DEF_HELPER(void, helper_fxtract, (void))
+DEF_HELPER(void, helper_fprem1, (void))
+DEF_HELPER(void, helper_fprem, (void))
+DEF_HELPER(void, helper_fyl2xp1, (void))
+DEF_HELPER(void, helper_fsqrt, (void))
+DEF_HELPER(void, helper_fsincos, (void))
+DEF_HELPER(void, helper_frndint, (void))
+DEF_HELPER(void, helper_fscale, (void))
+DEF_HELPER(void, helper_fsin, (void))
+DEF_HELPER(void, helper_fcos, (void))
+DEF_HELPER(void, helper_fxam_ST0, (void))
+DEF_HELPER(void, helper_fstenv, (target_ulong ptr, int data32))
+DEF_HELPER(void, helper_fldenv, (target_ulong ptr, int data32))
+DEF_HELPER(void, helper_fsave, (target_ulong ptr, int data32))
+DEF_HELPER(void, helper_frstor, (target_ulong ptr, int data32))
+DEF_HELPER(void, helper_fxsave, (target_ulong ptr, int data64))
+DEF_HELPER(void, helper_fxrstor, (target_ulong ptr, int data64))
+DEF_HELPER(target_ulong, helper_bsf, (target_ulong t0))
+DEF_HELPER(target_ulong, helper_bsr, (target_ulong t0))
/* MMX/SSE */
-void TCG_HELPER_PROTO helper_enter_mmx(void);
-void TCG_HELPER_PROTO helper_emms(void);
-void TCG_HELPER_PROTO helper_movq(uint64_t *d, uint64_t *s);
+DEF_HELPER(void, helper_enter_mmx, (void))
+DEF_HELPER(void, helper_emms, (void))
+DEF_HELPER(void, helper_movq, (uint64_t *d, uint64_t *s))
#define SHIFT 0
#include "ops_sse_header.h"
#define SHIFT 1
#include "ops_sse_header.h"
-target_ulong helper_rclb(target_ulong t0, target_ulong t1);
-target_ulong helper_rclw(target_ulong t0, target_ulong t1);
-target_ulong helper_rcll(target_ulong t0, target_ulong t1);
-target_ulong helper_rcrb(target_ulong t0, target_ulong t1);
-target_ulong helper_rcrw(target_ulong t0, target_ulong t1);
-target_ulong helper_rcrl(target_ulong t0, target_ulong t1);
+DEF_HELPER(target_ulong, helper_rclb, (target_ulong t0, target_ulong t1))
+DEF_HELPER(target_ulong, helper_rclw, (target_ulong t0, target_ulong t1))
+DEF_HELPER(target_ulong, helper_rcll, (target_ulong t0, target_ulong t1))
+DEF_HELPER(target_ulong, helper_rcrb, (target_ulong t0, target_ulong t1))
+DEF_HELPER(target_ulong, helper_rcrw, (target_ulong t0, target_ulong t1))
+DEF_HELPER(target_ulong, helper_rcrl, (target_ulong t0, target_ulong t1))
#ifdef TARGET_X86_64
-target_ulong helper_rclq(target_ulong t0, target_ulong t1);
-target_ulong helper_rcrq(target_ulong t0, target_ulong t1);
+DEF_HELPER(target_ulong, helper_rclq, (target_ulong t0, target_ulong t1))
+DEF_HELPER(target_ulong, helper_rcrq, (target_ulong t0, target_ulong t1))
#endif
+#undef DEF_HELPER
diff --git a/target-i386/ops_sse_header.h b/target-i386/ops_sse_header.h
index f8e01f42c9..442e12cd42 100644
--- a/target-i386/ops_sse_header.h
+++ b/target-i386/ops_sse_header.h
@@ -25,99 +25,99 @@
#define SUFFIX _xmm
#endif
-void glue(helper_psrlw, SUFFIX)(Reg *d, Reg *s);
-void glue(helper_psraw, SUFFIX)(Reg *d, Reg *s);
-void glue(helper_psllw, SUFFIX)(Reg *d, Reg *s);
-void glue(helper_psrld, SUFFIX)(Reg *d, Reg *s);
-void glue(helper_psrad, SUFFIX)(Reg *d, Reg *s);
-void glue(helper_pslld, SUFFIX)(Reg *d, Reg *s);
-void glue(helper_psrlq, SUFFIX)(Reg *d, Reg *s);
-void glue(helper_psllq, SUFFIX)(Reg *d, Reg *s);
+DEF_HELPER(void, glue(helper_psrlw, SUFFIX), (Reg *d, Reg *s))
+DEF_HELPER(void, glue(helper_psraw, SUFFIX), (Reg *d, Reg *s))
+DEF_HELPER(void, glue(helper_psllw, SUFFIX), (Reg *d, Reg *s))
+DEF_HELPER(void, glue(helper_psrld, SUFFIX), (Reg *d, Reg *s))
+DEF_HELPER(void, glue(helper_psrad, SUFFIX), (Reg *d, Reg *s))
+DEF_HELPER(void, glue(helper_pslld, SUFFIX), (Reg *d, Reg *s))
+DEF_HELPER(void, glue(helper_psrlq, SUFFIX), (Reg *d, Reg *s))
+DEF_HELPER(void, glue(helper_psllq, SUFFIX), (Reg *d, Reg *s))
#if SHIFT == 1
-void glue(helper_psrldq, SUFFIX)(Reg *d, Reg *s);
-void glue(helper_pslldq, SUFFIX)(Reg *d, Reg *s);
+DEF_HELPER(void, glue(helper_psrldq, SUFFIX), (Reg *d, Reg *s))
+DEF_HELPER(void, glue(helper_pslldq, SUFFIX), (Reg *d, Reg *s))
#endif
#define SSE_HELPER_B(name, F)\
- void glue(name, SUFFIX) (Reg *d, Reg *s);
+ DEF_HELPER(void, glue(name, SUFFIX), (Reg *d, Reg *s))
#define SSE_HELPER_W(name, F)\
- void glue(name, SUFFIX) (Reg *d, Reg *s);
+ DEF_HELPER(void, glue(name, SUFFIX), (Reg *d, Reg *s))
#define SSE_HELPER_L(name, F)\
- void glue(name, SUFFIX) (Reg *d, Reg *s);
+ DEF_HELPER(void, glue(name, SUFFIX), (Reg *d, Reg *s))
#define SSE_HELPER_Q(name, F)\
- void glue(name, SUFFIX) (Reg *d, Reg *s);
+ DEF_HELPER(void, glue(name, SUFFIX), (Reg *d, Reg *s))
-SSE_HELPER_B(helper_paddb, FADD);
-SSE_HELPER_W(helper_paddw, FADD);
-SSE_HELPER_L(helper_paddl, FADD);
-SSE_HELPER_Q(helper_paddq, FADD);
+SSE_HELPER_B(helper_paddb, FADD)
+SSE_HELPER_W(helper_paddw, FADD)
+SSE_HELPER_L(helper_paddl, FADD)
+SSE_HELPER_Q(helper_paddq, FADD)
-SSE_HELPER_B(helper_psubb, FSUB);
-SSE_HELPER_W(helper_psubw, FSUB);
-SSE_HELPER_L(helper_psubl, FSUB);
-SSE_HELPER_Q(helper_psubq, FSUB);
+SSE_HELPER_B(helper_psubb, FSUB)
+SSE_HELPER_W(helper_psubw, FSUB)
+SSE_HELPER_L(helper_psubl, FSUB)
+SSE_HELPER_Q(helper_psubq, FSUB)
-SSE_HELPER_B(helper_paddusb, FADDUB);
-SSE_HELPER_B(helper_paddsb, FADDSB);
-SSE_HELPER_B(helper_psubusb, FSUBUB);
-SSE_HELPER_B(helper_psubsb, FSUBSB);
+SSE_HELPER_B(helper_paddusb, FADDUB)
+SSE_HELPER_B(helper_paddsb, FADDSB)
+SSE_HELPER_B(helper_psubusb, FSUBUB)
+SSE_HELPER_B(helper_psubsb, FSUBSB)
-SSE_HELPER_W(helper_paddusw, FADDUW);
-SSE_HELPER_W(helper_paddsw, FADDSW);
-SSE_HELPER_W(helper_psubusw, FSUBUW);
-SSE_HELPER_W(helper_psubsw, FSUBSW);
+SSE_HELPER_W(helper_paddusw, FADDUW)
+SSE_HELPER_W(helper_paddsw, FADDSW)
+SSE_HELPER_W(helper_psubusw, FSUBUW)
+SSE_HELPER_W(helper_psubsw, FSUBSW)
-SSE_HELPER_B(helper_pminub, FMINUB);
-SSE_HELPER_B(helper_pmaxub, FMAXUB);
+SSE_HELPER_B(helper_pminub, FMINUB)
+SSE_HELPER_B(helper_pmaxub, FMAXUB)
-SSE_HELPER_W(helper_pminsw, FMINSW);
-SSE_HELPER_W(helper_pmaxsw, FMAXSW);
+SSE_HELPER_W(helper_pminsw, FMINSW)
+SSE_HELPER_W(helper_pmaxsw, FMAXSW)
-SSE_HELPER_Q(helper_pand, FAND);
-SSE_HELPER_Q(helper_pandn, FANDN);
-SSE_HELPER_Q(helper_por, FOR);
-SSE_HELPER_Q(helper_pxor, FXOR);
+SSE_HELPER_Q(helper_pand, FAND)
+SSE_HELPER_Q(helper_pandn, FANDN)
+SSE_HELPER_Q(helper_por, FOR)
+SSE_HELPER_Q(helper_pxor, FXOR)
-SSE_HELPER_B(helper_pcmpgtb, FCMPGTB);
-SSE_HELPER_W(helper_pcmpgtw, FCMPGTW);
-SSE_HELPER_L(helper_pcmpgtl, FCMPGTL);
+SSE_HELPER_B(helper_pcmpgtb, FCMPGTB)
+SSE_HELPER_W(helper_pcmpgtw, FCMPGTW)
+SSE_HELPER_L(helper_pcmpgtl, FCMPGTL)
-SSE_HELPER_B(helper_pcmpeqb, FCMPEQ);
-SSE_HELPER_W(helper_pcmpeqw, FCMPEQ);
-SSE_HELPER_L(helper_pcmpeql, FCMPEQ);
+SSE_HELPER_B(helper_pcmpeqb, FCMPEQ)
+SSE_HELPER_W(helper_pcmpeqw, FCMPEQ)
+SSE_HELPER_L(helper_pcmpeql, FCMPEQ)
-SSE_HELPER_W(helper_pmullw, FMULLW);
+SSE_HELPER_W(helper_pmullw, FMULLW)
#if SHIFT == 0
-SSE_HELPER_W(helper_pmulhrw, FMULHRW);
+SSE_HELPER_W(helper_pmulhrw, FMULHRW)
#endif
-SSE_HELPER_W(helper_pmulhuw, FMULHUW);
-SSE_HELPER_W(helper_pmulhw, FMULHW);
+SSE_HELPER_W(helper_pmulhuw, FMULHUW)
+SSE_HELPER_W(helper_pmulhw, FMULHW)
-SSE_HELPER_B(helper_pavgb, FAVG);
-SSE_HELPER_W(helper_pavgw, FAVG);
+SSE_HELPER_B(helper_pavgb, FAVG)
+SSE_HELPER_W(helper_pavgw, FAVG)
-void glue(helper_pmuludq, SUFFIX) (Reg *d, Reg *s);
-void glue(helper_pmaddwd, SUFFIX) (Reg *d, Reg *s);
+DEF_HELPER(void, glue(helper_pmuludq, SUFFIX) , (Reg *d, Reg *s))
+DEF_HELPER(void, glue(helper_pmaddwd, SUFFIX) , (Reg *d, Reg *s))
-void glue(helper_psadbw, SUFFIX) (Reg *d, Reg *s);
-void glue(helper_maskmov, SUFFIX) (Reg *d, Reg *s, target_ulong a0);
-void glue(helper_movl_mm_T0, SUFFIX) (Reg *d, uint32_t val);
+DEF_HELPER(void, glue(helper_psadbw, SUFFIX) , (Reg *d, Reg *s))
+DEF_HELPER(void, glue(helper_maskmov, SUFFIX) , (Reg *d, Reg *s, target_ulong a0))
+DEF_HELPER(void, glue(helper_movl_mm_T0, SUFFIX) , (Reg *d, uint32_t val))
#ifdef TARGET_X86_64
-void glue(helper_movq_mm_T0, SUFFIX) (Reg *d, uint64_t val);
+DEF_HELPER(void, glue(helper_movq_mm_T0, SUFFIX) , (Reg *d, uint64_t val))
#endif
#if SHIFT == 0
-void glue(helper_pshufw, SUFFIX) (Reg *d, Reg *s, int order);
+DEF_HELPER(void, glue(helper_pshufw, SUFFIX) , (Reg *d, Reg *s, int order))
#else
-void helper_shufps(Reg *d, Reg *s, int order);
-void helper_shufpd(Reg *d, Reg *s, int order);
-void glue(helper_pshufd, SUFFIX) (Reg *d, Reg *s, int order);
-void glue(helper_pshuflw, SUFFIX) (Reg *d, Reg *s, int order);
-void glue(helper_pshufhw, SUFFIX) (Reg *d, Reg *s, int order);
+DEF_HELPER(void, helper_shufps, (Reg *d, Reg *s, int order))
+DEF_HELPER(void, helper_shufpd, (Reg *d, Reg *s, int order))
+DEF_HELPER(void, glue(helper_pshufd, SUFFIX) , (Reg *d, Reg *s, int order))
+DEF_HELPER(void, glue(helper_pshuflw, SUFFIX) , (Reg *d, Reg *s, int order))
+DEF_HELPER(void, glue(helper_pshufhw, SUFFIX) , (Reg *d, Reg *s, int order))
#endif
#if SHIFT == 1
@@ -125,130 +125,130 @@ void glue(helper_pshufhw, SUFFIX) (Reg *d, Reg *s, int order);
/* XXX: not accurate */
#define SSE_HELPER_S(name, F)\
- void helper_ ## name ## ps (Reg *d, Reg *s); \
- void helper_ ## name ## ss (Reg *d, Reg *s); \
- void helper_ ## name ## pd (Reg *d, Reg *s); \
- void helper_ ## name ## sd (Reg *d, Reg *s);
-
-SSE_HELPER_S(add, FPU_ADD);
-SSE_HELPER_S(sub, FPU_SUB);
-SSE_HELPER_S(mul, FPU_MUL);
-SSE_HELPER_S(div, FPU_DIV);
-SSE_HELPER_S(min, FPU_MIN);
-SSE_HELPER_S(max, FPU_MAX);
-SSE_HELPER_S(sqrt, FPU_SQRT);
-
-
-void helper_cvtps2pd(Reg *d, Reg *s);
-void helper_cvtpd2ps(Reg *d, Reg *s);
-void helper_cvtss2sd(Reg *d, Reg *s);
-void helper_cvtsd2ss(Reg *d, Reg *s);
-void helper_cvtdq2ps(Reg *d, Reg *s);
-void helper_cvtdq2pd(Reg *d, Reg *s);
-void helper_cvtpi2ps(XMMReg *d, MMXReg *s);
-void helper_cvtpi2pd(XMMReg *d, MMXReg *s);
-void helper_cvtsi2ss(XMMReg *d, uint32_t val);
-void helper_cvtsi2sd(XMMReg *d, uint32_t val);
+ DEF_HELPER(void, helper_ ## name ## ps , (Reg *d, Reg *s)) \
+ DEF_HELPER(void, helper_ ## name ## ss , (Reg *d, Reg *s)) \
+ DEF_HELPER(void, helper_ ## name ## pd , (Reg *d, Reg *s)) \
+ DEF_HELPER(void, helper_ ## name ## sd , (Reg *d, Reg *s))
+
+SSE_HELPER_S(add, FPU_ADD)
+SSE_HELPER_S(sub, FPU_SUB)
+SSE_HELPER_S(mul, FPU_MUL)
+SSE_HELPER_S(div, FPU_DIV)
+SSE_HELPER_S(min, FPU_MIN)
+SSE_HELPER_S(max, FPU_MAX)
+SSE_HELPER_S(sqrt, FPU_SQRT)
+
+
+DEF_HELPER(void, helper_cvtps2pd, (Reg *d, Reg *s))
+DEF_HELPER(void, helper_cvtpd2ps, (Reg *d, Reg *s))
+DEF_HELPER(void, helper_cvtss2sd, (Reg *d, Reg *s))
+DEF_HELPER(void, helper_cvtsd2ss, (Reg *d, Reg *s))
+DEF_HELPER(void, helper_cvtdq2ps, (Reg *d, Reg *s))
+DEF_HELPER(void, helper_cvtdq2pd, (Reg *d, Reg *s))
+DEF_HELPER(void, helper_cvtpi2ps, (XMMReg *d, MMXReg *s))
+DEF_HELPER(void, helper_cvtpi2pd, (XMMReg *d, MMXReg *s))
+DEF_HELPER(void, helper_cvtsi2ss, (XMMReg *d, uint32_t val))
+DEF_HELPER(void, helper_cvtsi2sd, (XMMReg *d, uint32_t val))
#ifdef TARGET_X86_64
-void helper_cvtsq2ss(XMMReg *d, uint64_t val);
-void helper_cvtsq2sd(XMMReg *d, uint64_t val);
+DEF_HELPER(void, helper_cvtsq2ss, (XMMReg *d, uint64_t val))
+DEF_HELPER(void, helper_cvtsq2sd, (XMMReg *d, uint64_t val))
#endif
-void helper_cvtps2dq(XMMReg *d, XMMReg *s);
-void helper_cvtpd2dq(XMMReg *d, XMMReg *s);
-void helper_cvtps2pi(MMXReg *d, XMMReg *s);
-void helper_cvtpd2pi(MMXReg *d, XMMReg *s);
-int32_t helper_cvtss2si(XMMReg *s);
-int32_t helper_cvtsd2si(XMMReg *s);
+DEF_HELPER(void, helper_cvtps2dq, (XMMReg *d, XMMReg *s))
+DEF_HELPER(void, helper_cvtpd2dq, (XMMReg *d, XMMReg *s))
+DEF_HELPER(void, helper_cvtps2pi, (MMXReg *d, XMMReg *s))
+DEF_HELPER(void, helper_cvtpd2pi, (MMXReg *d, XMMReg *s))
+DEF_HELPER(int32_t, helper_cvtss2si, (XMMReg *s))
+DEF_HELPER(int32_t, helper_cvtsd2si, (XMMReg *s))
#ifdef TARGET_X86_64
-int64_t helper_cvtss2sq(XMMReg *s);
-int64_t helper_cvtsd2sq(XMMReg *s);
+DEF_HELPER(int64_t, helper_cvtss2sq, (XMMReg *s))
+DEF_HELPER(int64_t, helper_cvtsd2sq, (XMMReg *s))
#endif
-void helper_cvttps2dq(XMMReg *d, XMMReg *s);
-void helper_cvttpd2dq(XMMReg *d, XMMReg *s);
-void helper_cvttps2pi(MMXReg *d, XMMReg *s);
-void helper_cvttpd2pi(MMXReg *d, XMMReg *s);
-int32_t helper_cvttss2si(XMMReg *s);
-int32_t helper_cvttsd2si(XMMReg *s);
+DEF_HELPER(void, helper_cvttps2dq, (XMMReg *d, XMMReg *s))
+DEF_HELPER(void, helper_cvttpd2dq, (XMMReg *d, XMMReg *s))
+DEF_HELPER(void, helper_cvttps2pi, (MMXReg *d, XMMReg *s))
+DEF_HELPER(void, helper_cvttpd2pi, (MMXReg *d, XMMReg *s))
+DEF_HELPER(int32_t, helper_cvttss2si, (XMMReg *s))
+DEF_HELPER(int32_t, helper_cvttsd2si, (XMMReg *s))
#ifdef TARGET_X86_64
-int64_t helper_cvttss2sq(XMMReg *s);
-int64_t helper_cvttsd2sq(XMMReg *s);
+DEF_HELPER(int64_t, helper_cvttss2sq, (XMMReg *s))
+DEF_HELPER(int64_t, helper_cvttsd2sq, (XMMReg *s))
#endif
-void helper_rsqrtps(XMMReg *d, XMMReg *s);
-void helper_rsqrtss(XMMReg *d, XMMReg *s);
-void helper_rcpps(XMMReg *d, XMMReg *s);
-void helper_rcpss(XMMReg *d, XMMReg *s);
-void helper_haddps(XMMReg *d, XMMReg *s);
-void helper_haddpd(XMMReg *d, XMMReg *s);
-void helper_hsubps(XMMReg *d, XMMReg *s);
-void helper_hsubpd(XMMReg *d, XMMReg *s);
-void helper_addsubps(XMMReg *d, XMMReg *s);
-void helper_addsubpd(XMMReg *d, XMMReg *s);
+DEF_HELPER(void, helper_rsqrtps, (XMMReg *d, XMMReg *s))
+DEF_HELPER(void, helper_rsqrtss, (XMMReg *d, XMMReg *s))
+DEF_HELPER(void, helper_rcpps, (XMMReg *d, XMMReg *s))
+DEF_HELPER(void, helper_rcpss, (XMMReg *d, XMMReg *s))
+DEF_HELPER(void, helper_haddps, (XMMReg *d, XMMReg *s))
+DEF_HELPER(void, helper_haddpd, (XMMReg *d, XMMReg *s))
+DEF_HELPER(void, helper_hsubps, (XMMReg *d, XMMReg *s))
+DEF_HELPER(void, helper_hsubpd, (XMMReg *d, XMMReg *s))
+DEF_HELPER(void, helper_addsubps, (XMMReg *d, XMMReg *s))
+DEF_HELPER(void, helper_addsubpd, (XMMReg *d, XMMReg *s))
#define SSE_HELPER_CMP(name, F)\
- void helper_ ## name ## ps (Reg *d, Reg *s); \
- void helper_ ## name ## ss (Reg *d, Reg *s); \
- void helper_ ## name ## pd (Reg *d, Reg *s); \
- void helper_ ## name ## sd (Reg *d, Reg *s);
-
-SSE_HELPER_CMP(cmpeq, FPU_CMPEQ);
-SSE_HELPER_CMP(cmplt, FPU_CMPLT);
-SSE_HELPER_CMP(cmple, FPU_CMPLE);
-SSE_HELPER_CMP(cmpunord, FPU_CMPUNORD);
-SSE_HELPER_CMP(cmpneq, FPU_CMPNEQ);
-SSE_HELPER_CMP(cmpnlt, FPU_CMPNLT);
-SSE_HELPER_CMP(cmpnle, FPU_CMPNLE);
-SSE_HELPER_CMP(cmpord, FPU_CMPORD);
-
-void helper_ucomiss(Reg *d, Reg *s);
-void helper_comiss(Reg *d, Reg *s);
-void helper_ucomisd(Reg *d, Reg *s);
-void helper_comisd(Reg *d, Reg *s);
-uint32_t helper_movmskps(Reg *s);
-uint32_t helper_movmskpd(Reg *s);
+ DEF_HELPER(void, helper_ ## name ## ps , (Reg *d, Reg *s)) \
+ DEF_HELPER(void, helper_ ## name ## ss , (Reg *d, Reg *s)) \
+ DEF_HELPER(void, helper_ ## name ## pd , (Reg *d, Reg *s)) \
+ DEF_HELPER(void, helper_ ## name ## sd , (Reg *d, Reg *s))
+
+SSE_HELPER_CMP(cmpeq, FPU_CMPEQ)
+SSE_HELPER_CMP(cmplt, FPU_CMPLT)
+SSE_HELPER_CMP(cmple, FPU_CMPLE)
+SSE_HELPER_CMP(cmpunord, FPU_CMPUNORD)
+SSE_HELPER_CMP(cmpneq, FPU_CMPNEQ)
+SSE_HELPER_CMP(cmpnlt, FPU_CMPNLT)
+SSE_HELPER_CMP(cmpnle, FPU_CMPNLE)
+SSE_HELPER_CMP(cmpord, FPU_CMPORD)
+
+DEF_HELPER(void, helper_ucomiss, (Reg *d, Reg *s))
+DEF_HELPER(void, helper_comiss, (Reg *d, Reg *s))
+DEF_HELPER(void, helper_ucomisd, (Reg *d, Reg *s))
+DEF_HELPER(void, helper_comisd, (Reg *d, Reg *s))
+DEF_HELPER(uint32_t, helper_movmskps, (Reg *s))
+DEF_HELPER(uint32_t, helper_movmskpd, (Reg *s))
#endif
-uint32_t glue(helper_pmovmskb, SUFFIX)(Reg *s);
-void glue(helper_packsswb, SUFFIX) (Reg *d, Reg *s);
-void glue(helper_packuswb, SUFFIX) (Reg *d, Reg *s);
-void glue(helper_packssdw, SUFFIX) (Reg *d, Reg *s);
+DEF_HELPER(uint32_t, glue(helper_pmovmskb, SUFFIX), (Reg *s))
+DEF_HELPER(void, glue(helper_packsswb, SUFFIX) , (Reg *d, Reg *s))
+DEF_HELPER(void, glue(helper_packuswb, SUFFIX) , (Reg *d, Reg *s))
+DEF_HELPER(void, glue(helper_packssdw, SUFFIX) , (Reg *d, Reg *s))
#define UNPCK_OP(base_name, base) \
- void glue(helper_punpck ## base_name ## bw, SUFFIX) (Reg *d, Reg *s); \
- void glue(helper_punpck ## base_name ## wd, SUFFIX) (Reg *d, Reg *s); \
- void glue(helper_punpck ## base_name ## dq, SUFFIX) (Reg *d, Reg *s);
+ DEF_HELPER(void, glue(helper_punpck ## base_name ## bw, SUFFIX) , (Reg *d, Reg *s)) \
+ DEF_HELPER(void, glue(helper_punpck ## base_name ## wd, SUFFIX) , (Reg *d, Reg *s)) \
+ DEF_HELPER(void, glue(helper_punpck ## base_name ## dq, SUFFIX) , (Reg *d, Reg *s))
-UNPCK_OP(l, 0);
-UNPCK_OP(h, 1);
+UNPCK_OP(l, 0)
+UNPCK_OP(h, 1)
#if SHIFT == 1
-void glue(helper_punpcklqdq, SUFFIX) (Reg *d, Reg *s);
-void glue(helper_punpckhqdq, SUFFIX) (Reg *d, Reg *s);
+DEF_HELPER(void, glue(helper_punpcklqdq, SUFFIX) , (Reg *d, Reg *s))
+DEF_HELPER(void, glue(helper_punpckhqdq, SUFFIX) , (Reg *d, Reg *s))
#endif
/* 3DNow! float ops */
#if SHIFT == 0
-void helper_pi2fd(MMXReg *d, MMXReg *s);
-void helper_pi2fw(MMXReg *d, MMXReg *s);
-void helper_pf2id(MMXReg *d, MMXReg *s);
-void helper_pf2iw(MMXReg *d, MMXReg *s);
-void helper_pfacc(MMXReg *d, MMXReg *s);
-void helper_pfadd(MMXReg *d, MMXReg *s);
-void helper_pfcmpeq(MMXReg *d, MMXReg *s);
-void helper_pfcmpge(MMXReg *d, MMXReg *s);
-void helper_pfcmpgt(MMXReg *d, MMXReg *s);
-void helper_pfmax(MMXReg *d, MMXReg *s);
-void helper_pfmin(MMXReg *d, MMXReg *s);
-void helper_pfmul(MMXReg *d, MMXReg *s);
-void helper_pfnacc(MMXReg *d, MMXReg *s);
-void helper_pfpnacc(MMXReg *d, MMXReg *s);
-void helper_pfrcp(MMXReg *d, MMXReg *s);
-void helper_pfrsqrt(MMXReg *d, MMXReg *s);
-void helper_pfsub(MMXReg *d, MMXReg *s);
-void helper_pfsubr(MMXReg *d, MMXReg *s);
-void helper_pswapd(MMXReg *d, MMXReg *s);
+DEF_HELPER(void, helper_pi2fd, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pi2fw, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pf2id, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pf2iw, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pfacc, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pfadd, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pfcmpeq, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pfcmpge, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pfcmpgt, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pfmax, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pfmin, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pfmul, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pfnacc, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pfpnacc, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pfrcp, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pfrsqrt, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pfsub, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pfsubr, (MMXReg *d, MMXReg *s))
+DEF_HELPER(void, helper_pswapd, (MMXReg *d, MMXReg *s))
#endif
#undef SHIFT
diff --git a/target-i386/translate.c b/target-i386/translate.c
index 844cdb2c19..3241939d7e 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -7075,6 +7075,11 @@ void optimize_flags_init(void)
TCG_AREG0, offsetof(CPUState, cc_src), "cc_src");
cpu_cc_dst = tcg_global_mem_new(TCG_TYPE_TL,
TCG_AREG0, offsetof(CPUState, cc_dst), "cc_dst");
+
+ /* register helpers */
+
+#define DEF_HELPER(ret, name, params) tcg_register_helper(name, #name);
+#include "helper.h"
}
/* generate intermediate code in gen_opc_buf and gen_opparam_buf for