Merge pull request #6518 from lioncash/namespace

Interpreter: Don't dump the MathUtils namespace into scope in Interpreter_FloatingPoint and Interpreter_Paired
This commit is contained in:
Léo Lam 2018-03-25 11:24:24 +02:00 committed by GitHub
commit e9976c27c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 12 deletions

View File

@ -11,8 +11,6 @@
#include "Core/PowerPC/Interpreter/Interpreter_FPUtils.h"
#include "Core/PowerPC/PowerPC.h"
using namespace MathUtil;
// Extremely rare - actually, never seen.
// Star Wars : Rogue Leader spams that at some point :|
void Interpreter::Helper_UpdateCR1()
@ -27,7 +25,7 @@ void Interpreter::Helper_FloatCompareOrdered(UGeckoInstruction inst, double fa,
if (std::isnan(fa) || std::isnan(fb))
{
compareResult = FPCC::FU;
if (IsSNAN(fa) || IsSNAN(fb))
if (MathUtil::IsSNAN(fa) || MathUtil::IsSNAN(fb))
{
SetFPException(FPSCR_VXSNAN);
if (FPSCR.VE == 0)
@ -67,7 +65,7 @@ void Interpreter::Helper_FloatCompareUnordered(UGeckoInstruction inst, double fa
{
compareResult = FPCC::FU;
if (IsSNAN(fa) || IsSNAN(fb))
if (MathUtil::IsSNAN(fa) || MathUtil::IsSNAN(fb))
{
SetFPException(FPSCR_VXSNAN);
}
@ -371,7 +369,7 @@ void Interpreter::fdivsx(UGeckoInstruction inst)
void Interpreter::fresx(UGeckoInstruction inst)
{
double b = rPS0(inst.FB);
rPS0(inst.FD) = rPS1(inst.FD) = ApproximateReciprocal(b);
rPS0(inst.FD) = rPS1(inst.FD) = MathUtil::ApproximateReciprocal(b);
if (b == 0.0)
{
@ -397,7 +395,7 @@ void Interpreter::frsqrtex(UGeckoInstruction inst)
SetFPException(FPSCR_ZX);
}
rPS0(inst.FD) = ApproximateReciprocalSquareRoot(b);
rPS0(inst.FD) = MathUtil::ApproximateReciprocalSquareRoot(b);
PowerPC::UpdateFPRF(rPS0(inst.FD));
if (inst.Rc)

View File

@ -10,8 +10,6 @@
#include "Core/PowerPC/Interpreter/Interpreter_FPUtils.h"
#include "Core/PowerPC/PowerPC.h"
using namespace MathUtil;
// These "binary instructions" do not alter FPSCR.
void Interpreter::ps_sel(UGeckoInstruction inst)
{
@ -125,8 +123,8 @@ void Interpreter::ps_res(UGeckoInstruction inst)
SetFPException(FPSCR_ZX);
}
rPS0(inst.FD) = ApproximateReciprocal(a);
rPS1(inst.FD) = ApproximateReciprocal(b);
rPS0(inst.FD) = MathUtil::ApproximateReciprocal(a);
rPS1(inst.FD) = MathUtil::ApproximateReciprocal(b);
PowerPC::UpdateFPRF(rPS0(inst.FD));
if (inst.Rc)
@ -145,8 +143,8 @@ void Interpreter::ps_rsqrte(UGeckoInstruction inst)
SetFPException(FPSCR_VXSQRT);
}
rPS0(inst.FD) = ForceSingle(ApproximateReciprocalSquareRoot(rPS0(inst.FB)));
rPS1(inst.FD) = ForceSingle(ApproximateReciprocalSquareRoot(rPS1(inst.FB)));
rPS0(inst.FD) = ForceSingle(MathUtil::ApproximateReciprocalSquareRoot(rPS0(inst.FB)));
rPS1(inst.FD) = ForceSingle(MathUtil::ApproximateReciprocalSquareRoot(rPS1(inst.FB)));
PowerPC::UpdateFPRF(rPS0(inst.FD));