armemu: Fix FSUBS bug where NaN shouldn't be negated

This commit is contained in:
Normmatt 2014-12-16 05:53:19 -05:00 committed by Lioncash
parent 0fd731ee63
commit 2ed03c10e0

View file

@ -1148,7 +1148,10 @@ static u32 vfp_single_fsub(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr)
/*
* Subtraction is addition with one sign inverted.
*/
return vfp_single_fadd(state, sd, sn, vfp_single_packed_negate(m), fpscr);
if (m != 0x7FC00000) // Only negate if m isn't NaN.
m = vfp_single_packed_negate(m);
return vfp_single_fadd(state, sd, sn, m, fpscr);
}
/*