From 2267ddeb1710fe5b9d0ace3916650b7d315883f5 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Sat, 3 Jun 2017 14:41:54 -0700 Subject: [PATCH] DSPAssembler: fix handling of P_REG1C `P_REG1C` had the same value as `P_ACCL`, so was causing spurious errors when used with ACCM registers. Gcdsptool (which calls this `P_ACCLM`) gives it the value `P_REG | 0x1c10` instead, and handles errors in the same block as other REG## enums. --- Source/Core/Core/DSP/DSPAssembler.cpp | 1 + Source/Core/Core/DSP/DSPTables.h | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/DSP/DSPAssembler.cpp b/Source/Core/Core/DSP/DSPAssembler.cpp index b5ca9dd01b..bb00023941 100644 --- a/Source/Core/Core/DSP/DSPAssembler.cpp +++ b/Source/Core/Core/DSP/DSPAssembler.cpp @@ -489,6 +489,7 @@ bool DSPAssembler::VerifyParams(const opc_t* opc, param_t* par, size_t count, Op case P_REG18: case P_REG19: case P_REG1A: + case P_REG1C: value = (opc->params[i].type >> 8) & 31; if ((int)par[i].val < value || (int)par[i].val > value + get_mask_shifted_down(opc->params[i].mask)) diff --git a/Source/Core/Core/DSP/DSPTables.h b/Source/Core/Core/DSP/DSPTables.h index 869a4a780c..d62022d972 100644 --- a/Source/Core/Core/DSP/DSPTables.h +++ b/Source/Core/Core/DSP/DSPTables.h @@ -39,10 +39,10 @@ enum partype_t P_REG19 = P_REG | 0x1900, P_REGM19 = P_REG | 0x1910, // used in multiply instructions P_REG1A = P_REG | 0x1a80, - P_REG1C = P_REG | 0x1c00, // P_ACC = P_REG | 0x1c10, // used for global accum (gcdsptool's value) - P_ACCL = P_REG | 0x1c00, // used for low part of accum - P_ACCM = P_REG | 0x1e00, // used for mid part of accum + P_ACCL = P_REG | 0x1c00, // used for low part of accum + P_REG1C = P_REG | 0x1c10, // gcdsptool calls this P_ACCLM + P_ACCM = P_REG | 0x1e00, // used for mid part of accum // The following are not in gcdsptool P_ACCM_D = P_REG | 0x1e80, P_ACC = P_REG | 0x2000, // used for full accum.