mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
SPU: Minor FREST bugfix
This commit is contained in:
parent
f05a3da964
commit
160ddcf86b
2 changed files with 5 additions and 9 deletions
|
@ -1908,20 +1908,16 @@ bool spu_interpreter_precise::FREST(spu_thread& spu, spu_opcode_t op)
|
|||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
const auto a = ra._f[i];
|
||||
switch (fexpf(a))
|
||||
{
|
||||
case 0:
|
||||
const int exp = fexpf(a);
|
||||
|
||||
if (exp == 0)
|
||||
{
|
||||
spu.fpscr.setDivideByZeroFlag(i);
|
||||
res._f[i] = extended(std::signbit(a), 0x7FFFFF);
|
||||
break;
|
||||
}
|
||||
case (0x7e800000 >> 23): // Special case for value not handled properly in rcpps
|
||||
else if (exp >= (0x7e800000 >> 23)) // Special case for values not handled properly in rcpps
|
||||
{
|
||||
res._f[i] = 0.0f;
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7225,7 +7225,7 @@ public:
|
|||
{
|
||||
const auto a = get_vr<f32[4]>(op.ra);
|
||||
const auto mask_ov = sext<s32[4]>(bitcast<s32[4]>(fabs(a)) > splat<s32[4]>(0x7e7fffff));
|
||||
const auto mask_de = eval(noncast<u32[4]>(sext<s32[4]>(fcmp_uno(a == fsplat<f32[4]>(0.)))) >> 1);
|
||||
const auto mask_de = eval(noncast<u32[4]>(sext<s32[4]>(fcmp_ord(a == fsplat<f32[4]>(0.)))) >> 1);
|
||||
set_vr(op.rt, (bitcast<s32[4]>(fre(a)) & ~mask_ov) | noncast<s32[4]>(mask_de));
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue