mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-26 04:40:06 +00:00
Dyncom/VFP: Properly pack QNaN values.
vfp_*_normaliseround was previously converting qnans into numbers, ie, 7fc00000 (qnan) into 7f000000 (1.7014118e+38). Closes #2680
This commit is contained in:
parent
e33558c6ce
commit
3cc693df0b
@ -90,10 +90,12 @@ u32 vfp_double_normaliseround(ARMul_State* state, int dd, struct vfp_double* vd,
|
|||||||
|
|
||||||
vfp_double_dump("pack: in", vd);
|
vfp_double_dump("pack: in", vd);
|
||||||
|
|
||||||
|
int td = vfp_double_type(vd);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Infinities and NaNs are a special case.
|
* Infinities and NaNs are a special case.
|
||||||
*/
|
*/
|
||||||
if (vd->exponent == 2047 && (vd->significand == 0 || exceptions))
|
if (td & (VFP_NAN | VFP_INFINITY))
|
||||||
goto pack;
|
goto pack;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -90,10 +90,12 @@ u32 vfp_single_normaliseround(ARMul_State* state, int sd, struct vfp_single* vs,
|
|||||||
|
|
||||||
vfp_single_dump("pack: in", vs);
|
vfp_single_dump("pack: in", vs);
|
||||||
|
|
||||||
|
int ts = vfp_single_type(vs);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Infinities and NaNs are a special case.
|
* Infinities and NaNs are a special case.
|
||||||
*/
|
*/
|
||||||
if (vs->exponent == 255 && (vs->significand == 0 || exceptions))
|
if (ts & (VFP_NAN | VFP_INFINITY))
|
||||||
goto pack;
|
goto pack;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user