1*d2201f2fSdrahn /* Table of opcodes for the Texas Instruments TMS320C[34]X family. 2*d2201f2fSdrahn 3*d2201f2fSdrahn Copyright (C) 2002, 2003 Free Software Foundation. 4*d2201f2fSdrahn 5*d2201f2fSdrahn Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz) 6*d2201f2fSdrahn 7*d2201f2fSdrahn This program is free software; you can redistribute it and/or modify 8*d2201f2fSdrahn it under the terms of the GNU General Public License as published by 9*d2201f2fSdrahn the Free Software Foundation; either version 2 of the License, or 10*d2201f2fSdrahn (at your option) any later version. 11*d2201f2fSdrahn 12*d2201f2fSdrahn This program is distributed in the hope that it will be useful, 13*d2201f2fSdrahn but WITHOUT ANY WARRANTY; without even the implied warranty of 14*d2201f2fSdrahn MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15*d2201f2fSdrahn GNU General Public License for more details. 16*d2201f2fSdrahn 17*d2201f2fSdrahn You should have received a copy of the GNU General Public License 18*d2201f2fSdrahn along with this program; if not, write to the Free Software 19*d2201f2fSdrahn Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20*d2201f2fSdrahn */ 21*d2201f2fSdrahn 22*d2201f2fSdrahn #define IS_CPU_TIC3X(v) ((v) == 30 || (v) == 31 || (v) == 32 || (v) == 33) 23*d2201f2fSdrahn #define IS_CPU_TIC4X(v) ((v) == 0 || (v) == 40 || (v) == 44) 24*d2201f2fSdrahn 25*d2201f2fSdrahn /* Define some bitfield extraction/insertion macros. */ 26*d2201f2fSdrahn #define EXTR(inst, m, l) ((inst) << (31 - (m)) >> (31 - ((m) - (l)))) 27*d2201f2fSdrahn #define EXTRU(inst, m, l) EXTR ((unsigned long)(inst), (m), (l)) 28*d2201f2fSdrahn #define EXTRS(inst, m, l) EXTR ((long)(inst), (m), (l)) 29*d2201f2fSdrahn #define INSERTU(inst, val, m, l) (inst |= ((val) << (l))) 30*d2201f2fSdrahn #define INSERTS(inst, val, m, l) INSERTU (inst, ((val) & ((1 << ((m) - (l) + 1)) - 1)), m, l) 31*d2201f2fSdrahn 32*d2201f2fSdrahn /* Define register numbers. */ 33*d2201f2fSdrahn typedef enum 34*d2201f2fSdrahn { 35*d2201f2fSdrahn REG_R0, REG_R1, REG_R2, REG_R3, 36*d2201f2fSdrahn REG_R4, REG_R5, REG_R6, REG_R7, 37*d2201f2fSdrahn REG_AR0, REG_AR1, REG_AR2, REG_AR3, 38*d2201f2fSdrahn REG_AR4, REG_AR5, REG_AR6, REG_AR7, 39*d2201f2fSdrahn REG_DP, REG_IR0, REG_IR1, REG_BK, 40*d2201f2fSdrahn REG_SP, REG_ST, REG_DIE, REG_IIE, 41*d2201f2fSdrahn REG_IIF, REG_RS, REG_RE, REG_RC, 42*d2201f2fSdrahn REG_R8, REG_R9, REG_R10, REG_R11, 43*d2201f2fSdrahn REG_IVTP, REG_TVTP 44*d2201f2fSdrahn } 45*d2201f2fSdrahn c4x_reg_t; 46*d2201f2fSdrahn 47*d2201f2fSdrahn /* Note that the actual register numbers for IVTP is 0 and TVTP is 1. */ 48*d2201f2fSdrahn 49*d2201f2fSdrahn #define REG_IE REG_DIE /* C3x only */ 50*d2201f2fSdrahn #define REG_IF REG_IIE /* C3x only */ 51*d2201f2fSdrahn #define REG_IOF REG_IIF /* C3x only */ 52*d2201f2fSdrahn 53*d2201f2fSdrahn #define TIC3X_REG_MAX REG_RC 54*d2201f2fSdrahn #define TIC4X_REG_MAX REG_TVTP 55*d2201f2fSdrahn 56*d2201f2fSdrahn /* Register table size including C4x expansion regs. */ 57*d2201f2fSdrahn #define REG_TABLE_SIZE (TIC4X_REG_MAX + 1) 58*d2201f2fSdrahn 59*d2201f2fSdrahn struct tic4x_register 60*d2201f2fSdrahn { 61*d2201f2fSdrahn char * name; 62*d2201f2fSdrahn unsigned long regno; 63*d2201f2fSdrahn }; 64*d2201f2fSdrahn 65*d2201f2fSdrahn typedef struct tic4x_register tic4x_register_t; 66*d2201f2fSdrahn 67*d2201f2fSdrahn /* We could store register synonyms here. */ 68*d2201f2fSdrahn static const tic4x_register_t tic3x_registers[] = 69*d2201f2fSdrahn { 70*d2201f2fSdrahn {"f0", REG_R0}, 71*d2201f2fSdrahn {"r0", REG_R0}, 72*d2201f2fSdrahn {"f1", REG_R1}, 73*d2201f2fSdrahn {"r1", REG_R1}, 74*d2201f2fSdrahn {"f2", REG_R2}, 75*d2201f2fSdrahn {"r2", REG_R2}, 76*d2201f2fSdrahn {"f3", REG_R3}, 77*d2201f2fSdrahn {"r3", REG_R3}, 78*d2201f2fSdrahn {"f4", REG_R4}, 79*d2201f2fSdrahn {"r4", REG_R4}, 80*d2201f2fSdrahn {"f5", REG_R5}, 81*d2201f2fSdrahn {"r5", REG_R5}, 82*d2201f2fSdrahn {"f6", REG_R6}, 83*d2201f2fSdrahn {"r6", REG_R6}, 84*d2201f2fSdrahn {"f7", REG_R7}, 85*d2201f2fSdrahn {"r7", REG_R7}, 86*d2201f2fSdrahn {"ar0", REG_AR0}, 87*d2201f2fSdrahn {"ar1", REG_AR1}, 88*d2201f2fSdrahn {"ar2", REG_AR2}, 89*d2201f2fSdrahn {"ar3", REG_AR3}, 90*d2201f2fSdrahn {"ar4", REG_AR4}, 91*d2201f2fSdrahn {"ar5", REG_AR5}, 92*d2201f2fSdrahn {"ar6", REG_AR6}, 93*d2201f2fSdrahn {"ar7", REG_AR7}, 94*d2201f2fSdrahn {"dp", REG_DP}, 95*d2201f2fSdrahn {"ir0", REG_IR0}, 96*d2201f2fSdrahn {"ir1", REG_IR1}, 97*d2201f2fSdrahn {"bk", REG_BK}, 98*d2201f2fSdrahn {"sp", REG_SP}, 99*d2201f2fSdrahn {"st", REG_ST}, 100*d2201f2fSdrahn {"ie", REG_IE}, 101*d2201f2fSdrahn {"if", REG_IF}, 102*d2201f2fSdrahn {"iof", REG_IOF}, 103*d2201f2fSdrahn {"rs", REG_RS}, 104*d2201f2fSdrahn {"re", REG_RE}, 105*d2201f2fSdrahn {"rc", REG_RC}, 106*d2201f2fSdrahn {"", 0} 107*d2201f2fSdrahn }; 108*d2201f2fSdrahn 109*d2201f2fSdrahn const unsigned int tic3x_num_registers = (((sizeof tic3x_registers) / (sizeof tic3x_registers[0])) - 1); 110*d2201f2fSdrahn 111*d2201f2fSdrahn /* Define C4x registers in addition to C3x registers. */ 112*d2201f2fSdrahn static const tic4x_register_t tic4x_registers[] = 113*d2201f2fSdrahn { 114*d2201f2fSdrahn {"die", REG_DIE}, /* Clobbers C3x REG_IE */ 115*d2201f2fSdrahn {"iie", REG_IIE}, /* Clobbers C3x REG_IF */ 116*d2201f2fSdrahn {"iif", REG_IIF}, /* Clobbers C3x REG_IOF */ 117*d2201f2fSdrahn {"f8", REG_R8}, 118*d2201f2fSdrahn {"r8", REG_R8}, 119*d2201f2fSdrahn {"f9", REG_R9}, 120*d2201f2fSdrahn {"r9", REG_R9}, 121*d2201f2fSdrahn {"f10", REG_R10}, 122*d2201f2fSdrahn {"r10", REG_R10}, 123*d2201f2fSdrahn {"f11", REG_R11}, 124*d2201f2fSdrahn {"r11", REG_R11}, 125*d2201f2fSdrahn {"ivtp", REG_IVTP}, 126*d2201f2fSdrahn {"tvtp", REG_TVTP}, 127*d2201f2fSdrahn {"", 0} 128*d2201f2fSdrahn }; 129*d2201f2fSdrahn 130*d2201f2fSdrahn const unsigned int tic4x_num_registers = (((sizeof tic4x_registers) / (sizeof tic4x_registers[0])) - 1); 131*d2201f2fSdrahn 132*d2201f2fSdrahn struct tic4x_cond 133*d2201f2fSdrahn { 134*d2201f2fSdrahn char * name; 135*d2201f2fSdrahn unsigned long cond; 136*d2201f2fSdrahn }; 137*d2201f2fSdrahn 138*d2201f2fSdrahn typedef struct tic4x_cond tic4x_cond_t; 139*d2201f2fSdrahn 140*d2201f2fSdrahn /* Define conditional branch/load suffixes. Put desired form for 141*d2201f2fSdrahn disassembler last. */ 142*d2201f2fSdrahn static const tic4x_cond_t tic4x_conds[] = 143*d2201f2fSdrahn { 144*d2201f2fSdrahn { "u", 0x00 }, 145*d2201f2fSdrahn { "c", 0x01 }, { "lo", 0x01 }, 146*d2201f2fSdrahn { "ls", 0x02 }, 147*d2201f2fSdrahn { "hi", 0x03 }, 148*d2201f2fSdrahn { "nc", 0x04 }, { "hs", 0x04 }, 149*d2201f2fSdrahn { "z", 0x05 }, { "eq", 0x05 }, 150*d2201f2fSdrahn { "nz", 0x06 }, { "ne", 0x06 }, 151*d2201f2fSdrahn { "n", 0x07 }, { "l", 0x07 }, { "lt", 0x07 }, 152*d2201f2fSdrahn { "le", 0x08 }, 153*d2201f2fSdrahn { "p", 0x09 }, { "gt", 0x09 }, 154*d2201f2fSdrahn { "nn", 0x0a }, { "ge", 0x0a }, 155*d2201f2fSdrahn { "nv", 0x0c }, 156*d2201f2fSdrahn { "v", 0x0d }, 157*d2201f2fSdrahn { "nuf", 0x0e }, 158*d2201f2fSdrahn { "uf", 0x0f }, 159*d2201f2fSdrahn { "nlv", 0x10 }, 160*d2201f2fSdrahn { "lv", 0x11 }, 161*d2201f2fSdrahn { "nluf", 0x12 }, 162*d2201f2fSdrahn { "luf", 0x13 }, 163*d2201f2fSdrahn { "zuf", 0x14 }, 164*d2201f2fSdrahn /* Dummy entry, not included in num_conds. This 165*d2201f2fSdrahn lets code examine entry i+1 without checking 166*d2201f2fSdrahn if we've run off the end of the table. */ 167*d2201f2fSdrahn { "", 0x0} 168*d2201f2fSdrahn }; 169*d2201f2fSdrahn 170*d2201f2fSdrahn const unsigned int tic4x_num_conds = (((sizeof tic4x_conds) / (sizeof tic4x_conds[0])) - 1); 171*d2201f2fSdrahn 172*d2201f2fSdrahn struct tic4x_indirect 173*d2201f2fSdrahn { 174*d2201f2fSdrahn char * name; 175*d2201f2fSdrahn unsigned long modn; 176*d2201f2fSdrahn }; 177*d2201f2fSdrahn 178*d2201f2fSdrahn typedef struct tic4x_indirect tic4x_indirect_t; 179*d2201f2fSdrahn 180*d2201f2fSdrahn /* Define indirect addressing modes where: 181*d2201f2fSdrahn d displacement (signed) 182*d2201f2fSdrahn y ir0 183*d2201f2fSdrahn z ir1 */ 184*d2201f2fSdrahn 185*d2201f2fSdrahn static const tic4x_indirect_t tic4x_indirects[] = 186*d2201f2fSdrahn { 187*d2201f2fSdrahn { "*+a(d)", 0x00 }, 188*d2201f2fSdrahn { "*-a(d)", 0x01 }, 189*d2201f2fSdrahn { "*++a(d)", 0x02 }, 190*d2201f2fSdrahn { "*--a(d)", 0x03 }, 191*d2201f2fSdrahn { "*a++(d)", 0x04 }, 192*d2201f2fSdrahn { "*a--(d)", 0x05 }, 193*d2201f2fSdrahn { "*a++(d)%", 0x06 }, 194*d2201f2fSdrahn { "*a--(d)%", 0x07 }, 195*d2201f2fSdrahn { "*+a(y)", 0x08 }, 196*d2201f2fSdrahn { "*-a(y)", 0x09 }, 197*d2201f2fSdrahn { "*++a(y)", 0x0a }, 198*d2201f2fSdrahn { "*--a(y)", 0x0b }, 199*d2201f2fSdrahn { "*a++(y)", 0x0c }, 200*d2201f2fSdrahn { "*a--(y)", 0x0d }, 201*d2201f2fSdrahn { "*a++(y)%", 0x0e }, 202*d2201f2fSdrahn { "*a--(y)%", 0x0f }, 203*d2201f2fSdrahn { "*+a(z)", 0x10 }, 204*d2201f2fSdrahn { "*-a(z)", 0x11 }, 205*d2201f2fSdrahn { "*++a(z)", 0x12 }, 206*d2201f2fSdrahn { "*--a(z)", 0x13 }, 207*d2201f2fSdrahn { "*a++(z)", 0x14 }, 208*d2201f2fSdrahn { "*a--(z)", 0x15 }, 209*d2201f2fSdrahn { "*a++(z)%", 0x16 }, 210*d2201f2fSdrahn { "*a--(z)%", 0x17 }, 211*d2201f2fSdrahn { "*a", 0x18 }, 212*d2201f2fSdrahn { "*a++(y)b", 0x19 }, 213*d2201f2fSdrahn /* Dummy entry, not included in num_indirects. This 214*d2201f2fSdrahn lets code examine entry i+1 without checking 215*d2201f2fSdrahn if we've run off the end of the table. */ 216*d2201f2fSdrahn { "", 0x0} 217*d2201f2fSdrahn }; 218*d2201f2fSdrahn 219*d2201f2fSdrahn #define TIC3X_MODN_MAX 0x19 220*d2201f2fSdrahn 221*d2201f2fSdrahn const unsigned int tic4x_num_indirects = (((sizeof tic4x_indirects) / (sizeof tic4x_indirects[0])) - 1); 222*d2201f2fSdrahn 223*d2201f2fSdrahn /* Instruction template. */ 224*d2201f2fSdrahn struct tic4x_inst 225*d2201f2fSdrahn { 226*d2201f2fSdrahn char * name; 227*d2201f2fSdrahn unsigned long opcode; 228*d2201f2fSdrahn unsigned long opmask; 229*d2201f2fSdrahn char * args; 230*d2201f2fSdrahn unsigned long oplevel; 231*d2201f2fSdrahn }; 232*d2201f2fSdrahn 233*d2201f2fSdrahn typedef struct tic4x_inst tic4x_inst_t; 234*d2201f2fSdrahn 235*d2201f2fSdrahn /* Opcode infix 236*d2201f2fSdrahn B condition 16--20 U,C,Z,LO,HI, etc. 237*d2201f2fSdrahn C condition 23--27 U,C,Z,LO,HI, etc. 238*d2201f2fSdrahn 239*d2201f2fSdrahn Arguments 240*d2201f2fSdrahn , required arg follows 241*d2201f2fSdrahn ; optional arg follows 242*d2201f2fSdrahn 243*d2201f2fSdrahn Argument types bits [classes] - example 244*d2201f2fSdrahn ----------------------------------------------------------- 245*d2201f2fSdrahn * indirect (all) 0--15 [A,AB,AU,AF,A2,A3,A6,A7,AY,B,BA,BB,BI,B6,B7] - *+AR0(5), *++AR0(IR0) 246*d2201f2fSdrahn # direct (for LDP) 0--15 [Z] - @start, start 247*d2201f2fSdrahn @ direct 0--15 [A,AB,AU,AF,A3,A6,A7,AY,B,BA,BB,BI,B6,B7] - @start, start 248*d2201f2fSdrahn A address register 22--24 [D] - AR0, AR7 249*d2201f2fSdrahn B unsigned integer 0--23 [I,I2] - @start, start (absolute on C3x, relative on C4x) 250*d2201f2fSdrahn C indirect (disp - C4x) 0--7 [S,SC,S2,T,TC,T2,T2C] - *+AR0(5) 251*d2201f2fSdrahn E register (all) 0--7 [T,TC,T2,T2C] - R0, R7, R11, AR0, DP 252*d2201f2fSdrahn e register (0-11) 0--7 [S,SC,S2] - R0, R7, R11 253*d2201f2fSdrahn F short float immediate 0--15 [AF,B,BA,BB] - 3.5, 0e-3.5e-1 254*d2201f2fSdrahn G register (all) 8--15 [T,TC,T2,T2C] - R0, R7, R11, AR0, DP 255*d2201f2fSdrahn g register (0-11) 0--7 [S,SC,S2] - R0, R7, R11 256*d2201f2fSdrahn H register (0-7) 18--16 [LS,M,P,Q] - R0, R7 257*d2201f2fSdrahn I indirect (no disp) 0--7 [S,SC,S2,T,TC,T2,T2C] - *+AR0(1), *+AR0(IR0) 258*d2201f2fSdrahn i indirect (enhanced) 0--7 [LL,LS,M,P,Q,QC] - *+AR0(1), R5 259*d2201f2fSdrahn J indirect (no disp) 8--15 [LL,LS,P,Q,QC,S,SC,S2,T,TC,T2,T2C] - *+AR0(1), *+AR0(IR0) 260*d2201f2fSdrahn j indirect (enhanced) 8--15 [M] - *+AR0(1), R5 261*d2201f2fSdrahn K register 19--21 [LL,M,Q,QC] - R0, R7 262*d2201f2fSdrahn L register 22--24 [LL,LS,P,Q,QC] - R0, R7 263*d2201f2fSdrahn M register (R2,R3) 22--22 [M] R2, R3 264*d2201f2fSdrahn N register (R0,R1) 23--23 [M] R0, R1 265*d2201f2fSdrahn O indirect(disp - C4x) 8--15 [S,SC,S2,T,TC,T2] - *+AR0(5) 266*d2201f2fSdrahn P displacement (PC Rel) 0--15 [D,J,JS] - @start, start 267*d2201f2fSdrahn Q register (all) 0--15 [A,AB,AU,A2,A3,AY,BA,BI,D,I2,J,JS] - R0, AR0, DP, SP 268*d2201f2fSdrahn q register (0-11) 0--15 [AF,B,BB] - R0, R7, R11 269*d2201f2fSdrahn R register (all) 16--20 [A,AB,AU,AF,A6,A7,R,T,TC] - R0, AR0, DP, SP 270*d2201f2fSdrahn r register (0-11) 16--20 [B,BA,BB,BI,B6,B7,RF,S,SC] - R0, R1, R11 271*d2201f2fSdrahn S short int immediate 0--15 [A,AB,AY,BI] - -5, 5 272*d2201f2fSdrahn T integer (C4x) 16--20 [Z] - -5, 12 273*d2201f2fSdrahn U unsigned integer 0--15 [AU,A3] - 0, 65535 274*d2201f2fSdrahn V vector (C4x: 0--8) 0--4 [Z] - 25, 7 275*d2201f2fSdrahn W short int (C4x) 0--7 [T,TC,T2,T2C] - -3, 5 276*d2201f2fSdrahn X expansion reg (C4x) 0--4 [Z] - IVTP, TVTP 277*d2201f2fSdrahn Y address reg (C4x) 16--20 [Z] - AR0, DP, SP, IR0 278*d2201f2fSdrahn Z expansion reg (C4x) 16--20 [Z] - IVTP, TVTP 279*d2201f2fSdrahn */ 280*d2201f2fSdrahn 281*d2201f2fSdrahn #define TIC4X_OPERANDS_MAX 7 /* Max number of operands for an inst. */ 282*d2201f2fSdrahn #define TIC4X_NAME_MAX 16 /* Max number of chars in parallel name. */ 283*d2201f2fSdrahn 284*d2201f2fSdrahn /* Define the instruction level */ 285*d2201f2fSdrahn #define OP_C3X 0x1 /* C30 support - supported by all */ 286*d2201f2fSdrahn #define OP_C4X 0x2 /* C40 support - C40, C44 */ 287*d2201f2fSdrahn #define OP_ENH 0x4 /* Class LL,LS,M,P,Q,QC enhancements. Argument type 288*d2201f2fSdrahn I and J is enhanced in these classes - C31>=6.0, 289*d2201f2fSdrahn C32>=2.0, C33 */ 290*d2201f2fSdrahn #define OP_LPWR 0x8 /* Low power support (LOPOWER, MAXSPEED) - C30>=7.0, 291*d2201f2fSdrahn LC31, C31>=5.0, C32 */ 292*d2201f2fSdrahn #define OP_IDLE2 0x10 /* Idle2 support (IDLE2) - C30>=7.0, LC31, C31>=5.0, 293*d2201f2fSdrahn C32, C33, C40>=5.0, C44 */ 294*d2201f2fSdrahn 295*d2201f2fSdrahn /* The following class definition is a classification scheme for 296*d2201f2fSdrahn putting instructions with similar type of arguments together. It 297*d2201f2fSdrahn simplifies the op-code definitions significantly, as we then only 298*d2201f2fSdrahn need to use the class macroes for 95% of the DSP's opcodes. 299*d2201f2fSdrahn */ 300*d2201f2fSdrahn 301*d2201f2fSdrahn /* A: General 2-operand integer operations 302*d2201f2fSdrahn Syntax: <i> src, dst 303*d2201f2fSdrahn src = Register (Q), Direct (@), Indirect (*), Signed immediate (S) 304*d2201f2fSdrahn dst = Register (R) 305*d2201f2fSdrahn Instr: 15/8 - ABSI, ADDC, ADDI, ASH, CMPI, LDI, LSH, MPYI, NEGB, NEGI, 306*d2201f2fSdrahn SUBB, SUBC, SUBI, SUBRB, SUBRI, C4x: LBn, LHn, LWLn, LWRn, 307*d2201f2fSdrahn MBn, MHn, MPYSHI, MPYUHI 308*d2201f2fSdrahn */ 309*d2201f2fSdrahn #define A_CLASS_INSN(name, opcode, level) \ 310*d2201f2fSdrahn { name, opcode|0x00000000, 0xffe00000, "Q;R", level }, \ 311*d2201f2fSdrahn { name, opcode|0x00200000, 0xffe00000, "@,R", level }, \ 312*d2201f2fSdrahn { name, opcode|0x00400000, 0xffe00000, "*,R", level }, \ 313*d2201f2fSdrahn { name, opcode|0x00600000, 0xffe00000, "S,R", level } 314*d2201f2fSdrahn 315*d2201f2fSdrahn /* AB: General 2-operand integer operation with condition 316*d2201f2fSdrahn Syntax: <i>c src, dst 317*d2201f2fSdrahn c = Condition 318*d2201f2fSdrahn src = Register (Q), Direct (@), Indirect (*), Signed immediate (S) 319*d2201f2fSdrahn dst = Register (R) 320*d2201f2fSdrahn Instr: 1/0 - LDIc 321*d2201f2fSdrahn */ 322*d2201f2fSdrahn #define AB_CLASS_INSN(name, opcode, level) \ 323*d2201f2fSdrahn { name, opcode|0x40000000, 0xf0600000, "Q;R", level }, \ 324*d2201f2fSdrahn { name, opcode|0x40200000, 0xf0600000, "@,R", level }, \ 325*d2201f2fSdrahn { name, opcode|0x40400000, 0xf0600000, "*,R", level }, \ 326*d2201f2fSdrahn { name, opcode|0x40600000, 0xf0600000, "S,R", level } 327*d2201f2fSdrahn 328*d2201f2fSdrahn /* AU: General 2-operand unsigned integer operation 329*d2201f2fSdrahn Syntax: <i> src, dst 330*d2201f2fSdrahn src = Register (Q), Direct (@), Indirect (*), Unsigned immediate (U) 331*d2201f2fSdrahn dst = Register (R) 332*d2201f2fSdrahn Instr: 6/2 - AND, ANDN, NOT, OR, TSTB, XOR, C4x: LBUn, LHUn 333*d2201f2fSdrahn */ 334*d2201f2fSdrahn #define AU_CLASS_INSN(name, opcode, level) \ 335*d2201f2fSdrahn { name, opcode|0x00000000, 0xffe00000, "Q;R", level }, \ 336*d2201f2fSdrahn { name, opcode|0x00200000, 0xffe00000, "@,R", level }, \ 337*d2201f2fSdrahn { name, opcode|0x00400000, 0xffe00000, "*,R", level }, \ 338*d2201f2fSdrahn { name, opcode|0x00600000, 0xffe00000, "U,R", level } 339*d2201f2fSdrahn 340*d2201f2fSdrahn /* AF: General 2-operand float to integer operation 341*d2201f2fSdrahn Syntax: <i> src, dst 342*d2201f2fSdrahn src = Register 0-11 (q), Direct (@), Indirect (*), Float immediate (F) 343*d2201f2fSdrahn dst = Register (R) 344*d2201f2fSdrahn Instr: 1/0 - FIX 345*d2201f2fSdrahn */ 346*d2201f2fSdrahn #define AF_CLASS_INSN(name, opcode, level) \ 347*d2201f2fSdrahn { name, opcode|0x00000000, 0xffe00000, "q;R", level }, \ 348*d2201f2fSdrahn { name, opcode|0x00200000, 0xffe00000, "@,R", level }, \ 349*d2201f2fSdrahn { name, opcode|0x00400000, 0xffe00000, "*,R", level }, \ 350*d2201f2fSdrahn { name, opcode|0x00600000, 0xffe00000, "F,R", level } 351*d2201f2fSdrahn 352*d2201f2fSdrahn /* A2: Limited 1-operand (integer) operation 353*d2201f2fSdrahn Syntax: <i> src 354*d2201f2fSdrahn src = Register (Q), Indirect (*), None 355*d2201f2fSdrahn Instr: 1/0 - NOP 356*d2201f2fSdrahn */ 357*d2201f2fSdrahn #define A2_CLASS_INSN(name, opcode, level) \ 358*d2201f2fSdrahn { name, opcode|0x00000000, 0xffe00000, "Q", level }, \ 359*d2201f2fSdrahn { name, opcode|0x00400000, 0xffe00000, "*", level }, \ 360*d2201f2fSdrahn { name, opcode|0x00000000, 0xffe00000, "" , level } 361*d2201f2fSdrahn 362*d2201f2fSdrahn /* A3: General 1-operand unsigned integer operation 363*d2201f2fSdrahn Syntax: <i> src 364*d2201f2fSdrahn src = Register (Q), Direct (@), Indirect (*), Unsigned immediate (U) 365*d2201f2fSdrahn Instr: 1/0 - RPTS 366*d2201f2fSdrahn */ 367*d2201f2fSdrahn #define A3_CLASS_INSN(name, opcode, level) \ 368*d2201f2fSdrahn { name, opcode|0x00000000, 0xffff0000, "Q", level }, \ 369*d2201f2fSdrahn { name, opcode|0x00200000, 0xffff0000, "@", level }, \ 370*d2201f2fSdrahn { name, opcode|0x00400000, 0xffff0000, "*", level }, \ 371*d2201f2fSdrahn { name, opcode|0x00600000, 0xffff0000, "U", level } 372*d2201f2fSdrahn 373*d2201f2fSdrahn /* A6: Limited 2-operand integer operation 374*d2201f2fSdrahn Syntax: <i> src, dst 375*d2201f2fSdrahn src = Direct (@), Indirect (*) 376*d2201f2fSdrahn dst = Register (R) 377*d2201f2fSdrahn Instr: 1/1 - LDII, C4x: SIGI 378*d2201f2fSdrahn */ 379*d2201f2fSdrahn #define A6_CLASS_INSN(name, opcode, level) \ 380*d2201f2fSdrahn { name, opcode|0x00200000, 0xffe00000, "@,R", level }, \ 381*d2201f2fSdrahn { name, opcode|0x00400000, 0xffe00000, "*,R", level } 382*d2201f2fSdrahn 383*d2201f2fSdrahn /* A7: Limited 2-operand integer store operation 384*d2201f2fSdrahn Syntax: <i> src, dst 385*d2201f2fSdrahn src = Register (R) 386*d2201f2fSdrahn dst = Direct (@), Indirect (*) 387*d2201f2fSdrahn Instr: 2/0 - STI, STII 388*d2201f2fSdrahn */ 389*d2201f2fSdrahn #define A7_CLASS_INSN(name, opcode, level) \ 390*d2201f2fSdrahn { name, opcode|0x00200000, 0xffe00000, "R,@", level }, \ 391*d2201f2fSdrahn { name, opcode|0x00400000, 0xffe00000, "R,*", level } 392*d2201f2fSdrahn 393*d2201f2fSdrahn /* AY: General 2-operand signed address load operation 394*d2201f2fSdrahn Syntax: <i> src, dst 395*d2201f2fSdrahn src = Register (Q), Direct (@), Indirect (*), Signed immediate (S) 396*d2201f2fSdrahn dst = Address register - ARx, IRx, DP, BK, SP (Y) 397*d2201f2fSdrahn Instr: 0/1 - C4x: LDA 398*d2201f2fSdrahn Note: Q and Y should *never* be the same register 399*d2201f2fSdrahn */ 400*d2201f2fSdrahn #define AY_CLASS_INSN(name, opcode, level) \ 401*d2201f2fSdrahn { name, opcode|0x00000000, 0xffe00000, "Q,Y", level }, \ 402*d2201f2fSdrahn { name, opcode|0x00200000, 0xffe00000, "@,Y", level }, \ 403*d2201f2fSdrahn { name, opcode|0x00400000, 0xffe00000, "*,Y", level }, \ 404*d2201f2fSdrahn { name, opcode|0x00600000, 0xffe00000, "S,Y", level } 405*d2201f2fSdrahn 406*d2201f2fSdrahn /* B: General 2-operand float operation 407*d2201f2fSdrahn Syntax: <i> src, dst 408*d2201f2fSdrahn src = Register 0-11 (q), Direct (@), Indirect (*), Float immediate (F) 409*d2201f2fSdrahn dst = Register 0-11 (r) 410*d2201f2fSdrahn Instr: 12/2 - ABSF, ADDF, CMPF, LDE, LDF, LDM, MPYF, NEGF, NORM, RND, 411*d2201f2fSdrahn SUBF, SUBRF, C4x: RSQRF, TOIEEE 412*d2201f2fSdrahn */ 413*d2201f2fSdrahn #define B_CLASS_INSN(name, opcode, level) \ 414*d2201f2fSdrahn { name, opcode|0x00000000, 0xffe00000, "q;r", level }, \ 415*d2201f2fSdrahn { name, opcode|0x00200000, 0xffe00000, "@,r", level }, \ 416*d2201f2fSdrahn { name, opcode|0x00400000, 0xffe00000, "*,r", level }, \ 417*d2201f2fSdrahn { name, opcode|0x00600000, 0xffe00000, "F,r", level } 418*d2201f2fSdrahn 419*d2201f2fSdrahn /* BA: General 2-operand integer to float operation 420*d2201f2fSdrahn Syntax: <i> src, dst 421*d2201f2fSdrahn src = Register (Q), Direct (@), Indirect (*), Float immediate (F) 422*d2201f2fSdrahn dst = Register 0-11 (r) 423*d2201f2fSdrahn Instr: 0/1 - C4x: CRCPF 424*d2201f2fSdrahn */ 425*d2201f2fSdrahn #define BA_CLASS_INSN(name, opcode, level) \ 426*d2201f2fSdrahn { name, opcode|0x00000000, 0xffe00000, "Q;r", level }, \ 427*d2201f2fSdrahn { name, opcode|0x00200000, 0xffe00000, "@,r", level }, \ 428*d2201f2fSdrahn { name, opcode|0x00400000, 0xffe00000, "*,r", level }, \ 429*d2201f2fSdrahn { name, opcode|0x00600000, 0xffe00000, "F,r", level } 430*d2201f2fSdrahn 431*d2201f2fSdrahn /* BB: General 2-operand conditional float operation 432*d2201f2fSdrahn Syntax: <i>c src, dst 433*d2201f2fSdrahn c = Condition 434*d2201f2fSdrahn src = Register 0-11 (q), Direct (@), Indirect (*), Float immediate (F) 435*d2201f2fSdrahn dst = Register 0-11 (r) 436*d2201f2fSdrahn Instr: 1/0 - LDFc 437*d2201f2fSdrahn */ 438*d2201f2fSdrahn #define BB_CLASS_INSN(name, opcode, level) \ 439*d2201f2fSdrahn { name, opcode|0x40000000, 0xf0600000, "q;r", level }, \ 440*d2201f2fSdrahn { name, opcode|0x40200000, 0xf0600000, "@,r", level }, \ 441*d2201f2fSdrahn { name, opcode|0x40400000, 0xf0600000, "*,r", level }, \ 442*d2201f2fSdrahn { name, opcode|0x40600000, 0xf0600000, "F,r", level } 443*d2201f2fSdrahn 444*d2201f2fSdrahn /* BI: General 2-operand integer to float operation (yet different to BA) 445*d2201f2fSdrahn Syntax: <i> src, dst 446*d2201f2fSdrahn src = Register (Q), Direct (@), Indirect (*), Signed immediate (S) 447*d2201f2fSdrahn dst = Register 0-11 (r) 448*d2201f2fSdrahn Instr: 1/0 - FLOAT 449*d2201f2fSdrahn */ 450*d2201f2fSdrahn #define BI_CLASS_INSN(name, opcode, level) \ 451*d2201f2fSdrahn { name, opcode|0x00000000, 0xffe00000, "Q;r", level }, \ 452*d2201f2fSdrahn { name, opcode|0x00200000, 0xffe00000, "@,r", level }, \ 453*d2201f2fSdrahn { name, opcode|0x00400000, 0xffe00000, "*,r", level }, \ 454*d2201f2fSdrahn { name, opcode|0x00600000, 0xffe00000, "S,r", level } 455*d2201f2fSdrahn 456*d2201f2fSdrahn /* B6: Limited 2-operand float operation 457*d2201f2fSdrahn Syntax: <i> src, dst 458*d2201f2fSdrahn src = Direct (@), Indirect (*) 459*d2201f2fSdrahn dst = Register 0-11 (r) 460*d2201f2fSdrahn Instr: 1/1 - LDFI, C4x: FRIEEE 461*d2201f2fSdrahn */ 462*d2201f2fSdrahn #define B6_CLASS_INSN(name, opcode, level) \ 463*d2201f2fSdrahn { name, opcode|0x00200000, 0xffe00000, "@,r", level }, \ 464*d2201f2fSdrahn { name, opcode|0x00400000, 0xffe00000, "*,r", level } 465*d2201f2fSdrahn 466*d2201f2fSdrahn /* B7: Limited 2-operand float store operation 467*d2201f2fSdrahn Syntax: <i> src, dst 468*d2201f2fSdrahn src = Register 0-11 (r) 469*d2201f2fSdrahn dst = Direct (@), Indirect (*) 470*d2201f2fSdrahn Instr: 2/0 - STF, STFI 471*d2201f2fSdrahn */ 472*d2201f2fSdrahn #define B7_CLASS_INSN(name, opcode, level) \ 473*d2201f2fSdrahn { name, opcode|0x00200000, 0xffe00000, "r,@", level }, \ 474*d2201f2fSdrahn { name, opcode|0x00400000, 0xffe00000, "r,*", level } 475*d2201f2fSdrahn 476*d2201f2fSdrahn /* D: Decrement and brach operations 477*d2201f2fSdrahn Syntax: <i>c ARn, dst 478*d2201f2fSdrahn c = condition 479*d2201f2fSdrahn ARn = AR register 0-7 (A) 480*d2201f2fSdrahn dst = Register (Q), PC-relative (P) 481*d2201f2fSdrahn Instr: 2/0 - DBc, DBcD 482*d2201f2fSdrahn Alias: <name1> <name2> 483*d2201f2fSdrahn */ 484*d2201f2fSdrahn #define D_CLASS_INSN(name1, name2, opcode, level) \ 485*d2201f2fSdrahn { name1, opcode|0x00000000, 0xfe200000, "A,Q", level }, \ 486*d2201f2fSdrahn { name1, opcode|0x02000000, 0xfe200000, "A,P", level }, \ 487*d2201f2fSdrahn { name2, opcode|0x00000000, 0xfe200000, "A,Q", level }, \ 488*d2201f2fSdrahn { name2, opcode|0x02000000, 0xfe200000, "A,P", level } 489*d2201f2fSdrahn 490*d2201f2fSdrahn /* I: General branch operations 491*d2201f2fSdrahn Syntax: <i> dst 492*d2201f2fSdrahn dst = Address (B) 493*d2201f2fSdrahn Instr: 3/1 - BR, BRD, CALL, C4x: LAJ 494*d2201f2fSdrahn */ 495*d2201f2fSdrahn 496*d2201f2fSdrahn /* I2: General branch operations (C4x addition) 497*d2201f2fSdrahn Syntax: <i> dst 498*d2201f2fSdrahn dst = Address (B), C4x: Register (Q) 499*d2201f2fSdrahn Instr: 2/0 - RPTB, RPTBD 500*d2201f2fSdrahn */ 501*d2201f2fSdrahn 502*d2201f2fSdrahn /* J: General conditional branch operations 503*d2201f2fSdrahn Syntax: <i>c dst 504*d2201f2fSdrahn c = Condition 505*d2201f2fSdrahn dst = Register (Q), PC-relative (P) 506*d2201f2fSdrahn Instr: 2/3 - Bc, BcD, C4x: BcAF, BcAT, LAJc 507*d2201f2fSdrahn Alias: <name1> <name2> 508*d2201f2fSdrahn */ 509*d2201f2fSdrahn #define J_CLASS_INSN(name1, name2, opcode, level) \ 510*d2201f2fSdrahn { name1, opcode|0x00000000, 0xffe00000, "Q", level }, \ 511*d2201f2fSdrahn { name1, opcode|0x02000000, 0xffe00000, "P", level }, \ 512*d2201f2fSdrahn { name2, opcode|0x00000000, 0xffe00000, "Q", level }, \ 513*d2201f2fSdrahn { name2, opcode|0x02000000, 0xffe00000, "P", level } 514*d2201f2fSdrahn 515*d2201f2fSdrahn /* JS: General conditional branch operations 516*d2201f2fSdrahn Syntax: <i>c dst 517*d2201f2fSdrahn c = Condition 518*d2201f2fSdrahn dst = Register (Q), PC-relative (P) 519*d2201f2fSdrahn Instr: 1/1 - CALLc, C4X: LAJc 520*d2201f2fSdrahn */ 521*d2201f2fSdrahn 522*d2201f2fSdrahn /* LL: Load-load parallell operation 523*d2201f2fSdrahn Syntax: <i> src2, dst2 || <i> src1, dst1 524*d2201f2fSdrahn src1 = Indirect 0,1,IR0,IR1 (J) 525*d2201f2fSdrahn dst1 = Register 0-7 (K) 526*d2201f2fSdrahn src2 = Indirect 0,1,IR0,IR1, ENH: Register (i) 527*d2201f2fSdrahn dst2 = Register 0-7 (L) 528*d2201f2fSdrahn Instr: 2/0 - LDF||LDF, LDI||LDI 529*d2201f2fSdrahn Alias: i||i, i1||i2, i2||i1 530*d2201f2fSdrahn */ 531*d2201f2fSdrahn #define LL_CLASS_INSN(name, opcode, level) \ 532*d2201f2fSdrahn { name "_" name , opcode, 0xfe000000, "i;L|J,K", level }, \ 533*d2201f2fSdrahn { name "2_" name "1", opcode, 0xfe000000, "i;L|J,K", level }, \ 534*d2201f2fSdrahn { name "1_" name "2", opcode, 0xfe000000, "J,K|i;L", level } 535*d2201f2fSdrahn 536*d2201f2fSdrahn /* LS: Store-store parallell operation 537*d2201f2fSdrahn Syntax: <i> src2, dst2 || <i> src1, dst1 538*d2201f2fSdrahn src1 = Register 0-7 (H) 539*d2201f2fSdrahn dst1 = Indirect 0,1,IR0,IR1 (J) 540*d2201f2fSdrahn src2 = Register 0-7 (L) 541*d2201f2fSdrahn dst2 = Indirect 0,1,IR0,IR1, ENH: register (i) 542*d2201f2fSdrahn Instr: 2/0 - STF||STF, STI||STI 543*d2201f2fSdrahn Alias: i||i, i1||i2, i2||i1. 544*d2201f2fSdrahn */ 545*d2201f2fSdrahn #define LS_CLASS_INSN(name, opcode, level) \ 546*d2201f2fSdrahn { name "_" name , opcode, 0xfe000000, "L;i|H,J", level }, \ 547*d2201f2fSdrahn { name "2_" name "1", opcode, 0xfe000000, "L;i|H,J", level }, \ 548*d2201f2fSdrahn { name "1_" name "2", opcode, 0xfe000000, "H,J|L;i", level } 549*d2201f2fSdrahn 550*d2201f2fSdrahn /* M: General multiply and add/sub operations 551*d2201f2fSdrahn Syntax: <ia> src3,src4,dst1 || <ib> src2,src1,dst2 [00] - Manual 552*d2201f2fSdrahn <ia> src3,src1,dst1 || <ib> src2,src4,dst2 [01] - Manual 553*d2201f2fSdrahn <ia> src1,src3,dst1 || <ib> src2,src4,dst2 [01] 554*d2201f2fSdrahn <ia> src1,src2,dst1 || <ib> src4,src3,dst2 [02] - Manual 555*d2201f2fSdrahn <ia> src3,src1,dst1 || <ib> src4,src2,dst2 [03] - Manual 556*d2201f2fSdrahn <ia> src1,src3,dst1 || <ib> src4,src2,dst2 [03] 557*d2201f2fSdrahn src1 = Register 0-7 (K) 558*d2201f2fSdrahn src2 = Register 0-7 (H) 559*d2201f2fSdrahn src3 = Indirect 0,1,IR0,IR1, ENH: register (j) 560*d2201f2fSdrahn src4 = Indirect 0,1,IR0,IR1, ENH: register (i) 561*d2201f2fSdrahn dst1 = Register 0-1 (N) 562*d2201f2fSdrahn dst2 = Register 2-3 (M) 563*d2201f2fSdrahn Instr: 4/0 - MPYF3||ADDF3, MPYF3||SUBF3, MPYI3||ADDI3, MPYI3||SUBI3 564*d2201f2fSdrahn Alias: a||b, a3||n, a||b3, a3||b3, b||a, b3||a, b||a3, b3||a3 565*d2201f2fSdrahn */ 566*d2201f2fSdrahn #define M_CLASS_INSN(namea, nameb, opcode, level) \ 567*d2201f2fSdrahn { namea "_" nameb, opcode|0x00000000, 0xff000000, "i;j;N|H;K;M", level }, \ 568*d2201f2fSdrahn { namea "_" nameb, opcode|0x01000000, 0xff000000, "j;K;N|H;i;M", level }, \ 569*d2201f2fSdrahn { namea "_" nameb, opcode|0x01000000, 0xff000000, "K;j;N|H;i;M", level }, \ 570*d2201f2fSdrahn { namea "_" nameb, opcode|0x02000000, 0xff000000, "H;K;N|i;j;M", level }, \ 571*d2201f2fSdrahn { namea "_" nameb, opcode|0x03000000, 0xff000000, "j;K;N|i;H;M", level }, \ 572*d2201f2fSdrahn { namea "_" nameb, opcode|0x03000000, 0xff000000, "K;j;N|i;H;M", level }, \ 573*d2201f2fSdrahn { namea "3_" nameb, opcode|0x00000000, 0xff000000, "i;j;N|H;K;M", level }, \ 574*d2201f2fSdrahn { namea "3_" nameb, opcode|0x01000000, 0xff000000, "j;K;N|H;i;M", level }, \ 575*d2201f2fSdrahn { namea "3_" nameb, opcode|0x01000000, 0xff000000, "K;j;N|H;i;M", level }, \ 576*d2201f2fSdrahn { namea "3_" nameb, opcode|0x02000000, 0xff000000, "H;K;N|i;j;M", level }, \ 577*d2201f2fSdrahn { namea "3_" nameb, opcode|0x03000000, 0xff000000, "j;K;N|i;H;M", level }, \ 578*d2201f2fSdrahn { namea "3_" nameb, opcode|0x03000000, 0xff000000, "K;j;N|i;H;M", level }, \ 579*d2201f2fSdrahn { namea "_" nameb "3", opcode|0x00000000, 0xff000000, "i;j;N|H;K;M", level }, \ 580*d2201f2fSdrahn { namea "_" nameb "3", opcode|0x01000000, 0xff000000, "j;K;N|H;i;M", level }, \ 581*d2201f2fSdrahn { namea "_" nameb "3", opcode|0x01000000, 0xff000000, "K;j;N|H;i;M", level }, \ 582*d2201f2fSdrahn { namea "_" nameb "3", opcode|0x02000000, 0xff000000, "H;K;N|i;j;M", level }, \ 583*d2201f2fSdrahn { namea "_" nameb "3", opcode|0x03000000, 0xff000000, "j;K;N|i;H;M", level }, \ 584*d2201f2fSdrahn { namea "_" nameb "3", opcode|0x03000000, 0xff000000, "K;j;N|i;H;M", level }, \ 585*d2201f2fSdrahn { namea "3_" nameb "3", opcode|0x00000000, 0xff000000, "i;j;N|H;K;M", level }, \ 586*d2201f2fSdrahn { namea "3_" nameb "3", opcode|0x01000000, 0xff000000, "j;K;N|H;i;M", level }, \ 587*d2201f2fSdrahn { namea "3_" nameb "3", opcode|0x01000000, 0xff000000, "K;j;N|H;i;M", level }, \ 588*d2201f2fSdrahn { namea "3_" nameb "3", opcode|0x02000000, 0xff000000, "H;K;N|i;j;M", level }, \ 589*d2201f2fSdrahn { namea "3_" nameb "3", opcode|0x03000000, 0xff000000, "j;K;N|i;H;M", level }, \ 590*d2201f2fSdrahn { namea "3_" nameb "3", opcode|0x03000000, 0xff000000, "K;j;N|i;H;M", level }, \ 591*d2201f2fSdrahn { nameb "_" namea, opcode|0x00000000, 0xff000000, "H;K;M|i;j;N", level }, \ 592*d2201f2fSdrahn { nameb "_" namea, opcode|0x01000000, 0xff000000, "H;i;M|j;K;N", level }, \ 593*d2201f2fSdrahn { nameb "_" namea, opcode|0x01000000, 0xff000000, "H;i;M|K;j;N", level }, \ 594*d2201f2fSdrahn { nameb "_" namea, opcode|0x02000000, 0xff000000, "i;j;M|H;K;N", level }, \ 595*d2201f2fSdrahn { nameb "_" namea, opcode|0x03000000, 0xff000000, "i;H;M|j;K;N", level }, \ 596*d2201f2fSdrahn { nameb "_" namea, opcode|0x03000000, 0xff000000, "i;H;M|K;j;N", level }, \ 597*d2201f2fSdrahn { nameb "3_" namea, opcode|0x00000000, 0xff000000, "H;K;M|i;j;N", level }, \ 598*d2201f2fSdrahn { nameb "3_" namea, opcode|0x01000000, 0xff000000, "H;i;M|j;K;N", level }, \ 599*d2201f2fSdrahn { nameb "3_" namea, opcode|0x01000000, 0xff000000, "H;i;M|K;j;N", level }, \ 600*d2201f2fSdrahn { nameb "3_" namea, opcode|0x02000000, 0xff000000, "i;j;M|H;K;N", level }, \ 601*d2201f2fSdrahn { nameb "3_" namea, opcode|0x03000000, 0xff000000, "i;H;M|j;K;N", level }, \ 602*d2201f2fSdrahn { nameb "3_" namea, opcode|0x03000000, 0xff000000, "i;H;M|K;j;N", level }, \ 603*d2201f2fSdrahn { nameb "_" namea "3", opcode|0x00000000, 0xff000000, "H;K;M|i;j;N", level }, \ 604*d2201f2fSdrahn { nameb "_" namea "3", opcode|0x01000000, 0xff000000, "H;i;M|j;K;N", level }, \ 605*d2201f2fSdrahn { nameb "_" namea "3", opcode|0x01000000, 0xff000000, "H;i;M|K;j;N", level }, \ 606*d2201f2fSdrahn { nameb "_" namea "3", opcode|0x02000000, 0xff000000, "i;j;M|H;K;N", level }, \ 607*d2201f2fSdrahn { nameb "_" namea "3", opcode|0x03000000, 0xff000000, "i;H;M|j;K;N", level }, \ 608*d2201f2fSdrahn { nameb "_" namea "3", opcode|0x03000000, 0xff000000, "i;H;M|K;j;N", level }, \ 609*d2201f2fSdrahn { nameb "3_" namea "3", opcode|0x00000000, 0xff000000, "H;K;M|i;j;N", level }, \ 610*d2201f2fSdrahn { nameb "3_" namea "3", opcode|0x01000000, 0xff000000, "H;i;M|j;K;N", level }, \ 611*d2201f2fSdrahn { nameb "3_" namea "3", opcode|0x01000000, 0xff000000, "H;i;M|K;j;N", level }, \ 612*d2201f2fSdrahn { nameb "3_" namea "3", opcode|0x02000000, 0xff000000, "i;j;M|H;K;N", level }, \ 613*d2201f2fSdrahn { nameb "3_" namea "3", opcode|0x03000000, 0xff000000, "i;H;M|j;K;N", level }, \ 614*d2201f2fSdrahn { nameb "3_" namea "3", opcode|0x03000000, 0xff000000, "i;H;M|K;j;N", level } 615*d2201f2fSdrahn 616*d2201f2fSdrahn /* P: General 2-operand operation with parallell store 617*d2201f2fSdrahn Syntax: <ia> src2, dst1 || <ib> src3, dst2 618*d2201f2fSdrahn src2 = Indirect 0,1,IR0,IR1, ENH: register (i) 619*d2201f2fSdrahn dst1 = Register 0-7 (L) 620*d2201f2fSdrahn src3 = Register 0-7 (H) 621*d2201f2fSdrahn dst2 = Indirect 0,1,IR0,IR1 (J) 622*d2201f2fSdrahn Instr: 9/2 - ABSF||STF, ABSI||STI, FIX||STI, FLOAT||STF, LDF||STF, 623*d2201f2fSdrahn LDI||STI, NEGF||STF, NEGI||STI, NOT||STI, C4x: FRIEEE||STF, 624*d2201f2fSdrahn TOIEEE||STF 625*d2201f2fSdrahn Alias: a||b, b||a 626*d2201f2fSdrahn */ 627*d2201f2fSdrahn #define P_CLASS_INSN(namea, nameb, opcode, level) \ 628*d2201f2fSdrahn { namea "_" nameb, opcode, 0xfe000000, "i;L|H,J", level }, \ 629*d2201f2fSdrahn { nameb "_" namea, opcode, 0xfe000000, "H,J|i;L", level } 630*d2201f2fSdrahn 631*d2201f2fSdrahn /* Q: General 3-operand operation with parallell store 632*d2201f2fSdrahn Syntax: <ia> src1, src2, dst1 || <ib> src3, dst2 633*d2201f2fSdrahn src1 = Register 0-7 (K) 634*d2201f2fSdrahn src2 = Indirect 0,1,IR0,IR1, ENH: register (i) 635*d2201f2fSdrahn dst1 = Register 0-7 (L) 636*d2201f2fSdrahn src3 = Register 0-7 (H) 637*d2201f2fSdrahn dst2 = Indirect 0,1,IR0,IR1 (J) 638*d2201f2fSdrahn Instr: 4/0 - ASH3||STI, LSH3||STI, SUBF3||STF, SUBI3||STI 639*d2201f2fSdrahn Alias: a||b, b||a, a3||b, b||a3 640*d2201f2fSdrahn */ 641*d2201f2fSdrahn #define Q_CLASS_INSN(namea, nameb, opcode, level) \ 642*d2201f2fSdrahn { namea "_" nameb , opcode, 0xfe000000, "K,i;L|H,J", level }, \ 643*d2201f2fSdrahn { nameb "_" namea , opcode, 0xfe000000, "H,J|K,i;L", level }, \ 644*d2201f2fSdrahn { namea "3_" nameb , opcode, 0xfe000000, "K,i;L|H,J", level }, \ 645*d2201f2fSdrahn { nameb "_" namea "3", opcode, 0xfe000000, "H,J|K,i;L", level } 646*d2201f2fSdrahn 647*d2201f2fSdrahn /* QC: General commutative 3-operand operation with parallell store 648*d2201f2fSdrahn Syntax: <ia> src2, src1, dst1 || <ib> src3, dst2 649*d2201f2fSdrahn <ia> src1, src2, dst1 || <ib> src3, dst2 - Manual 650*d2201f2fSdrahn src1 = Register 0-7 (K) 651*d2201f2fSdrahn src2 = Indirect 0,1,IR0,IR1, ENH: register (i) 652*d2201f2fSdrahn dst1 = Register 0-7 (L) 653*d2201f2fSdrahn src3 = Register 0-7 (H) 654*d2201f2fSdrahn dst2 = Indirect 0,1,IR0,IR1 (J) 655*d2201f2fSdrahn Instr: 7/0 - ADDF3||STF, ADDI3||STI, AND3||STI, MPYF3||STF, MPYI3||STI, 656*d2201f2fSdrahn OR3||STI, XOR3||STI 657*d2201f2fSdrahn Alias: a||b, b||a, a3||b, b||a3 658*d2201f2fSdrahn */ 659*d2201f2fSdrahn #define QC_CLASS_INSN(namea, nameb, opcode, level) \ 660*d2201f2fSdrahn { namea "_" nameb , opcode, 0xfe000000, "i;K;L|H,J", level }, \ 661*d2201f2fSdrahn { namea "_" nameb , opcode, 0xfe000000, "K;i;L|H,J", level }, \ 662*d2201f2fSdrahn { nameb "_" namea , opcode, 0xfe000000, "H,J|i;K;L", level }, \ 663*d2201f2fSdrahn { nameb "_" namea , opcode, 0xfe000000, "H,J|K;i;L", level }, \ 664*d2201f2fSdrahn { namea "3_" nameb , opcode, 0xfe000000, "i;K;L|H,J", level }, \ 665*d2201f2fSdrahn { namea "3_" nameb , opcode, 0xfe000000, "K;i;L|H,J", level }, \ 666*d2201f2fSdrahn { nameb "_" namea "3", opcode, 0xfe000000, "H,J|i;K;L", level }, \ 667*d2201f2fSdrahn { nameb "_" namea "3", opcode, 0xfe000000, "H,J|K;i;L", level } 668*d2201f2fSdrahn 669*d2201f2fSdrahn /* R: General register integer operation 670*d2201f2fSdrahn Syntax: <i> dst 671*d2201f2fSdrahn dst = Register (R) 672*d2201f2fSdrahn Instr: 6/0 - POP, PUSH, ROL, ROLC, ROR, RORC 673*d2201f2fSdrahn */ 674*d2201f2fSdrahn #define R_CLASS_INSN(name, opcode, level) \ 675*d2201f2fSdrahn { name, opcode, 0xffe0ffff, "R", level } 676*d2201f2fSdrahn 677*d2201f2fSdrahn /* RF: General register float operation 678*d2201f2fSdrahn Syntax: <i> dst 679*d2201f2fSdrahn dst = Register 0-11 (r) 680*d2201f2fSdrahn Instr: 2/0 - POPF, PUSHF 681*d2201f2fSdrahn */ 682*d2201f2fSdrahn #define RF_CLASS_INSN(name, opcode, level) \ 683*d2201f2fSdrahn { name, opcode, 0xffe0ffff, "r", level } 684*d2201f2fSdrahn 685*d2201f2fSdrahn /* S: General 3-operand float operation 686*d2201f2fSdrahn Syntax: <i> src2, src1, dst 687*d2201f2fSdrahn src2 = Register 0-11 (e), Indirect 0,1,IR0,IR1 (I), C4x T2: Indirect (C) 688*d2201f2fSdrahn src1 = Register 0-11 (g), Indirect 0,1,IR0,IR1 (J), C4x T2: Indirect (O) 689*d2201f2fSdrahn dst = Register 0-11 (r) 690*d2201f2fSdrahn Instr: 1/0 - SUBF3 691*d2201f2fSdrahn Alias: i, i3 692*d2201f2fSdrahn */ 693*d2201f2fSdrahn #define S_CLASS_INSN(name, opcode, level) \ 694*d2201f2fSdrahn { name, opcode|0x20000000, 0xffe00000, "e,g;r", level }, \ 695*d2201f2fSdrahn { name, opcode|0x20200000, 0xffe00000, "e,J,r", level }, \ 696*d2201f2fSdrahn { name, opcode|0x20400000, 0xffe00000, "I,g;r", level }, \ 697*d2201f2fSdrahn { name, opcode|0x20600000, 0xffe00000, "I,J,r", level }, \ 698*d2201f2fSdrahn { name, opcode|0x30200000, 0xffe00000, "C,g;r", OP_C4X }, \ 699*d2201f2fSdrahn { name, opcode|0x30600000, 0xffe00000, "C,O,r", OP_C4X }, \ 700*d2201f2fSdrahn { name "3", opcode|0x20000000, 0xffe00000, "e,g;r", level }, \ 701*d2201f2fSdrahn { name "3", opcode|0x20200000, 0xffe00000, "e,J,r", level }, \ 702*d2201f2fSdrahn { name "3", opcode|0x20400000, 0xffe00000, "I,g;r", level }, \ 703*d2201f2fSdrahn { name "3", opcode|0x20600000, 0xffe00000, "I,J,r", level }, \ 704*d2201f2fSdrahn { name "3", opcode|0x30200000, 0xffe00000, "C,g;r", OP_C4X }, \ 705*d2201f2fSdrahn { name "3", opcode|0x30600000, 0xffe00000, "C,O,r", OP_C4X } 706*d2201f2fSdrahn 707*d2201f2fSdrahn /* SC: General commutative 3-operand float operation 708*d2201f2fSdrahn Syntax: <i> src2, src1, dst - Manual 709*d2201f2fSdrahn <i> src1, src2, dst 710*d2201f2fSdrahn src2 = Register 0-11 (e), Indirect 0,1,IR0,IR1 (I), C4x T2: Indirect (C) 711*d2201f2fSdrahn src1 = Register 0-11 (g), Indirect 0,1,IR0,IR1 (J), C4x T2: Indirect (O) 712*d2201f2fSdrahn dst = Register 0-11 (r) 713*d2201f2fSdrahn Instr: 2/0 - ADDF3, MPYF3 714*d2201f2fSdrahn Alias: i, i3 715*d2201f2fSdrahn */ 716*d2201f2fSdrahn #define SC_CLASS_INSN(name, opcode, level) \ 717*d2201f2fSdrahn { name, opcode|0x20000000, 0xffe00000, "e,g;r", level }, \ 718*d2201f2fSdrahn { name, opcode|0x20200000, 0xffe00000, "e,J,r", level }, \ 719*d2201f2fSdrahn { name, opcode|0x20400000, 0xffe00000, "I,g;r", level }, \ 720*d2201f2fSdrahn { name, opcode|0x20600000, 0xffe00000, "I,J,r", level }, \ 721*d2201f2fSdrahn { name, opcode|0x30200000, 0xffe00000, "C,g;r", OP_C4X }, \ 722*d2201f2fSdrahn { name, opcode|0x30200000, 0xffe00000, "g,C,r", OP_C4X }, \ 723*d2201f2fSdrahn { name, opcode|0x30600000, 0xffe00000, "C,O,r", OP_C4X }, \ 724*d2201f2fSdrahn { name "3", opcode|0x20000000, 0xffe00000, "e,g;r", level }, \ 725*d2201f2fSdrahn { name "3", opcode|0x20200000, 0xffe00000, "e,J,r", level }, \ 726*d2201f2fSdrahn { name "3", opcode|0x20400000, 0xffe00000, "I,g;r", level }, \ 727*d2201f2fSdrahn { name "3", opcode|0x20600000, 0xffe00000, "I,J,r", level }, \ 728*d2201f2fSdrahn { name "3", opcode|0x30200000, 0xffe00000, "g,C,r", OP_C4X }, \ 729*d2201f2fSdrahn { name "3", opcode|0x30200000, 0xffe00000, "C,g;r", OP_C4X }, \ 730*d2201f2fSdrahn { name "3", opcode|0x30600000, 0xffe00000, "C,O,r", OP_C4X } 731*d2201f2fSdrahn 732*d2201f2fSdrahn /* S2: General 3-operand float operation with 2 args 733*d2201f2fSdrahn Syntax: <i> src2, src1 734*d2201f2fSdrahn src2 = Register 0-11 (e), Indirect 0,1,IR0,IR1 (I), C4x T2: Indirect (C) 735*d2201f2fSdrahn src1 = Register 0-11 (g), Indirect 0,1,IR0,IR1 (J), C4x T2: Indirect (O) 736*d2201f2fSdrahn Instr: 1/0 - CMPF3 737*d2201f2fSdrahn Alias: i, i3 738*d2201f2fSdrahn */ 739*d2201f2fSdrahn #define S2_CLASS_INSN(name, opcode, level) \ 740*d2201f2fSdrahn { name, opcode|0x20000000, 0xffe00000, "e,g", level }, \ 741*d2201f2fSdrahn { name, opcode|0x20200000, 0xffe00000, "e,J", level }, \ 742*d2201f2fSdrahn { name, opcode|0x20400000, 0xffe00000, "I,g", level }, \ 743*d2201f2fSdrahn { name, opcode|0x20600000, 0xffe00000, "I,J", level }, \ 744*d2201f2fSdrahn { name, opcode|0x30200000, 0xffe00000, "C,g", OP_C4X }, \ 745*d2201f2fSdrahn { name, opcode|0x30600000, 0xffe00000, "C,O", OP_C4X }, \ 746*d2201f2fSdrahn { name "3", opcode|0x20000000, 0xffe00000, "e,g", level }, \ 747*d2201f2fSdrahn { name "3", opcode|0x20200000, 0xffe00000, "e,J", level }, \ 748*d2201f2fSdrahn { name "3", opcode|0x20400000, 0xffe00000, "I,g", level }, \ 749*d2201f2fSdrahn { name "3", opcode|0x20600000, 0xffe00000, "I,J", level }, \ 750*d2201f2fSdrahn { name "3", opcode|0x30200000, 0xffe00000, "C,g", OP_C4X }, \ 751*d2201f2fSdrahn { name "3", opcode|0x30600000, 0xffe00000, "C,O", OP_C4X } 752*d2201f2fSdrahn 753*d2201f2fSdrahn /* T: General 3-operand integer operand 754*d2201f2fSdrahn Syntax: <i> src2, src1, dst 755*d2201f2fSdrahn src2 = Register (E), Indirect 0,1,IR0,IR1 (I), C4x T2: Indirect (C), Immediate (W) 756*d2201f2fSdrahn src1 = Register (G), Indirect 0,1,IR0,IR1 (J), C4x T2: Indirect (O) 757*d2201f2fSdrahn dst = Register (R) 758*d2201f2fSdrahn Instr: 5/0 - ANDN3, ASH3, LSH3, SUBB3, SUBI3 759*d2201f2fSdrahn Alias: i, i3 760*d2201f2fSdrahn */ 761*d2201f2fSdrahn #define T_CLASS_INSN(name, opcode, level) \ 762*d2201f2fSdrahn { name, opcode|0x20000000, 0xffe00000, "E,G;R", level }, \ 763*d2201f2fSdrahn { name, opcode|0x20200000, 0xffe00000, "E,J,R", level }, \ 764*d2201f2fSdrahn { name, opcode|0x20400000, 0xffe00000, "I,G;R", level }, \ 765*d2201f2fSdrahn { name, opcode|0x20600000, 0xffe00000, "I,J,R", level }, \ 766*d2201f2fSdrahn { name, opcode|0x30000000, 0xffe00000, "W,G;R", OP_C4X }, \ 767*d2201f2fSdrahn { name, opcode|0x30200000, 0xffe00000, "C,G;R", OP_C4X }, \ 768*d2201f2fSdrahn { name, opcode|0x30400000, 0xffe00000, "W,O,R", OP_C4X }, \ 769*d2201f2fSdrahn { name, opcode|0x30600000, 0xffe00000, "C,O,R", OP_C4X }, \ 770*d2201f2fSdrahn { name "3", opcode|0x20000000, 0xffe00000, "E,G;R", level }, \ 771*d2201f2fSdrahn { name "3", opcode|0x20200000, 0xffe00000, "E,J,R", level }, \ 772*d2201f2fSdrahn { name "3", opcode|0x20400000, 0xffe00000, "I,G;R", level }, \ 773*d2201f2fSdrahn { name "3", opcode|0x20600000, 0xffe00000, "I,J,R", level }, \ 774*d2201f2fSdrahn { name "3", opcode|0x30000000, 0xffe00000, "W,G;R", OP_C4X }, \ 775*d2201f2fSdrahn { name "3", opcode|0x30200000, 0xffe00000, "C,G;R", OP_C4X }, \ 776*d2201f2fSdrahn { name "3", opcode|0x30400000, 0xffe00000, "W,O,R", OP_C4X }, \ 777*d2201f2fSdrahn { name "3", opcode|0x30600000, 0xffe00000, "C,O,R", OP_C4X } 778*d2201f2fSdrahn 779*d2201f2fSdrahn /* TC: General commutative 3-operand integer operation 780*d2201f2fSdrahn Syntax: <i> src2, src1, dst 781*d2201f2fSdrahn <i> src1, src2, dst 782*d2201f2fSdrahn src2 = Register (E), Indirect 0,1,IR0,IR1 (I), C4x T2: Indirect (C), Immediate (W) 783*d2201f2fSdrahn src1 = Register (G), Indirect 0,1,IR0,IR1 (J), C4x T2: Indirect (O) 784*d2201f2fSdrahn dst = Register (R) 785*d2201f2fSdrahn Instr: 6/2 - ADDC3, ADDI3, AND3, MPYI3, OR3, XOR3, C4x: MPYSHI, MPYUHI 786*d2201f2fSdrahn Alias: i, i3 787*d2201f2fSdrahn */ 788*d2201f2fSdrahn #define TC_CLASS_INSN(name, opcode, level) \ 789*d2201f2fSdrahn { name, opcode|0x20000000, 0xffe00000, "E,G;R", level }, \ 790*d2201f2fSdrahn { name, opcode|0x20200000, 0xffe00000, "E,J,R", level }, \ 791*d2201f2fSdrahn { name, opcode|0x20400000, 0xffe00000, "I,G;R", level }, \ 792*d2201f2fSdrahn { name, opcode|0x20600000, 0xffe00000, "I,J,R", level }, \ 793*d2201f2fSdrahn { name, opcode|0x30000000, 0xffe00000, "W,G;R", OP_C4X }, \ 794*d2201f2fSdrahn { name, opcode|0x30000000, 0xffe00000, "G,W,R", OP_C4X }, \ 795*d2201f2fSdrahn { name, opcode|0x30200000, 0xffe00000, "C,G;R", OP_C4X }, \ 796*d2201f2fSdrahn { name, opcode|0x30200000, 0xffe00000, "G,C,R", OP_C4X }, \ 797*d2201f2fSdrahn { name, opcode|0x30400000, 0xffe00000, "W,O,R", OP_C4X }, \ 798*d2201f2fSdrahn { name, opcode|0x30400000, 0xffe00000, "O,W,R", OP_C4X }, \ 799*d2201f2fSdrahn { name, opcode|0x30600000, 0xffe00000, "C,O,R", OP_C4X }, \ 800*d2201f2fSdrahn { name "3", opcode|0x20000000, 0xffe00000, "E,G;R", level }, \ 801*d2201f2fSdrahn { name "3", opcode|0x20200000, 0xffe00000, "E,J,R", level }, \ 802*d2201f2fSdrahn { name "3", opcode|0x20400000, 0xffe00000, "I,G;R", level }, \ 803*d2201f2fSdrahn { name "3", opcode|0x20600000, 0xffe00000, "I,J,R", level }, \ 804*d2201f2fSdrahn { name "3", opcode|0x30000000, 0xffe00000, "W,G;R", OP_C4X }, \ 805*d2201f2fSdrahn { name "3", opcode|0x30000000, 0xffe00000, "G,W,R", OP_C4X }, \ 806*d2201f2fSdrahn { name "3", opcode|0x30200000, 0xffe00000, "C,G;R", OP_C4X }, \ 807*d2201f2fSdrahn { name "3", opcode|0x30200000, 0xffe00000, "G,C,R", OP_C4X }, \ 808*d2201f2fSdrahn { name "3", opcode|0x30400000, 0xffe00000, "W,O,R", OP_C4X }, \ 809*d2201f2fSdrahn { name "3", opcode|0x30400000, 0xffe00000, "O,W,R", OP_C4X }, \ 810*d2201f2fSdrahn { name "3", opcode|0x30600000, 0xffe00000, "C,O,R", OP_C4X } 811*d2201f2fSdrahn 812*d2201f2fSdrahn /* T2: General 3-operand integer operation with 2 args 813*d2201f2fSdrahn Syntax: <i> src2, src1 814*d2201f2fSdrahn src2 = Register (E), Indirect 0,1,IR0,IR1 (I), C4x T2: Indirect (C), Immediate (W) 815*d2201f2fSdrahn src1 = Register (G), Indirect 0,1,IR0,IR1 (J), C4x T2: Indirect (O) 816*d2201f2fSdrahn Instr: 1/0 - CMPI3 817*d2201f2fSdrahn Alias: i, i3 818*d2201f2fSdrahn */ 819*d2201f2fSdrahn #define T2_CLASS_INSN(name, opcode, level) \ 820*d2201f2fSdrahn { name, opcode|0x20000000, 0xffe00000, "E,G", level }, \ 821*d2201f2fSdrahn { name, opcode|0x20200000, 0xffe00000, "E,J", level }, \ 822*d2201f2fSdrahn { name, opcode|0x20400000, 0xffe00000, "I,G", level }, \ 823*d2201f2fSdrahn { name, opcode|0x20600000, 0xffe00000, "I,J", level }, \ 824*d2201f2fSdrahn { name, opcode|0x30000000, 0xffe00000, "W,G", OP_C4X }, \ 825*d2201f2fSdrahn { name, opcode|0x30200000, 0xffe00000, "C,G", OP_C4X }, \ 826*d2201f2fSdrahn { name, opcode|0x30400000, 0xffe00000, "W,O", OP_C4X }, \ 827*d2201f2fSdrahn { name, opcode|0x30600000, 0xffe00000, "C,O", OP_C4X }, \ 828*d2201f2fSdrahn { name "3", opcode|0x20000000, 0xffe00000, "E,G", level }, \ 829*d2201f2fSdrahn { name "3", opcode|0x20200000, 0xffe00000, "E,J", level }, \ 830*d2201f2fSdrahn { name "3", opcode|0x20400000, 0xffe00000, "I,G", level }, \ 831*d2201f2fSdrahn { name "3", opcode|0x20600000, 0xffe00000, "I,J", level }, \ 832*d2201f2fSdrahn { name "3", opcode|0x30000000, 0xffe00000, "W,G", OP_C4X }, \ 833*d2201f2fSdrahn { name "3", opcode|0x30200000, 0xffe00000, "C,G", OP_C4X }, \ 834*d2201f2fSdrahn { name "3", opcode|0x30400000, 0xffe00000, "W,O", OP_C4X }, \ 835*d2201f2fSdrahn { name "3", opcode|0x30600000, 0xffe00000, "C,O", OP_C4X } 836*d2201f2fSdrahn 837*d2201f2fSdrahn /* T2C: General commutative 3-operand integer operation with 2 args 838*d2201f2fSdrahn Syntax: <i> src2, src1 - Manual 839*d2201f2fSdrahn <i> src1, src2 840*d2201f2fSdrahn src2 = Register (E), Indirect 0,1,IR0,IR1 (I), C4x T2: Indirect (C), Immediate (W) 841*d2201f2fSdrahn src1 = Register (G), Indirect 0,1,IR0,IR1 (J), C4x T2: Indirect (0) 842*d2201f2fSdrahn Instr: 1/0 - TSTB3 843*d2201f2fSdrahn Alias: i, i3 844*d2201f2fSdrahn */ 845*d2201f2fSdrahn #define T2C_CLASS_INSN(name, opcode, level) \ 846*d2201f2fSdrahn { name, opcode|0x20000000, 0xffe00000, "E,G", level }, \ 847*d2201f2fSdrahn { name, opcode|0x20200000, 0xffe00000, "E,J", level }, \ 848*d2201f2fSdrahn { name, opcode|0x20400000, 0xffe00000, "I,G", level }, \ 849*d2201f2fSdrahn { name, opcode|0x20600000, 0xffe00000, "I,J", level }, \ 850*d2201f2fSdrahn { name, opcode|0x30000000, 0xffe00000, "W,G", OP_C4X }, \ 851*d2201f2fSdrahn { name, opcode|0x30000000, 0xffe00000, "G,W", OP_C4X }, \ 852*d2201f2fSdrahn { name, opcode|0x30200000, 0xffe00000, "C,G", OP_C4X }, \ 853*d2201f2fSdrahn { name, opcode|0x30200000, 0xffe00000, "G,C", OP_C4X }, \ 854*d2201f2fSdrahn { name, opcode|0x30400000, 0xffe00000, "W,O", OP_C4X }, \ 855*d2201f2fSdrahn { name, opcode|0x30400000, 0xffe00000, "O,W", OP_C4X }, \ 856*d2201f2fSdrahn { name, opcode|0x30600000, 0xffe00000, "C,O", OP_C4X }, \ 857*d2201f2fSdrahn { name "3", opcode|0x20000000, 0xffe00000, "E,G", level }, \ 858*d2201f2fSdrahn { name "3", opcode|0x20200000, 0xffe00000, "E,J", level }, \ 859*d2201f2fSdrahn { name "3", opcode|0x20400000, 0xffe00000, "I,G", level }, \ 860*d2201f2fSdrahn { name "3", opcode|0x20600000, 0xffe00000, "I,J", level }, \ 861*d2201f2fSdrahn { name "3", opcode|0x30000000, 0xffe00000, "W,G", OP_C4X }, \ 862*d2201f2fSdrahn { name "3", opcode|0x30000000, 0xffe00000, "G,W", OP_C4X }, \ 863*d2201f2fSdrahn { name "3", opcode|0x30200000, 0xffe00000, "C,G", OP_C4X }, \ 864*d2201f2fSdrahn { name "3", opcode|0x30200000, 0xffe00000, "G,C", OP_C4X }, \ 865*d2201f2fSdrahn { name "3", opcode|0x30400000, 0xffe00000, "W,O", OP_C4X }, \ 866*d2201f2fSdrahn { name "3", opcode|0x30400000, 0xffe00000, "O,W", OP_C4X }, \ 867*d2201f2fSdrahn { name "3", opcode|0x30600000, 0xffe00000, "C,O", OP_C4X } 868*d2201f2fSdrahn 869*d2201f2fSdrahn /* Z: Misc operations with or without arguments 870*d2201f2fSdrahn Syntax: <i> <arg1>,... 871*d2201f2fSdrahn Instr: 16 - RETIc, RETSc, SIGI(c3X), SWI, IDLE, IDLE2, RETIcD, 872*d2201f2fSdrahn TRAPc, LATc, LDEP, LDEHI, LDEPE, LDPK, STIK, LDP, IACK 873*d2201f2fSdrahn */ 874*d2201f2fSdrahn 875*d2201f2fSdrahn 876*d2201f2fSdrahn /* Define tic4x opcodes for assembler and disassembler. */ 877*d2201f2fSdrahn static const tic4x_inst_t tic4x_insts[] = 878*d2201f2fSdrahn { 879*d2201f2fSdrahn /* Put synonyms after the desired forms in table so that they get 880*d2201f2fSdrahn overwritten in the lookup table. The disassembler will thus 881*d2201f2fSdrahn print the `proper' mnemonics. Note that the disassembler 882*d2201f2fSdrahn only decodes the 11 MSBs, so instructions like ldp @0x500 will 883*d2201f2fSdrahn be printed as ldiu 5, dp. Note that with parallel instructions, 884*d2201f2fSdrahn the second part is executed before the first part, unless 885*d2201f2fSdrahn the sti1||sti2 form is used. We also allow sti2||sti1 886*d2201f2fSdrahn which is equivalent to the default sti||sti form. 887*d2201f2fSdrahn */ 888*d2201f2fSdrahn B_CLASS_INSN( "absf", 0x00000000, OP_C3X ), 889*d2201f2fSdrahn P_CLASS_INSN( "absf", "stf", 0xc8000000, OP_C3X ), 890*d2201f2fSdrahn A_CLASS_INSN( "absi", 0x00800000, OP_C3X ), 891*d2201f2fSdrahn P_CLASS_INSN( "absi", "sti", 0xca000000, OP_C3X ), 892*d2201f2fSdrahn A_CLASS_INSN( "addc", 0x01000000, OP_C3X ), 893*d2201f2fSdrahn TC_CLASS_INSN( "addc", 0x00000000, OP_C3X ), 894*d2201f2fSdrahn B_CLASS_INSN( "addf", 0x01800000, OP_C3X ), 895*d2201f2fSdrahn SC_CLASS_INSN( "addf", 0x00800000, OP_C3X ), 896*d2201f2fSdrahn QC_CLASS_INSN( "addf", "stf", 0xcc000000, OP_C3X ), 897*d2201f2fSdrahn A_CLASS_INSN( "addi", 0x02000000, OP_C3X ), 898*d2201f2fSdrahn TC_CLASS_INSN( "addi", 0x01000000, OP_C3X ), 899*d2201f2fSdrahn QC_CLASS_INSN( "addi", "sti", 0xce000000, OP_C3X ), 900*d2201f2fSdrahn AU_CLASS_INSN( "and", 0x02800000, OP_C3X ), 901*d2201f2fSdrahn TC_CLASS_INSN( "and", 0x01800000, OP_C3X ), 902*d2201f2fSdrahn QC_CLASS_INSN( "and", "sti", 0xd0000000, OP_C3X ), 903*d2201f2fSdrahn AU_CLASS_INSN( "andn", 0x03000000, OP_C3X ), 904*d2201f2fSdrahn T_CLASS_INSN( "andn", 0x02000000, OP_C3X ), 905*d2201f2fSdrahn A_CLASS_INSN( "ash", 0x03800000, OP_C3X ), 906*d2201f2fSdrahn T_CLASS_INSN( "ash", 0x02800000, OP_C3X ), 907*d2201f2fSdrahn Q_CLASS_INSN( "ash", "sti", 0xd2000000, OP_C3X ), 908*d2201f2fSdrahn J_CLASS_INSN( "bB", "b", 0x68000000, OP_C3X ), 909*d2201f2fSdrahn J_CLASS_INSN( "bBd", "bd", 0x68200000, OP_C3X ), 910*d2201f2fSdrahn J_CLASS_INSN( "bBaf", "baf", 0x68a00000, OP_C4X ), 911*d2201f2fSdrahn J_CLASS_INSN( "bBat", "bat", 0x68600000, OP_C4X ), 912*d2201f2fSdrahn { "br", 0x60000000, 0xff000000, "B" , OP_C3X }, /* I_CLASS */ 913*d2201f2fSdrahn { "brd", 0x61000000, 0xff000000, "B" , OP_C3X }, /* I_CLASS */ 914*d2201f2fSdrahn { "call", 0x62000000, 0xff000000, "B" , OP_C3X }, /* I_CLASS */ 915*d2201f2fSdrahn { "callB", 0x70000000, 0xffe00000, "Q" , OP_C3X }, /* JS_CLASS */ 916*d2201f2fSdrahn { "callB", 0x72000000, 0xffe00000, "P" , OP_C3X }, /* JS_CLASS */ 917*d2201f2fSdrahn B_CLASS_INSN( "cmpf", 0x04000000, OP_C3X ), 918*d2201f2fSdrahn S2_CLASS_INSN( "cmpf", 0x03000000, OP_C3X ), 919*d2201f2fSdrahn A_CLASS_INSN( "cmpi", 0x04800000, OP_C3X ), 920*d2201f2fSdrahn T2_CLASS_INSN( "cmpi", 0x03800000, OP_C3X ), 921*d2201f2fSdrahn D_CLASS_INSN( "dbB", "db", 0x6c000000, OP_C3X ), 922*d2201f2fSdrahn D_CLASS_INSN( "dbBd", "dbd", 0x6c200000, OP_C3X ), 923*d2201f2fSdrahn AF_CLASS_INSN( "fix", 0x05000000, OP_C3X ), 924*d2201f2fSdrahn P_CLASS_INSN( "fix", "sti", 0xd4000000, OP_C3X ), 925*d2201f2fSdrahn BI_CLASS_INSN( "float", 0x05800000, OP_C3X ), 926*d2201f2fSdrahn P_CLASS_INSN( "float", "stf", 0xd6000000, OP_C3X ), 927*d2201f2fSdrahn B6_CLASS_INSN( "frieee", 0x1c000000, OP_C4X ), 928*d2201f2fSdrahn P_CLASS_INSN( "frieee","stf", 0xf2000000, OP_C4X ), 929*d2201f2fSdrahn { "iack", 0x1b200000, 0xffe00000, "@" , OP_C3X }, /* Z_CLASS */ 930*d2201f2fSdrahn { "iack", 0x1b400000, 0xffe00000, "*" , OP_C3X }, /* Z_CLASS */ 931*d2201f2fSdrahn { "idle", 0x06000000, 0xffffffff, "" , OP_C3X }, /* Z_CLASS */ 932*d2201f2fSdrahn { "idlez", 0x06000000, 0xffffffff, "" , OP_C3X }, /* Z_CLASS */ 933*d2201f2fSdrahn { "idle2", 0x06000001, 0xffffffff, "" , OP_IDLE2 }, /* Z_CLASS */ 934*d2201f2fSdrahn { "laj", 0x63000000, 0xff000000, "B" , OP_C4X }, /* I_CLASS */ 935*d2201f2fSdrahn { "lajB", 0x70200000, 0xffe00000, "Q" , OP_C4X }, /* JS_CLASS */ 936*d2201f2fSdrahn { "lajB", 0x72200000, 0xffe00000, "P" , OP_C4X }, /* JS_CLASS */ 937*d2201f2fSdrahn { "latB", 0x74800000, 0xffe00000, "V" , OP_C4X }, /* Z_CLASS */ 938*d2201f2fSdrahn A_CLASS_INSN( "lb0", 0xb0000000, OP_C4X ), 939*d2201f2fSdrahn A_CLASS_INSN( "lb1", 0xb0800000, OP_C4X ), 940*d2201f2fSdrahn A_CLASS_INSN( "lb2", 0xb1000000, OP_C4X ), 941*d2201f2fSdrahn A_CLASS_INSN( "lb3", 0xb1800000, OP_C4X ), 942*d2201f2fSdrahn AU_CLASS_INSN( "lbu0", 0xb2000000, OP_C4X ), 943*d2201f2fSdrahn AU_CLASS_INSN( "lbu1", 0xb2800000, OP_C4X ), 944*d2201f2fSdrahn AU_CLASS_INSN( "lbu2", 0xb3000000, OP_C4X ), 945*d2201f2fSdrahn AU_CLASS_INSN( "lbu3", 0xb3800000, OP_C4X ), 946*d2201f2fSdrahn AY_CLASS_INSN( "lda", 0x1e800000, OP_C4X ), 947*d2201f2fSdrahn B_CLASS_INSN( "lde", 0x06800000, OP_C3X ), 948*d2201f2fSdrahn { "ldep", 0x76000000, 0xffe00000, "X,R" , OP_C4X }, /* Z_CLASS */ 949*d2201f2fSdrahn B_CLASS_INSN( "ldf", 0x07000000, OP_C3X ), 950*d2201f2fSdrahn LL_CLASS_INSN( "ldf", 0xc4000000, OP_C3X ), 951*d2201f2fSdrahn P_CLASS_INSN( "ldf", "stf", 0xd8000000, OP_C3X ), 952*d2201f2fSdrahn BB_CLASS_INSN( "ldfC", 0x00000000, OP_C3X ), 953*d2201f2fSdrahn B6_CLASS_INSN( "ldfi", 0x07800000, OP_C3X ), 954*d2201f2fSdrahn { "ldhi", 0x1fe00000, 0xffe00000, "U,R" , OP_C4X }, /* Z_CLASS */ 955*d2201f2fSdrahn { "ldhi", 0x1fe00000, 0xffe00000, "#,R" , OP_C4X }, /* Z_CLASS */ 956*d2201f2fSdrahn A_CLASS_INSN( "ldi", 0x08000000, OP_C3X ), 957*d2201f2fSdrahn LL_CLASS_INSN( "ldi", 0xc6000000, OP_C3X ), 958*d2201f2fSdrahn P_CLASS_INSN( "ldi", "sti", 0xda000000, OP_C3X ), 959*d2201f2fSdrahn AB_CLASS_INSN( "ldiC", 0x10000000, OP_C3X ), 960*d2201f2fSdrahn A6_CLASS_INSN( "ldii", 0x08800000, OP_C3X ), 961*d2201f2fSdrahn { "ldp", 0x50700000, 0xffff0000, "#" , OP_C3X }, /* Z_CLASS - synonym for ldiu #,dp */ 962*d2201f2fSdrahn B_CLASS_INSN( "ldm", 0x09000000, OP_C3X ), 963*d2201f2fSdrahn { "ldpe", 0x76800000, 0xffe00000, "Q,Z" , OP_C4X }, /* Z_CLASS */ 964*d2201f2fSdrahn { "ldpk", 0x1F700000, 0xffff0000, "#" , OP_C4X }, /* Z_CLASS */ 965*d2201f2fSdrahn A_CLASS_INSN( "lh0", 0xba000000, OP_C4X ), 966*d2201f2fSdrahn A_CLASS_INSN( "lh1", 0xba800000, OP_C4X ), 967*d2201f2fSdrahn AU_CLASS_INSN( "lhu0", 0xbb000000, OP_C4X ), 968*d2201f2fSdrahn AU_CLASS_INSN( "lhu1", 0xbb800000, OP_C4X ), 969*d2201f2fSdrahn { "lopower", 0x10800001,0xffffffff, "" , OP_LPWR }, /* Z_CLASS */ 970*d2201f2fSdrahn A_CLASS_INSN( "lsh", 0x09800000, OP_C3X ), 971*d2201f2fSdrahn T_CLASS_INSN( "lsh", 0x04000000, OP_C3X ), 972*d2201f2fSdrahn Q_CLASS_INSN( "lsh", "sti", 0xdc000000, OP_C3X ), 973*d2201f2fSdrahn A_CLASS_INSN( "lwl0", 0xb4000000, OP_C4X ), 974*d2201f2fSdrahn A_CLASS_INSN( "lwl1", 0xb4800000, OP_C4X ), 975*d2201f2fSdrahn A_CLASS_INSN( "lwl2", 0xb5000000, OP_C4X ), 976*d2201f2fSdrahn A_CLASS_INSN( "lwl3", 0xb5800000, OP_C4X ), 977*d2201f2fSdrahn A_CLASS_INSN( "lwr0", 0xb6000000, OP_C4X ), 978*d2201f2fSdrahn A_CLASS_INSN( "lwr1", 0xb6800000, OP_C4X ), 979*d2201f2fSdrahn A_CLASS_INSN( "lwr2", 0xb7000000, OP_C4X ), 980*d2201f2fSdrahn A_CLASS_INSN( "lwr3", 0xb7800000, OP_C4X ), 981*d2201f2fSdrahn { "maxspeed",0x10800000,0xffffffff, "" , OP_LPWR }, /* Z_CLASS */ 982*d2201f2fSdrahn A_CLASS_INSN( "mb0", 0xb8000000, OP_C4X ), 983*d2201f2fSdrahn A_CLASS_INSN( "mb1", 0xb8800000, OP_C4X ), 984*d2201f2fSdrahn A_CLASS_INSN( "mb2", 0xb9000000, OP_C4X ), 985*d2201f2fSdrahn A_CLASS_INSN( "mb3", 0xb9800000, OP_C4X ), 986*d2201f2fSdrahn A_CLASS_INSN( "mh0", 0xbc000000, OP_C4X ), 987*d2201f2fSdrahn A_CLASS_INSN( "mh1", 0xbc800000, OP_C4X ), 988*d2201f2fSdrahn A_CLASS_INSN( "mh2", 0xbd000000, OP_C4X ), 989*d2201f2fSdrahn A_CLASS_INSN( "mh3", 0xbd800000, OP_C4X ), 990*d2201f2fSdrahn B_CLASS_INSN( "mpyf", 0x0a000000, OP_C3X ), 991*d2201f2fSdrahn SC_CLASS_INSN( "mpyf", 0x04800000, OP_C3X ), 992*d2201f2fSdrahn M_CLASS_INSN( "mpyf", "addf", 0x80000000, OP_C3X ), 993*d2201f2fSdrahn QC_CLASS_INSN( "mpyf", "stf", 0xde000000, OP_C3X ), 994*d2201f2fSdrahn M_CLASS_INSN( "mpyf", "subf", 0x84000000, OP_C3X ), 995*d2201f2fSdrahn A_CLASS_INSN( "mpyi", 0x0a800000, OP_C3X ), 996*d2201f2fSdrahn TC_CLASS_INSN( "mpyi", 0x05000000, OP_C3X ), 997*d2201f2fSdrahn M_CLASS_INSN( "mpyi", "addi", 0x88000000, OP_C3X ), 998*d2201f2fSdrahn QC_CLASS_INSN( "mpyi", "sti", 0xe0000000, OP_C3X ), 999*d2201f2fSdrahn M_CLASS_INSN( "mpyi", "subi", 0x8c000000, OP_C3X ), 1000*d2201f2fSdrahn A_CLASS_INSN( "mpyshi", 0x1d800000, OP_C4X ), 1001*d2201f2fSdrahn TC_CLASS_INSN( "mpyshi", 0x28800000, OP_C4X ), 1002*d2201f2fSdrahn A_CLASS_INSN( "mpyuhi", 0x1e000000, OP_C4X ), 1003*d2201f2fSdrahn TC_CLASS_INSN( "mpyuhi", 0x29000000, OP_C4X ), 1004*d2201f2fSdrahn A_CLASS_INSN( "negb", 0x0b000000, OP_C3X ), 1005*d2201f2fSdrahn B_CLASS_INSN( "negf", 0x0b800000, OP_C3X ), 1006*d2201f2fSdrahn P_CLASS_INSN( "negf", "stf", 0xe2000000, OP_C3X ), 1007*d2201f2fSdrahn A_CLASS_INSN( "negi", 0x0c000000, OP_C3X ), 1008*d2201f2fSdrahn P_CLASS_INSN( "negi", "sti", 0xe4000000, OP_C3X ), 1009*d2201f2fSdrahn A2_CLASS_INSN( "nop", 0x0c800000, OP_C3X ), 1010*d2201f2fSdrahn B_CLASS_INSN( "norm", 0x0d000000, OP_C3X ), 1011*d2201f2fSdrahn AU_CLASS_INSN( "not", 0x0d800000, OP_C3X ), 1012*d2201f2fSdrahn P_CLASS_INSN( "not", "sti", 0xe6000000, OP_C3X ), 1013*d2201f2fSdrahn AU_CLASS_INSN( "or", 0x10000000, OP_C3X ), 1014*d2201f2fSdrahn TC_CLASS_INSN( "or", 0x05800000, OP_C3X ), 1015*d2201f2fSdrahn QC_CLASS_INSN( "or", "sti", 0xe8000000, OP_C3X ), 1016*d2201f2fSdrahn R_CLASS_INSN( "pop", 0x0e200000, OP_C3X ), 1017*d2201f2fSdrahn RF_CLASS_INSN( "popf", 0x0ea00000, OP_C3X ), 1018*d2201f2fSdrahn R_CLASS_INSN( "push", 0x0f200000, OP_C3X ), 1019*d2201f2fSdrahn RF_CLASS_INSN( "pushf", 0x0fa00000, OP_C3X ), 1020*d2201f2fSdrahn BA_CLASS_INSN( "rcpf", 0x1d000000, OP_C4X ), 1021*d2201f2fSdrahn { "retiB", 0x78000000, 0xffe00000, "" , OP_C3X }, /* Z_CLASS */ 1022*d2201f2fSdrahn { "reti", 0x78000000, 0xffe00000, "" , OP_C3X }, /* Z_CLASS - Alias for retiu */ 1023*d2201f2fSdrahn { "retiBd", 0x78200000, 0xffe00000, "" , OP_C4X }, /* Z_CLASS */ 1024*d2201f2fSdrahn { "retid", 0x78200000, 0xffe00000, "" , OP_C4X }, /* Z_CLASS - Alias for retiud */ 1025*d2201f2fSdrahn { "retsB", 0x78800000, 0xffe00000, "" , OP_C3X }, /* Z_CLASS */ 1026*d2201f2fSdrahn { "rets", 0x78800000, 0xffe00000, "" , OP_C3X }, /* Z_CLASS - Alias for retsu */ 1027*d2201f2fSdrahn B_CLASS_INSN( "rnd", 0x11000000, OP_C3X ), 1028*d2201f2fSdrahn R_CLASS_INSN( "rol", 0x11e00001, OP_C3X ), 1029*d2201f2fSdrahn R_CLASS_INSN( "rolc", 0x12600001, OP_C3X ), 1030*d2201f2fSdrahn R_CLASS_INSN( "ror", 0x12e0ffff, OP_C3X ), 1031*d2201f2fSdrahn R_CLASS_INSN( "rorc", 0x1360ffff, OP_C3X ), 1032*d2201f2fSdrahn { "rptb", 0x64000000, 0xff000000, "B" , OP_C3X }, /* I2_CLASS */ 1033*d2201f2fSdrahn { "rptb", 0x79000000, 0xff000000, "Q" , OP_C4X }, /* I2_CLASS */ 1034*d2201f2fSdrahn { "rptbd", 0x65000000, 0xff000000, "B" , OP_C4X }, /* I2_CLASS */ 1035*d2201f2fSdrahn { "rptbd", 0x79800000, 0xff000000, "Q" , OP_C4X }, /* I2_CLASS */ 1036*d2201f2fSdrahn A3_CLASS_INSN( "rpts", 0x139b0000, OP_C3X ), 1037*d2201f2fSdrahn B_CLASS_INSN( "rsqrf", 0x1c800000, OP_C4X ), 1038*d2201f2fSdrahn { "sigi", 0x16000000, 0xffe00000, "" , OP_C3X }, /* Z_CLASS */ 1039*d2201f2fSdrahn A6_CLASS_INSN( "sigi", 0x16000000, OP_C4X ), 1040*d2201f2fSdrahn B7_CLASS_INSN( "stf", 0x14000000, OP_C3X ), 1041*d2201f2fSdrahn LS_CLASS_INSN( "stf", 0xc0000000, OP_C3X ), 1042*d2201f2fSdrahn B7_CLASS_INSN( "stfi", 0x14800000, OP_C3X ), 1043*d2201f2fSdrahn A7_CLASS_INSN( "sti", 0x15000000, OP_C3X ), 1044*d2201f2fSdrahn { "sti", 0x15000000, 0xffe00000, "T,@" , OP_C4X }, /* Class A7 - Alias for stik */ 1045*d2201f2fSdrahn { "sti", 0x15600000, 0xffe00000, "T,*" , OP_C4X }, /* Class A7 */ 1046*d2201f2fSdrahn LS_CLASS_INSN( "sti", 0xc2000000, OP_C3X ), 1047*d2201f2fSdrahn A7_CLASS_INSN( "stii", 0x15800000, OP_C3X ), 1048*d2201f2fSdrahn { "stik", 0x15000000, 0xffe00000, "T,@" , OP_C4X }, /* Z_CLASS */ 1049*d2201f2fSdrahn { "stik", 0x15600000, 0xffe00000, "T,*" , OP_C4X }, /* Z_CLASS */ 1050*d2201f2fSdrahn A_CLASS_INSN( "subb", 0x16800000, OP_C3X ), 1051*d2201f2fSdrahn T_CLASS_INSN( "subb", 0x06000000, OP_C3X ), 1052*d2201f2fSdrahn A_CLASS_INSN( "subc", 0x17000000, OP_C3X ), 1053*d2201f2fSdrahn B_CLASS_INSN( "subf", 0x17800000, OP_C3X ), 1054*d2201f2fSdrahn S_CLASS_INSN( "subf", 0x06800000, OP_C3X ), 1055*d2201f2fSdrahn Q_CLASS_INSN( "subf", "stf", 0xea000000, OP_C3X ), 1056*d2201f2fSdrahn A_CLASS_INSN( "subi", 0x18000000, OP_C3X ), 1057*d2201f2fSdrahn T_CLASS_INSN( "subi", 0x07000000, OP_C3X ), 1058*d2201f2fSdrahn Q_CLASS_INSN( "subi", "sti", 0xec000000, OP_C3X ), 1059*d2201f2fSdrahn A_CLASS_INSN( "subrb", 0x18800000, OP_C3X ), 1060*d2201f2fSdrahn B_CLASS_INSN( "subrf", 0x19000000, OP_C3X ), 1061*d2201f2fSdrahn A_CLASS_INSN( "subri", 0x19800000, OP_C3X ), 1062*d2201f2fSdrahn { "swi", 0x66000000, 0xffffffff, "" , OP_C3X }, /* Z_CLASS */ 1063*d2201f2fSdrahn B_CLASS_INSN( "toieee", 0x1b800000, OP_C4X ), 1064*d2201f2fSdrahn P_CLASS_INSN( "toieee","stf", 0xf0000000, OP_C4X ), 1065*d2201f2fSdrahn { "trapB", 0x74000000, 0xffe00000, "V" , OP_C3X }, /* Z_CLASS */ 1066*d2201f2fSdrahn { "trap", 0x74000000, 0xffe00000, "V" , OP_C3X }, /* Z_CLASS - Alias for trapu */ 1067*d2201f2fSdrahn AU_CLASS_INSN( "tstb", 0x1a000000, OP_C3X ), 1068*d2201f2fSdrahn T2C_CLASS_INSN("tstb", 0x07800000, OP_C3X ), 1069*d2201f2fSdrahn AU_CLASS_INSN( "xor", 0x1a800000, OP_C3X ), 1070*d2201f2fSdrahn TC_CLASS_INSN( "xor", 0x08000000, OP_C3X ), 1071*d2201f2fSdrahn QC_CLASS_INSN( "xor", "sti", 0xee000000, OP_C3X ), 1072*d2201f2fSdrahn 1073*d2201f2fSdrahn /* Dummy entry, not included in tic4x_num_insts. This 1074*d2201f2fSdrahn lets code examine entry i + 1 without checking 1075*d2201f2fSdrahn if we've run off the end of the table. */ 1076*d2201f2fSdrahn { "", 0x0, 0x00, "", 0 } 1077*d2201f2fSdrahn }; 1078*d2201f2fSdrahn 1079*d2201f2fSdrahn const unsigned int tic4x_num_insts = (((sizeof tic4x_insts) / (sizeof tic4x_insts[0])) - 1); 1080