target/sh4: do not use a helper to implement fneg
There is no need to use a helper to flip one bit, just use a TCG xor instruction instead. Message-Id: <20170702202814.27793-5-aurelien@aurel32.net> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
801f4dac57
commit
82e8251374
@ -32,7 +32,6 @@ DEF_HELPER_FLAGS_2(float_DT, TCG_CALL_NO_WG, f64, env, i32)
|
||||
DEF_HELPER_FLAGS_4(fmac_FT, TCG_CALL_NO_WG, f32, env, f32, f32, f32)
|
||||
DEF_HELPER_FLAGS_3(fmul_FT, TCG_CALL_NO_WG, f32, env, f32, f32)
|
||||
DEF_HELPER_FLAGS_3(fmul_DT, TCG_CALL_NO_WG, f64, env, f64, f64)
|
||||
DEF_HELPER_FLAGS_1(fneg_T, TCG_CALL_NO_RWG_SE, f32, f32)
|
||||
DEF_HELPER_FLAGS_3(fsub_FT, TCG_CALL_NO_WG, f32, env, f32, f32)
|
||||
DEF_HELPER_FLAGS_3(fsub_DT, TCG_CALL_NO_WG, f64, env, f64, f64)
|
||||
DEF_HELPER_FLAGS_2(fsqrt_FT, TCG_CALL_NO_WG, f32, env, f32)
|
||||
|
@ -384,11 +384,6 @@ float64 helper_fmul_DT(CPUSH4State *env, float64 t0, float64 t1)
|
||||
return t0;
|
||||
}
|
||||
|
||||
float32 helper_fneg_T(float32 t0)
|
||||
{
|
||||
return float32_chs(t0);
|
||||
}
|
||||
|
||||
float32 helper_fsqrt_FT(CPUSH4State *env, float32 t0)
|
||||
{
|
||||
set_float_exception_flags(0, &env->fp_status);
|
||||
|
@ -1691,9 +1691,8 @@ static void _decode_opc(DisasContext * ctx)
|
||||
return;
|
||||
case 0xf04d: /* fneg FRn/DRn - FPSCR: Nothing */
|
||||
CHECK_FPU_ENABLED
|
||||
{
|
||||
gen_helper_fneg_T(cpu_fregs[FREG(B11_8)], cpu_fregs[FREG(B11_8)]);
|
||||
}
|
||||
tcg_gen_xori_i32(cpu_fregs[FREG(B11_8)], cpu_fregs[FREG(B11_8)],
|
||||
0x80000000);
|
||||
return;
|
||||
case 0xf05d: /* fabs FRn/DRn - FPCSR: Nothing */
|
||||
CHECK_FPU_ENABLED
|
||||
|
Loading…
Reference in New Issue
Block a user