mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
x86jit: Optimize loads of 0 into fp regs.
This commit is contained in:
1 parent
7d8858687e
commit
27d8108bb2
2 files changed
+12
-4
No files matched your search
@@ -384,9 +384,13 @@ void Jit::Comp_mxc1(MIPSOpcode op) {
|
||||
return;
|
||||
|
||||
case 4: //FI(fs) = R(rt); break; //mtc1
|
||||
gpr.KillImmediate(rt, true, false);
|
||||
fpr.MapReg(fs, false, true);
|
||||
MOVD_xmm(fpr.RX(fs), gpr.R(rt));
|
||||
if (gpr.IsImm(rt) && gpr.GetImm(rt) == 0) {
|
||||
XORPS(fpr.RX(fs), fpr.R(fs));
|
||||
} else {
|
||||
gpr.KillImmediate(rt, true, false);
|
||||
MOVD_xmm(fpr.RX(fs), gpr.R(rt));
|
||||
}
|
||||
return;
|
||||
|
||||
case 6: //currentMIPS->WriteFCR(fs, R(rt)); break; //ctc1
|
||||
|
||||
@@ -1848,8 +1848,12 @@ void Jit::Comp_Mftv(MIPSOpcode op) {
|
||||
if (imm < 128) { // VI(imm) = R(rt);
|
||||
fpr.MapRegV(imm, MAP_DIRTY | MAP_NOINIT);
|
||||
// Let's not bother mapping rt if we don't have to.
|
||||
gpr.KillImmediate(rt, true, false);
|
||||
MOVD_xmm(fpr.VX(imm), gpr.R(rt));
|
||||
if (gpr.IsImm(rt) && gpr.GetImm(rt) == 0) {
|
||||
XORPS(fpr.VX(imm), fpr.V(imm));
|
||||
} else {
|
||||
gpr.KillImmediate(rt, true, false);
|
||||
MOVD_xmm(fpr.VX(imm), gpr.R(rt));
|
||||
}
|
||||
} else if (imm < 128 + VFPU_CTRL_MAX) { //mtvc //currentMIPS->vfpuCtrl[imm - 128] = R(rt);
|
||||
if (imm - 128 == VFPU_CTRL_CC) {
|
||||
if (gpr.IsImm(rt)) {
|
||||
|
||||
Reference in new issue
Block a user