mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 11:48:36 +12:00
SPU: Fix FREST
This commit is contained in:
parent
9b34f00241
commit
c9b0f0e734
3 changed files with 45 additions and 13 deletions
|
@ -7216,9 +7216,16 @@ public:
|
|||
{
|
||||
// TODO
|
||||
if (g_cfg.core.spu_accurate_xfloat)
|
||||
set_vr(op.rt, fsplat<f64[4]>(1.0) / get_vr<f64[4]>(op.ra));
|
||||
{
|
||||
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);
|
||||
set_vr(op.rt, (bitcast<s32[4]>(fre(a)) & ~mask_ov) | noncast<s32[4]>(mask_de));
|
||||
}
|
||||
else
|
||||
set_vr(op.rt, fsplat<f32[4]>(1.0) / get_vr<f32[4]>(op.ra));
|
||||
{
|
||||
set_vr(op.rt, fre(get_vr<f32[4]>(op.ra)));
|
||||
}
|
||||
}
|
||||
|
||||
void FRSQEST(spu_opcode_t op)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue