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.
This commit is contained in:
Michael Maltese 2017-06-03 14:41:54 -07:00
parent 7e869070e3
commit 2267ddeb17
2 changed files with 4 additions and 3 deletions

View File

@ -489,6 +489,7 @@ bool DSPAssembler::VerifyParams(const opc_t* opc, param_t* par, size_t count, Op
case P_REG18: case P_REG18:
case P_REG19: case P_REG19:
case P_REG1A: case P_REG1A:
case P_REG1C:
value = (opc->params[i].type >> 8) & 31; value = (opc->params[i].type >> 8) & 31;
if ((int)par[i].val < value || if ((int)par[i].val < value ||
(int)par[i].val > value + get_mask_shifted_down(opc->params[i].mask)) (int)par[i].val > value + get_mask_shifted_down(opc->params[i].mask))

View File

@ -39,9 +39,9 @@ enum partype_t
P_REG19 = P_REG | 0x1900, P_REG19 = P_REG | 0x1900,
P_REGM19 = P_REG | 0x1910, // used in multiply instructions P_REGM19 = P_REG | 0x1910, // used in multiply instructions
P_REG1A = P_REG | 0x1a80, P_REG1A = P_REG | 0x1a80,
P_REG1C = P_REG | 0x1c00,
// P_ACC = P_REG | 0x1c10, // used for global accum (gcdsptool's value) // P_ACC = P_REG | 0x1c10, // used for global accum (gcdsptool's value)
P_ACCL = P_REG | 0x1c00, // used for low 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 P_ACCM = P_REG | 0x1e00, // used for mid part of accum
// The following are not in gcdsptool // The following are not in gcdsptool
P_ACCM_D = P_REG | 0x1e80, P_ACCM_D = P_REG | 0x1e80,