From b2f73ecb933c8c7cae5d33fb6f7be06b1aad1b80 Mon Sep 17 00:00:00 2001 From: LegendOfDragoon Date: Mon, 30 Nov 2015 19:45:43 -0800 Subject: [PATCH] Optimize Vector Dest Analysis in RSP Recompiler LPV, LUV, and LHV always write to an entire vector register, so it's beneficial to account for that in Vector Destination Analysis. --- Source/RSP/Recompiler Analysis.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/RSP/Recompiler Analysis.c b/Source/RSP/Recompiler Analysis.c index 612692e94..20d2b4337 100644 --- a/Source/RSP/Recompiler Analysis.c +++ b/Source/RSP/Recompiler Analysis.c @@ -648,14 +648,17 @@ BOOL WriteToVectorDest2 (DWORD DestReg, int PC, BOOL RecursiveCall) { case RSP_LSC2_RV: break; - case RSP_LSC2_HV: case RSP_LSC2_QV: case RSP_LSC2_BV: case RSP_LSC2_LV: - case RSP_LSC2_UV: - case RSP_LSC2_PV: case RSP_LSC2_TV: break; + + case RSP_LSC2_PV: + case RSP_LSC2_UV: + case RSP_LSC2_HV: + if (DestReg == RspOp.rt) { return FALSE; } + break; default: CompilerWarning("Unkown opcode in WriteToVectorDest\n%s",RSPOpcodeName(RspOp.Hex,PC));