mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-29 23:06:23 -05:00
Merge pull request #290 from lioncash/vsub
armemu: Backport some VFP fixes from 3dmoo.
This commit is contained in:
commit
ec9ac2f51a
1 changed files with 5 additions and 2 deletions
|
@ -614,7 +614,7 @@ static u32 vfp_single_ftoui(ARMul_State* state, int sd, int unused, s32 m, u32 f
|
||||||
exceptions |= FPSCR_IDC;
|
exceptions |= FPSCR_IDC;
|
||||||
|
|
||||||
if (tm & VFP_NAN)
|
if (tm & VFP_NAN)
|
||||||
vsm.sign = 0;
|
vsm.sign = 1;
|
||||||
|
|
||||||
if (vsm.exponent >= 127 + 32) {
|
if (vsm.exponent >= 127 + 32) {
|
||||||
d = vsm.sign ? 0 : 0xffffffff;
|
d = vsm.sign ? 0 : 0xffffffff;
|
||||||
|
@ -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.
|
* 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue