Skip to content
Snippets Groups Projects
Commit 2ed03c10 authored by Normmatt's avatar Normmatt Committed by Lioncash
Browse files

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

parent 0fd731ee
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment