Merge pull request #321 from artart78/master

Fixed $k0 overwriting $sp content, and the stack address given by sceKernelReferThreadStatus
This commit is contained in:
Henrik Rydgård committed 2013-01-03 23:15:38 -08:00
commit e522db35c2
1 file changed
+2 -2
+2 -2
View File
@@ -366,10 +366,10 @@ public:
// Fill the stack.
Memory::Memset(stackBlock, 0xFF, stackSize);
context.r[MIPS_REG_SP] = stackBlock + stackSize;
nt.initialStack = context.r[MIPS_REG_SP];
nt.initialStack = stackBlock;
nt.stackSize = stackSize;
// What's this 512?
context.r[MIPS_REG_K0] = context.r[MIPS_REG_SP] - 512;
context.r[MIPS_REG_K0] = context.r[MIPS_REG_SP] - 256;
context.r[MIPS_REG_SP] -= 512;
return true;
}