mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-03-02 11:08:27 +00:00
Merge branch 'cpu-minor' into jit-minor
This commit is contained in:
commit
f1f48e26e4
@ -1034,6 +1034,9 @@ void __KernelLoadContext(ThreadContext *ctx)
|
||||
currentMIPS->fcr0 = ctx->fcr0;
|
||||
currentMIPS->fcr31 = ctx->fcr31;
|
||||
currentMIPS->fpcond = ctx->fpcond;
|
||||
|
||||
// Reset the llBit, the other thread may have touched memory.
|
||||
currentMIPS->llBit = 0;
|
||||
}
|
||||
|
||||
u32 __KernelResumeThreadFromWait(SceUID threadID)
|
||||
|
@ -304,7 +304,6 @@ namespace MIPSInt
|
||||
_dbg_assert_msg_(CPU,0,"Jump in delay slot :(");
|
||||
}
|
||||
|
||||
|
||||
int rs = (op>>21)&0x1f;
|
||||
u32 addr = R(rs);
|
||||
switch (op & 0x3f)
|
||||
@ -362,14 +361,18 @@ namespace MIPSInt
|
||||
switch (op >> 26)
|
||||
{
|
||||
case 48: // ll
|
||||
R(rt) = Memory::Read_U32(addr);
|
||||
if (rt != 0) {
|
||||
R(rt) = Memory::Read_U32(addr);
|
||||
}
|
||||
currentMIPS->llBit = 1;
|
||||
break;
|
||||
case 56: // sc
|
||||
if (currentMIPS->llBit) {
|
||||
Memory::Write_U32(R(rt), addr);
|
||||
R(rt) = 1;
|
||||
} else {
|
||||
if (rt != 0) {
|
||||
R(rt) = 1;
|
||||
}
|
||||
} else if (rt != 0) {
|
||||
R(rt) = 0;
|
||||
}
|
||||
break;
|
||||
@ -388,6 +391,13 @@ namespace MIPSInt
|
||||
int rd = _RD;
|
||||
static bool has_warned = false;
|
||||
|
||||
// Don't change $zr.
|
||||
if (rd == 0)
|
||||
{
|
||||
PC += 4;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (op & 63)
|
||||
{
|
||||
case 10: if (R(rt) == 0) R(rd) = R(rs); break; //movz
|
||||
@ -533,6 +543,14 @@ namespace MIPSInt
|
||||
{
|
||||
int rs = _RS;
|
||||
int rd = _RD;
|
||||
|
||||
// Don't change $zr.
|
||||
if (rd == 0)
|
||||
{
|
||||
PC += 4;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (op & 63)
|
||||
{
|
||||
case 22: //clz
|
||||
@ -675,6 +693,13 @@ namespace MIPSInt
|
||||
int rs = _RS;
|
||||
int rd = _RD;
|
||||
int sa = _FD;
|
||||
|
||||
// Don't change $zr.
|
||||
if (rd == 0)
|
||||
{
|
||||
PC += 4;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (op & 0x3f)
|
||||
{
|
||||
@ -720,6 +745,14 @@ namespace MIPSInt
|
||||
{
|
||||
int rt = _RT;
|
||||
int rd = _RD;
|
||||
|
||||
// Don't change $zr.
|
||||
if (rd == 0)
|
||||
{
|
||||
PC += 4;
|
||||
return;
|
||||
}
|
||||
|
||||
switch((op>>6)&31)
|
||||
{
|
||||
case 16: // seb
|
||||
@ -756,6 +789,13 @@ namespace MIPSInt
|
||||
int rt = _RT;
|
||||
int rd = _RD;
|
||||
|
||||
// Don't change $zr.
|
||||
if (rd == 0)
|
||||
{
|
||||
PC += 4;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (op & 0x3ff)
|
||||
{
|
||||
case 0xA0: //wsbh
|
||||
@ -777,6 +817,13 @@ namespace MIPSInt
|
||||
int rt = _RT;
|
||||
int pos = _POS;
|
||||
|
||||
// Don't change $zr.
|
||||
if (rt == 0)
|
||||
{
|
||||
PC += 4;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (op & 0x3f)
|
||||
{
|
||||
case 0x0: //ext
|
||||
|
Loading…
x
Reference in New Issue
Block a user