Fix issue with STV in Vector Dest Analysis
STV can write to multiple registers, so it needs to do extra checking to determine whether or not the destination register is used.
This commit is contained in:
parent
b2f73ecb93
commit
36d491c989
|
@ -678,9 +678,25 @@ BOOL WriteToVectorDest2 (DWORD DestReg, int PC, BOOL RecursiveCall) {
|
||||||
case RSP_LSC2_HV:
|
case RSP_LSC2_HV:
|
||||||
case RSP_LSC2_FV:
|
case RSP_LSC2_FV:
|
||||||
case RSP_LSC2_WV:
|
case RSP_LSC2_WV:
|
||||||
case RSP_LSC2_TV:
|
|
||||||
if (DestReg == RspOp.rt) { return TRUE; }
|
if (DestReg == RspOp.rt) { return TRUE; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case RSP_LSC2_TV:
|
||||||
|
if (8 <= 32 - RspOp.rt) {
|
||||||
|
if (DestReg >= RspOp.rt && DestReg <= RspOp.rt + 7) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
int length = 32 - RspOp.rt, count, del = RspOp.del >> 1, vect = RspOp.rt;
|
||||||
|
for (count = 0; count < length; count++) {
|
||||||
|
if (DestReg == vect + del) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
del = (del + 1) & 7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
CompilerWarning("Unkown opcode in WriteToVectorDest\n%s",RSPOpcodeName(RspOp.Hex,PC));
|
CompilerWarning("Unkown opcode in WriteToVectorDest\n%s",RSPOpcodeName(RspOp.Hex,PC));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in New Issue