diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-19 16:10:23 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-19 16:10:23 +0000 |
commit | af12906f77f37a3dd7da158d5b42d90a59d6fc7a (patch) | |
tree | 2bc089418ae100cdd88f471d3260a75d1ce74c24 /target-ppc/op.c | |
parent | a3d6841ff82223f4c2bb05dbf3e29335e15f31c2 (diff) |
target-ppc: convert fp ops to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5754 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op.c')
-rw-r--r-- | target-ppc/op.c | 280 |
1 files changed, 0 insertions, 280 deletions
diff --git a/target-ppc/op.c b/target-ppc/op.c index 10a22eba5e..1ef5dbd3a1 100644 --- a/target-ppc/op.c +++ b/target-ppc/op.c @@ -261,71 +261,6 @@ void OPPROTO op_store_dbatl (void) } #endif /* !defined(CONFIG_USER_ONLY) */ -/* FPSCR */ -#ifdef CONFIG_SOFTFLOAT -void OPPROTO op_reset_fpstatus (void) -{ - env->fp_status.float_exception_flags = 0; - RETURN(); -} -#endif - -void OPPROTO op_compute_fprf (void) -{ - do_compute_fprf(PARAM1); - RETURN(); -} - -#ifdef CONFIG_SOFTFLOAT -void OPPROTO op_float_check_status (void) -{ - do_float_check_status(); - RETURN(); -} -#else -void OPPROTO op_float_check_status (void) -{ - if (env->exception_index == POWERPC_EXCP_PROGRAM && - (env->error_code & POWERPC_EXCP_FP)) { - /* Differred floating-point exception after target FPR update */ - if (msr_fe0 != 0 || msr_fe1 != 0) - do_raise_exception_err(env->exception_index, env->error_code); - } - RETURN(); -} -#endif - -void OPPROTO op_load_fpscr_FT0 (void) -{ - /* The 32 MSB of the target fpr are undefined. - * They'll be zero... - */ - CPU_DoubleU u; - - u.l.upper = 0; - u.l.lower = env->fpscr; - FT0 = u.d; - RETURN(); -} - -void OPPROTO op_fpscr_resetbit (void) -{ - env->fpscr &= PARAM1; - RETURN(); -} - -void OPPROTO op_fpscr_setbit (void) -{ - do_fpscr_setbit(PARAM1); - RETURN(); -} - -void OPPROTO op_store_fpscr (void) -{ - do_store_fpscr(PARAM1); - RETURN(); -} - /*** Integer shift ***/ void OPPROTO op_srli_T1 (void) { @@ -333,221 +268,6 @@ void OPPROTO op_srli_T1 (void) RETURN(); } -/*** Floating-Point arithmetic ***/ -/* fadd - fadd. */ -void OPPROTO op_fadd (void) -{ -#if USE_PRECISE_EMULATION - do_fadd(); -#else - FT0 = float64_add(FT0, FT1, &env->fp_status); -#endif - RETURN(); -} - -/* fsub - fsub. */ -void OPPROTO op_fsub (void) -{ -#if USE_PRECISE_EMULATION - do_fsub(); -#else - FT0 = float64_sub(FT0, FT1, &env->fp_status); -#endif - RETURN(); -} - -/* fmul - fmul. */ -void OPPROTO op_fmul (void) -{ -#if USE_PRECISE_EMULATION - do_fmul(); -#else - FT0 = float64_mul(FT0, FT1, &env->fp_status); -#endif - RETURN(); -} - -/* fdiv - fdiv. */ -void OPPROTO op_fdiv (void) -{ -#if USE_PRECISE_EMULATION - do_fdiv(); -#else - FT0 = float64_div(FT0, FT1, &env->fp_status); -#endif - RETURN(); -} - -/* fsqrt - fsqrt. */ -void OPPROTO op_fsqrt (void) -{ - do_fsqrt(); - RETURN(); -} - -/* fre - fre. */ -void OPPROTO op_fre (void) -{ - do_fre(); - RETURN(); -} - -/* fres - fres. */ -void OPPROTO op_fres (void) -{ - do_fres(); - RETURN(); -} - -/* frsqrte - frsqrte. */ -void OPPROTO op_frsqrte (void) -{ - do_frsqrte(); - RETURN(); -} - -/* fsel - fsel. */ -void OPPROTO op_fsel (void) -{ - do_fsel(); - RETURN(); -} - -/*** Floating-Point multiply-and-add ***/ -/* fmadd - fmadd. */ -void OPPROTO op_fmadd (void) -{ -#if USE_PRECISE_EMULATION - do_fmadd(); -#else - FT0 = float64_mul(FT0, FT1, &env->fp_status); - FT0 = float64_add(FT0, FT2, &env->fp_status); -#endif - RETURN(); -} - -/* fmsub - fmsub. */ -void OPPROTO op_fmsub (void) -{ -#if USE_PRECISE_EMULATION - do_fmsub(); -#else - FT0 = float64_mul(FT0, FT1, &env->fp_status); - FT0 = float64_sub(FT0, FT2, &env->fp_status); -#endif - RETURN(); -} - -/* fnmadd - fnmadd. - fnmadds - fnmadds. */ -void OPPROTO op_fnmadd (void) -{ - do_fnmadd(); - RETURN(); -} - -/* fnmsub - fnmsub. */ -void OPPROTO op_fnmsub (void) -{ - do_fnmsub(); - RETURN(); -} - -/*** Floating-Point round & convert ***/ -/* frsp - frsp. */ -void OPPROTO op_frsp (void) -{ -#if USE_PRECISE_EMULATION - do_frsp(); -#else - FT0 = float64_to_float32(FT0, &env->fp_status); -#endif - RETURN(); -} - -/* fctiw - fctiw. */ -void OPPROTO op_fctiw (void) -{ - do_fctiw(); - RETURN(); -} - -/* fctiwz - fctiwz. */ -void OPPROTO op_fctiwz (void) -{ - do_fctiwz(); - RETURN(); -} - -#if defined(TARGET_PPC64) -/* fcfid - fcfid. */ -void OPPROTO op_fcfid (void) -{ - do_fcfid(); - RETURN(); -} - -/* fctid - fctid. */ -void OPPROTO op_fctid (void) -{ - do_fctid(); - RETURN(); -} - -/* fctidz - fctidz. */ -void OPPROTO op_fctidz (void) -{ - do_fctidz(); - RETURN(); -} -#endif - -void OPPROTO op_frin (void) -{ - do_frin(); - RETURN(); -} - -void OPPROTO op_friz (void) -{ - do_friz(); - RETURN(); -} - -void OPPROTO op_frip (void) -{ - do_frip(); - RETURN(); -} - -void OPPROTO op_frim (void) -{ - do_frim(); - RETURN(); -} - -/*** Floating-point move ***/ -/* fabs */ -void OPPROTO op_fabs (void) -{ - FT0 = float64_abs(FT0); - RETURN(); -} - -/* fnabs */ -void OPPROTO op_fnabs (void) -{ - FT0 = float64_abs(FT0); - FT0 = float64_chs(FT0); - RETURN(); -} - -/* fneg */ -void OPPROTO op_fneg (void) -{ - FT0 = float64_chs(FT0); - RETURN(); -} - /* Load and store */ #define MEMSUFFIX _raw #include "op_helper.h" |