mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-27 08:15:33 +01:00
Interpreter: Use correct destination for psq_l, psq_lx, psq_lu, and psq_lux.
Gekko manual defines these as storing to rD, not rS. Also removed FL_OUT_FLOAT_S, since nothing uses it now.
This commit is contained in:
parent
7bc2830520
commit
7c244766dc
@ -155,8 +155,8 @@ void Interpreter::psq_l(UGeckoInstruction _inst)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rPS0(_inst.RS) = ps0;
|
rPS0(_inst.RD) = ps0;
|
||||||
rPS1(_inst.RS) = ps1;
|
rPS1(_inst.RD) = ps1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -165,8 +165,8 @@ void Interpreter::psq_l(UGeckoInstruction _inst)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rPS0(_inst.RS) = ps0;
|
rPS0(_inst.RD) = ps0;
|
||||||
rPS1(_inst.RS) = 1.0f;
|
rPS1(_inst.RD) = 1.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,8 +191,8 @@ void Interpreter::psq_lu(UGeckoInstruction _inst)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rPS0(_inst.RS) = ps0;
|
rPS0(_inst.RD) = ps0;
|
||||||
rPS1(_inst.RS) = ps1;
|
rPS1(_inst.RD) = ps1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -201,8 +201,8 @@ void Interpreter::psq_lu(UGeckoInstruction _inst)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rPS0(_inst.RS) = ps0;
|
rPS0(_inst.RD) = ps0;
|
||||||
rPS1(_inst.RS) = 1.0f;
|
rPS1(_inst.RD) = 1.0f;
|
||||||
}
|
}
|
||||||
rGPR[_inst.RA] = EA;
|
rGPR[_inst.RA] = EA;
|
||||||
}
|
}
|
||||||
@ -284,8 +284,8 @@ void Interpreter::psq_lx(UGeckoInstruction _inst)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
rPS0(_inst.RS) = ps0;
|
rPS0(_inst.RD) = ps0;
|
||||||
rPS1(_inst.RS) = ps1;
|
rPS1(_inst.RD) = ps1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -297,8 +297,8 @@ void Interpreter::psq_lx(UGeckoInstruction _inst)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
rPS0(_inst.RS) = ps0;
|
rPS0(_inst.RD) = ps0;
|
||||||
rPS1(_inst.RS) = ps1;
|
rPS1(_inst.RD) = ps1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,8 +347,8 @@ void Interpreter::psq_lux(UGeckoInstruction _inst)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rPS0(_inst.RS) = ps0;
|
rPS0(_inst.RD) = ps0;
|
||||||
rPS1(_inst.RS) = ps1;
|
rPS1(_inst.RD) = ps1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -357,8 +357,8 @@ void Interpreter::psq_lux(UGeckoInstruction _inst)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rPS0(_inst.RS) = ps0;
|
rPS0(_inst.RD) = ps0;
|
||||||
rPS1(_inst.RS) = 1.0f;
|
rPS1(_inst.RD) = 1.0f;
|
||||||
}
|
}
|
||||||
rGPR[_inst.RA] = EA;
|
rGPR[_inst.RA] = EA;
|
||||||
}
|
}
|
||||||
|
@ -81,8 +81,8 @@ static GekkoOPTemplate primarytable[] =
|
|||||||
{54, Interpreter::stfd, {"stfd", OPTYPE_STOREFP, FL_IN_FLOAT_S | FL_IN_A | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
{54, Interpreter::stfd, {"stfd", OPTYPE_STOREFP, FL_IN_FLOAT_S | FL_IN_A | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
||||||
{55, Interpreter::stfdu, {"stfdu", OPTYPE_STOREFP, FL_IN_FLOAT_S | FL_OUT_A | FL_IN_A | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
{55, Interpreter::stfdu, {"stfdu", OPTYPE_STOREFP, FL_IN_FLOAT_S | FL_OUT_A | FL_IN_A | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
||||||
|
|
||||||
{56, Interpreter::psq_l, {"psq_l", OPTYPE_LOADPS, FL_OUT_FLOAT_S | FL_IN_A | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
{56, Interpreter::psq_l, {"psq_l", OPTYPE_LOADPS, FL_OUT_FLOAT_D | FL_IN_A | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
||||||
{57, Interpreter::psq_lu, {"psq_lu", OPTYPE_LOADPS, FL_OUT_FLOAT_S | FL_OUT_A | FL_IN_A | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
{57, Interpreter::psq_lu, {"psq_lu", OPTYPE_LOADPS, FL_OUT_FLOAT_D | FL_OUT_A | FL_IN_A | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
||||||
{60, Interpreter::psq_st, {"psq_st", OPTYPE_STOREPS, FL_IN_FLOAT_S | FL_IN_A | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
{60, Interpreter::psq_st, {"psq_st", OPTYPE_STOREPS, FL_IN_FLOAT_S | FL_IN_A | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
||||||
{61, Interpreter::psq_stu, {"psq_stu", OPTYPE_STOREPS, FL_IN_FLOAT_S | FL_OUT_A | FL_IN_A | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
{61, Interpreter::psq_stu, {"psq_stu", OPTYPE_STOREPS, FL_IN_FLOAT_S | FL_OUT_A | FL_IN_A | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
||||||
|
|
||||||
@ -131,9 +131,9 @@ static GekkoOPTemplate table4_2[] =
|
|||||||
|
|
||||||
static GekkoOPTemplate table4_3[] =
|
static GekkoOPTemplate table4_3[] =
|
||||||
{
|
{
|
||||||
{6, Interpreter::psq_lx, {"psq_lx", OPTYPE_LOADPS, FL_OUT_FLOAT_S | FL_IN_A0B | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
{6, Interpreter::psq_lx, {"psq_lx", OPTYPE_LOADPS, FL_OUT_FLOAT_D | FL_IN_A0B | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
||||||
{7, Interpreter::psq_stx, {"psq_stx", OPTYPE_STOREPS, FL_IN_FLOAT_S | FL_IN_A0B | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
{7, Interpreter::psq_stx, {"psq_stx", OPTYPE_STOREPS, FL_IN_FLOAT_S | FL_IN_A0B | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
||||||
{38, Interpreter::psq_lux, {"psq_lux", OPTYPE_LOADPS, FL_OUT_FLOAT_S | FL_OUT_A | FL_IN_AB | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
{38, Interpreter::psq_lux, {"psq_lux", OPTYPE_LOADPS, FL_OUT_FLOAT_D | FL_OUT_A | FL_IN_AB | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
||||||
{39, Interpreter::psq_stux, {"psq_stux", OPTYPE_STOREPS, FL_IN_FLOAT_S | FL_OUT_A | FL_IN_AB | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
{39, Interpreter::psq_stux, {"psq_stux", OPTYPE_STOREPS, FL_IN_FLOAT_S | FL_OUT_A | FL_IN_AB | FL_USE_FPU | FL_LOADSTORE, 1, 0, 0, 0}},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -589,8 +589,7 @@ void PPCAnalyzer::SetInstructionStats(CodeBlock *block, CodeOp *code, GekkoOPInf
|
|||||||
code->fregOut = -1;
|
code->fregOut = -1;
|
||||||
if (opinfo->flags & FL_OUT_FLOAT_D)
|
if (opinfo->flags & FL_OUT_FLOAT_D)
|
||||||
code->fregOut = code->inst.FD;
|
code->fregOut = code->inst.FD;
|
||||||
else if (opinfo->flags & FL_OUT_FLOAT_S)
|
|
||||||
code->fregOut = code->inst.FS;
|
|
||||||
code->fregsIn = BitSet32(0);
|
code->fregsIn = BitSet32(0);
|
||||||
if (opinfo->flags & FL_IN_FLOAT_A)
|
if (opinfo->flags & FL_IN_FLOAT_A)
|
||||||
code->fregsIn[code->inst.FA] = true;
|
code->fregsIn[code->inst.FA] = true;
|
||||||
|
@ -51,7 +51,6 @@ enum
|
|||||||
FL_IN_FLOAT_AC = FL_IN_FLOAT_A | FL_IN_FLOAT_C,
|
FL_IN_FLOAT_AC = FL_IN_FLOAT_A | FL_IN_FLOAT_C,
|
||||||
FL_IN_FLOAT_ABC = FL_IN_FLOAT_A | FL_IN_FLOAT_B | FL_IN_FLOAT_C,
|
FL_IN_FLOAT_ABC = FL_IN_FLOAT_A | FL_IN_FLOAT_B | FL_IN_FLOAT_C,
|
||||||
FL_OUT_FLOAT_D = (1<<28), // frD is used as a destination.
|
FL_OUT_FLOAT_D = (1<<28), // frD is used as a destination.
|
||||||
FL_OUT_FLOAT_S = (1<<29), // frS is used as a destination.
|
|
||||||
// Used in the case of double ops (they don't modify the top half of the output)
|
// Used in the case of double ops (they don't modify the top half of the output)
|
||||||
FL_INOUT_FLOAT_D = FL_IN_FLOAT_D | FL_OUT_FLOAT_D,
|
FL_INOUT_FLOAT_D = FL_IN_FLOAT_D | FL_OUT_FLOAT_D,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user