mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
PowerPC: Thread state through PS dequantize helper
This commit is contained in:
parent
5a4700f589
commit
e12cdbefa5
@ -292,7 +292,6 @@ private:
|
|||||||
static void Helper_UpdateCR0(u32 value);
|
static void Helper_UpdateCR0(u32 value);
|
||||||
|
|
||||||
// paired helper
|
// paired helper
|
||||||
static void Helper_Dequantize(u32 addr, u32 instI, u32 instRD, u32 instW);
|
|
||||||
static void Helper_Quantize(u32 addr, u32 instI, u32 instRS, u32 instW);
|
static void Helper_Quantize(u32 addr, u32 instI, u32 instRS, u32 instW);
|
||||||
|
|
||||||
static void Helper_FloatCompareOrdered(UGeckoInstruction inst, double a, double b);
|
static void Helper_FloatCompareOrdered(UGeckoInstruction inst, double a, double b);
|
||||||
|
@ -245,9 +245,10 @@ std::pair<float, float> LoadAndDequantize(u32 addr, u32 instW, u32 ldScale)
|
|||||||
return {ps0, ps1};
|
return {ps0, ps1};
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::Helper_Dequantize(u32 addr, u32 instI, u32 instRD, u32 instW)
|
static void Helper_Dequantize(PowerPC::PowerPCState* ppcs, u32 addr, u32 instI, u32 instRD,
|
||||||
|
u32 instW)
|
||||||
{
|
{
|
||||||
UGQR gqr(rSPR(SPR_GQR0 + instI));
|
UGQR gqr(ppcs->spr[SPR_GQR0 + instI]);
|
||||||
EQuantizeType ldType = gqr.ld_type;
|
EQuantizeType ldType = gqr.ld_type;
|
||||||
unsigned int ldScale = gqr.ld_scale;
|
unsigned int ldScale = gqr.ld_scale;
|
||||||
|
|
||||||
@ -296,12 +297,12 @@ void Interpreter::Helper_Dequantize(u32 addr, u32 instI, u32 instRD, u32 instW)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PowerPC::ppcState.Exceptions & EXCEPTION_DSI)
|
if (ppcs->Exceptions & EXCEPTION_DSI)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
rPS(instRD).SetBoth(ps0, ps1);
|
ppcs->ps[instRD].SetBoth(ps0, ps1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::psq_l(UGeckoInstruction inst)
|
void Interpreter::psq_l(UGeckoInstruction inst)
|
||||||
@ -313,7 +314,7 @@ void Interpreter::psq_l(UGeckoInstruction inst)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const u32 EA = inst.RA ? (rGPR[inst.RA] + inst.SIMM_12) : (u32)inst.SIMM_12;
|
const u32 EA = inst.RA ? (rGPR[inst.RA] + inst.SIMM_12) : (u32)inst.SIMM_12;
|
||||||
Helper_Dequantize(EA, inst.I, inst.RD, inst.W);
|
Helper_Dequantize(&PowerPC::ppcState, EA, inst.I, inst.RD, inst.W);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::psq_lu(UGeckoInstruction inst)
|
void Interpreter::psq_lu(UGeckoInstruction inst)
|
||||||
@ -325,7 +326,7 @@ void Interpreter::psq_lu(UGeckoInstruction inst)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const u32 EA = rGPR[inst.RA] + inst.SIMM_12;
|
const u32 EA = rGPR[inst.RA] + inst.SIMM_12;
|
||||||
Helper_Dequantize(EA, inst.I, inst.RD, inst.W);
|
Helper_Dequantize(&PowerPC::ppcState, EA, inst.I, inst.RD, inst.W);
|
||||||
|
|
||||||
if (PowerPC::ppcState.Exceptions & EXCEPTION_DSI)
|
if (PowerPC::ppcState.Exceptions & EXCEPTION_DSI)
|
||||||
{
|
{
|
||||||
@ -367,7 +368,7 @@ void Interpreter::psq_stu(UGeckoInstruction inst)
|
|||||||
void Interpreter::psq_lx(UGeckoInstruction inst)
|
void Interpreter::psq_lx(UGeckoInstruction inst)
|
||||||
{
|
{
|
||||||
const u32 EA = inst.RA ? (rGPR[inst.RA] + rGPR[inst.RB]) : rGPR[inst.RB];
|
const u32 EA = inst.RA ? (rGPR[inst.RA] + rGPR[inst.RB]) : rGPR[inst.RB];
|
||||||
Helper_Dequantize(EA, inst.Ix, inst.RD, inst.Wx);
|
Helper_Dequantize(&PowerPC::ppcState, EA, inst.Ix, inst.RD, inst.Wx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::psq_stx(UGeckoInstruction inst)
|
void Interpreter::psq_stx(UGeckoInstruction inst)
|
||||||
@ -379,7 +380,7 @@ void Interpreter::psq_stx(UGeckoInstruction inst)
|
|||||||
void Interpreter::psq_lux(UGeckoInstruction inst)
|
void Interpreter::psq_lux(UGeckoInstruction inst)
|
||||||
{
|
{
|
||||||
const u32 EA = rGPR[inst.RA] + rGPR[inst.RB];
|
const u32 EA = rGPR[inst.RA] + rGPR[inst.RB];
|
||||||
Helper_Dequantize(EA, inst.Ix, inst.RD, inst.Wx);
|
Helper_Dequantize(&PowerPC::ppcState, EA, inst.Ix, inst.RD, inst.Wx);
|
||||||
|
|
||||||
if (PowerPC::ppcState.Exceptions & EXCEPTION_DSI)
|
if (PowerPC::ppcState.Exceptions & EXCEPTION_DSI)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user