mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-07 21:23:29 +02:00
Consistently use MIPS_REG_V0 for return values.
This way all instances are a lot easier to search for (was trying to find where we were writing an incorrect value to v0, turns out to be callback related of course.)
This commit is contained in:
@@ -3111,21 +3111,21 @@ void ActionAfterMipsCall::run(MipsCall &call) {
|
||||
|
||||
void Thread::setReturnValue(u32 retval)
|
||||
{
|
||||
if (this->GetUID() == currentThread) {
|
||||
currentMIPS->r[2] = retval;
|
||||
if (GetUID() == currentThread) {
|
||||
currentMIPS->r[MIPS_REG_V0] = retval;
|
||||
} else {
|
||||
context.r[2] = retval;
|
||||
context.r[MIPS_REG_V0] = retval;
|
||||
}
|
||||
}
|
||||
|
||||
void Thread::setReturnValue(u64 retval)
|
||||
{
|
||||
if (this->GetUID() == currentThread) {
|
||||
currentMIPS->r[2] = retval & 0xFFFFFFFF;
|
||||
currentMIPS->r[3] = (retval >> 32) & 0xFFFFFFFF;
|
||||
if (GetUID() == currentThread) {
|
||||
currentMIPS->r[MIPS_REG_V0] = retval & 0xFFFFFFFF;
|
||||
currentMIPS->r[MIPS_REG_V1] = (retval >> 32) & 0xFFFFFFFF;
|
||||
} else {
|
||||
context.r[2] = retval & 0xFFFFFFFF;
|
||||
context.r[3] = (retval >> 32) & 0xFFFFFFFF;
|
||||
context.r[MIPS_REG_V0] = retval & 0xFFFFFFFF;
|
||||
context.r[MIPS_REG_V1] = (retval >> 32) & 0xFFFFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user