2004-10-27 Tomer Levi <Tomer.Levi@nsc.com>

* crx-opc.c (REV_COP_INST): New macro, reverse operand order of COP_INST macro.
This commit is contained in:
Tomer Levi 2004-10-28 10:29:56 +00:00
parent 49c4a1800a
commit 343cbeea1e
1 changed files with 12 additions and 8 deletions

View File

@ -513,15 +513,19 @@ const inst crx_instruction[] =
#define COP_INST(NAME, OPC, TYPE, REG1, REG2) \
/* opc12 c4 opc8 REG1 REG2 */ \
{NAME, 2, 0x301030+OPC, 8, TYPE | FMT_2, {{ui4,16}, {REG1,4}, {REG2,0}}}
/* A reverse form of the above macro. */
#define REV_COP_INST(NAME, OPC, TYPE, REG1, REG2) \
/* opc12 c4 opc8 REG2 REG1 */ \
{NAME, 2, 0x301030+OPC, 8, TYPE | FMT_2, {{ui4,16}, {REG1,0}, {REG2,4}}}
COP_INST ("mtcr", 0, COP_REG_INS, regr, copregr),
COP_INST ("mfcr", 1, COP_REG_INS, copregr, regr),
COP_INST ("mtcsr", 2, COPS_REG_INS, regr, copsregr),
COP_INST ("mfcsr", 3, COPS_REG_INS, copsregr, regr),
COP_INST ("ldcr", 4, COP_REG_INS, regr, copregr),
COP_INST ("stcr", 5, COP_REG_INS, copregr, regr),
COP_INST ("ldcsr", 6, COPS_REG_INS, regr, copsregr),
COP_INST ("stcsr", 7, COPS_REG_INS, copsregr, regr),
COP_INST ("mtcr", 0, COP_REG_INS, regr, copregr),
COP_INST ("mfcr", 1, COP_REG_INS, copregr, regr),
COP_INST ("mtcsr", 2, COPS_REG_INS, regr, copsregr),
COP_INST ("mfcsr", 3, COPS_REG_INS, copsregr, regr),
COP_INST ("ldcr", 4, COP_REG_INS, regr, copregr),
REV_COP_INST ("stcr", 5, COP_REG_INS, copregr, regr),
COP_INST ("ldcsr", 6, COPS_REG_INS, regr, copsregr),
REV_COP_INST ("stcsr", 7, COPS_REG_INS, copsregr, regr),
/* Create a memory-related CO-processor instruction. */
#define COPMEM_INST(NAME, OPC, TYPE) \