mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Merge pull request #11136 from AdmiralCurtiss/gqr-array
Jit64: Convert constantGqr to std::array.
This commit is contained in:
commit
333ede5416
@ -948,7 +948,7 @@ bool Jit64::DoJit(u32 em_address, JitBlock* b, u32 nextPC)
|
||||
js.downcountAmount = 0;
|
||||
js.skipInstructions = 0;
|
||||
js.carryFlag = CarryFlag::InPPCState;
|
||||
js.constantGqr.clear();
|
||||
js.constantGqrValid = BitSet8();
|
||||
|
||||
// Assume that GQR values don't change often at runtime. Many paired-heavy games use largely float
|
||||
// loads and stores,
|
||||
@ -979,6 +979,7 @@ bool Jit64::DoJit(u32 em_address, JitBlock* b, u32 nextPC)
|
||||
CMP_or_TEST(32, PPCSTATE(spr[SPR_GQR0 + gqr]), Imm32(value));
|
||||
J_CC(CC_NZ, target);
|
||||
}
|
||||
js.constantGqrValid = gqr_static;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,10 +35,6 @@ void Jit64::psq_stXX(UGeckoInstruction inst)
|
||||
int w = indexed ? inst.Wx : inst.W;
|
||||
FALLBACK_IF(!a);
|
||||
|
||||
auto it = js.constantGqr.find(i);
|
||||
bool gqrIsConstant = it != js.constantGqr.end();
|
||||
u32 gqrValue = gqrIsConstant ? it->second & 0xffff : 0;
|
||||
|
||||
RCX64Reg scratch_guard = gpr.Scratch(RSCRATCH_EXTRA);
|
||||
RCOpArg Ra = update ? gpr.Bind(a, RCMode::ReadWrite) : gpr.Use(a, RCMode::Read);
|
||||
RCOpArg Rb = indexed ? gpr.Use(b, RCMode::Read) : RCOpArg::Imm32((u32)offset);
|
||||
@ -56,8 +52,10 @@ void Jit64::psq_stXX(UGeckoInstruction inst)
|
||||
else
|
||||
CVTPD2PS(XMM0, Rs); // pair
|
||||
|
||||
const bool gqrIsConstant = js.constantGqrValid[i];
|
||||
if (gqrIsConstant)
|
||||
{
|
||||
const u32 gqrValue = js.constantGqr[i] & 0xffff;
|
||||
int type = gqrValue & 0x7;
|
||||
|
||||
// Paired stores (other than w/type zero) don't yield any real change in
|
||||
@ -126,10 +124,6 @@ void Jit64::psq_lXX(UGeckoInstruction inst)
|
||||
int w = indexed ? inst.Wx : inst.W;
|
||||
FALLBACK_IF(!a);
|
||||
|
||||
auto it = js.constantGqr.find(i);
|
||||
bool gqrIsConstant = it != js.constantGqr.end();
|
||||
u32 gqrValue = gqrIsConstant ? it->second >> 16 : 0;
|
||||
|
||||
RCX64Reg scratch_guard = gpr.Scratch(RSCRATCH_EXTRA);
|
||||
RCX64Reg Ra = gpr.Bind(a, update ? RCMode::ReadWrite : RCMode::Read);
|
||||
RCOpArg Rb = indexed ? gpr.Use(b, RCMode::Read) : RCOpArg::Imm32((u32)offset);
|
||||
@ -142,8 +136,10 @@ void Jit64::psq_lXX(UGeckoInstruction inst)
|
||||
if (update && !jo.memcheck)
|
||||
MOV(32, Ra, R(RSCRATCH_EXTRA));
|
||||
|
||||
const bool gqrIsConstant = js.constantGqrValid[i];
|
||||
if (gqrIsConstant)
|
||||
{
|
||||
const u32 gqrValue = js.constantGqr[i] >> 16;
|
||||
GenQuantizedLoad(w == 1, static_cast<EQuantizeType>(gqrValue & 0x7), (gqrValue & 0x3F00) >> 8);
|
||||
}
|
||||
else
|
||||
|
@ -83,7 +83,8 @@ protected:
|
||||
Gen::FixupBranch exceptionHandler;
|
||||
|
||||
bool assumeNoPairedQuantize;
|
||||
std::map<u8, u32> constantGqr;
|
||||
BitSet8 constantGqrValid;
|
||||
std::array<u32, 8> constantGqr;
|
||||
bool firstFPInstructionFound;
|
||||
bool isLastInstruction;
|
||||
int skipInstructions;
|
||||
|
Loading…
x
Reference in New Issue
Block a user