| 1 | /* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */ |
| 2 | /* Instruction opcode table for or1k. |
| 3 | |
| 4 | THIS FILE IS MACHINE GENERATED WITH CGEN. |
| 5 | |
| 6 | Copyright (C) 1996-2019 Free Software Foundation, Inc. |
| 7 | |
| 8 | This file is part of the GNU Binutils and/or GDB, the GNU debugger. |
| 9 | |
| 10 | This file is free software; you can redistribute it and/or modify |
| 11 | it under the terms of the GNU General Public License as published by |
| 12 | the Free Software Foundation; either version 3, or (at your option) |
| 13 | any later version. |
| 14 | |
| 15 | It is distributed in the hope that it will be useful, but WITHOUT |
| 16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 17 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
| 18 | License for more details. |
| 19 | |
| 20 | You should have received a copy of the GNU General Public License along |
| 21 | with this program; if not, write to the Free Software Foundation, Inc., |
| 22 | 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. |
| 23 | |
| 24 | */ |
| 25 | |
| 26 | #include "sysdep.h" |
| 27 | #include "ansidecl.h" |
| 28 | #include "bfd.h" |
| 29 | #include "symcat.h" |
| 30 | #include "or1k-desc.h" |
| 31 | #include "or1k-opc.h" |
| 32 | #include "libiberty.h" |
| 33 | |
| 34 | /* -- opc.c */ |
| 35 | /* -- */ |
| 36 | /* The hash functions are recorded here to help keep assembler code out of |
| 37 | the disassembler and vice versa. */ |
| 38 | |
| 39 | static int asm_hash_insn_p (const CGEN_INSN *); |
| 40 | static unsigned int asm_hash_insn (const char *); |
| 41 | static int dis_hash_insn_p (const CGEN_INSN *); |
| 42 | static unsigned int dis_hash_insn (const char *, CGEN_INSN_INT); |
| 43 | |
| 44 | /* Instruction formats. */ |
| 45 | |
| 46 | #define F(f) & or1k_cgen_ifld_table[OR1K_##f] |
| 47 | static const CGEN_IFMT ifmt_empty ATTRIBUTE_UNUSED = { |
| 48 | 0, 0, 0x0, { { 0 } } |
| 49 | }; |
| 50 | |
| 51 | static const CGEN_IFMT ifmt_l_j ATTRIBUTE_UNUSED = { |
| 52 | 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_DISP26) }, { 0 } } |
| 53 | }; |
| 54 | |
| 55 | static const CGEN_IFMT ifmt_l_adrp ATTRIBUTE_UNUSED = { |
| 56 | 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_DISP21) }, { 0 } } |
| 57 | }; |
| 58 | |
| 59 | static const CGEN_IFMT ifmt_l_jr ATTRIBUTE_UNUSED = { |
| 60 | 32, 32, 0xffff07ff, { { F (F_OPCODE) }, { F (F_RESV_25_10) }, { F (F_R3) }, { F (F_RESV_10_11) }, { 0 } } |
| 61 | }; |
| 62 | |
| 63 | static const CGEN_IFMT ifmt_l_trap ATTRIBUTE_UNUSED = { |
| 64 | 32, 32, 0xffff0000, { { F (F_OPCODE) }, { F (F_OP_25_5) }, { F (F_RESV_20_5) }, { F (F_UIMM16) }, { 0 } } |
| 65 | }; |
| 66 | |
| 67 | static const CGEN_IFMT ifmt_l_msync ATTRIBUTE_UNUSED = { |
| 68 | 32, 32, 0xffffffff, { { F (F_OPCODE) }, { F (F_OP_25_5) }, { F (F_RESV_20_21) }, { 0 } } |
| 69 | }; |
| 70 | |
| 71 | static const CGEN_IFMT ifmt_l_rfe ATTRIBUTE_UNUSED = { |
| 72 | 32, 32, 0xffffffff, { { F (F_OPCODE) }, { F (F_RESV_25_26) }, { 0 } } |
| 73 | }; |
| 74 | |
| 75 | static const CGEN_IFMT ifmt_l_nop_imm ATTRIBUTE_UNUSED = { |
| 76 | 32, 32, 0xffff0000, { { F (F_OPCODE) }, { F (F_OP_25_2) }, { F (F_RESV_23_8) }, { F (F_UIMM16) }, { 0 } } |
| 77 | }; |
| 78 | |
| 79 | static const CGEN_IFMT ifmt_l_movhi ATTRIBUTE_UNUSED = { |
| 80 | 32, 32, 0xfc1f0000, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_RESV_20_4) }, { F (F_OP_16_1) }, { F (F_UIMM16) }, { 0 } } |
| 81 | }; |
| 82 | |
| 83 | static const CGEN_IFMT ifmt_l_macrc ATTRIBUTE_UNUSED = { |
| 84 | 32, 32, 0xfc1fffff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_RESV_20_4) }, { F (F_OP_16_1) }, { F (F_UIMM16) }, { 0 } } |
| 85 | }; |
| 86 | |
| 87 | static const CGEN_IFMT ifmt_l_mfspr ATTRIBUTE_UNUSED = { |
| 88 | 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_UIMM16) }, { 0 } } |
| 89 | }; |
| 90 | |
| 91 | static const CGEN_IFMT ifmt_l_mtspr ATTRIBUTE_UNUSED = { |
| 92 | 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_R2) }, { F (F_R3) }, { F (F_UIMM16_SPLIT) }, { 0 } } |
| 93 | }; |
| 94 | |
| 95 | static const CGEN_IFMT ifmt_l_lwz ATTRIBUTE_UNUSED = { |
| 96 | 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } } |
| 97 | }; |
| 98 | |
| 99 | static const CGEN_IFMT ifmt_l_sw ATTRIBUTE_UNUSED = { |
| 100 | 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_R2) }, { F (F_R3) }, { F (F_SIMM16_SPLIT) }, { 0 } } |
| 101 | }; |
| 102 | |
| 103 | static const CGEN_IFMT ifmt_l_swa ATTRIBUTE_UNUSED = { |
| 104 | 32, 32, 0xfc000000, { { F (F_OPCODE) }, { F (F_R2) }, { F (F_R3) }, { F (F_SIMM16) }, { 0 } } |
| 105 | }; |
| 106 | |
| 107 | static const CGEN_IFMT ifmt_l_sll ATTRIBUTE_UNUSED = { |
| 108 | 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_3) }, { F (F_OP_7_2) }, { F (F_RESV_5_2) }, { F (F_OP_3_4) }, { 0 } } |
| 109 | }; |
| 110 | |
| 111 | static const CGEN_IFMT ifmt_l_slli ATTRIBUTE_UNUSED = { |
| 112 | 32, 32, 0xfc00ffc0, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_RESV_15_8) }, { F (F_OP_7_2) }, { F (F_UIMM6) }, { 0 } } |
| 113 | }; |
| 114 | |
| 115 | static const CGEN_IFMT ifmt_l_and ATTRIBUTE_UNUSED = { |
| 116 | 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_7) }, { F (F_OP_3_4) }, { 0 } } |
| 117 | }; |
| 118 | |
| 119 | static const CGEN_IFMT ifmt_l_muld ATTRIBUTE_UNUSED = { |
| 120 | 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RESV_25_5) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_7) }, { F (F_OP_3_4) }, { 0 } } |
| 121 | }; |
| 122 | |
| 123 | static const CGEN_IFMT ifmt_l_exths ATTRIBUTE_UNUSED = { |
| 124 | 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_RESV_15_6) }, { F (F_OP_9_4) }, { F (F_RESV_5_2) }, { F (F_OP_3_4) }, { 0 } } |
| 125 | }; |
| 126 | |
| 127 | static const CGEN_IFMT ifmt_l_cmov ATTRIBUTE_UNUSED = { |
| 128 | 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_1) }, { F (F_OP_9_2) }, { F (F_RESV_7_4) }, { F (F_OP_3_4) }, { 0 } } |
| 129 | }; |
| 130 | |
| 131 | static const CGEN_IFMT ifmt_l_sfgts ATTRIBUTE_UNUSED = { |
| 132 | 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_OP_25_5) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_11) }, { 0 } } |
| 133 | }; |
| 134 | |
| 135 | static const CGEN_IFMT ifmt_l_sfgtsi ATTRIBUTE_UNUSED = { |
| 136 | 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_OP_25_5) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } } |
| 137 | }; |
| 138 | |
| 139 | static const CGEN_IFMT ifmt_l_mac ATTRIBUTE_UNUSED = { |
| 140 | 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_OP_25_5) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_7) }, { F (F_OP_3_4) }, { 0 } } |
| 141 | }; |
| 142 | |
| 143 | static const CGEN_IFMT ifmt_l_maci ATTRIBUTE_UNUSED = { |
| 144 | 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RESV_25_5) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } } |
| 145 | }; |
| 146 | |
| 147 | static const CGEN_IFMT ifmt_lf_add_s ATTRIBUTE_UNUSED = { |
| 148 | 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } |
| 149 | }; |
| 150 | |
| 151 | static const CGEN_IFMT ifmt_lf_add_d ATTRIBUTE_UNUSED = { |
| 152 | 32, 32, 0xfc0007ff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R1) }, { F (F_R1) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } |
| 153 | }; |
| 154 | |
| 155 | static const CGEN_IFMT ifmt_lf_itof_s ATTRIBUTE_UNUSED = { |
| 156 | 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } |
| 157 | }; |
| 158 | |
| 159 | static const CGEN_IFMT ifmt_lf_ftoi_s ATTRIBUTE_UNUSED = { |
| 160 | 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } |
| 161 | }; |
| 162 | |
| 163 | static const CGEN_IFMT ifmt_lf_ftoi_d ATTRIBUTE_UNUSED = { |
| 164 | 32, 32, 0xfc00ffff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R1) }, { F (F_R3) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } |
| 165 | }; |
| 166 | |
| 167 | static const CGEN_IFMT ifmt_lf_eq_s ATTRIBUTE_UNUSED = { |
| 168 | 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } |
| 169 | }; |
| 170 | |
| 171 | static const CGEN_IFMT ifmt_lf_cust1_s ATTRIBUTE_UNUSED = { |
| 172 | 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RESV_25_5) }, { F (F_R2) }, { F (F_R3) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } |
| 173 | }; |
| 174 | |
| 175 | static const CGEN_IFMT ifmt_lf_cust1_d ATTRIBUTE_UNUSED = { |
| 176 | 32, 32, 0xffe007ff, { { F (F_OPCODE) }, { F (F_RESV_25_5) }, { F (F_R1) }, { F (F_R1) }, { F (F_RESV_10_3) }, { F (F_OP_7_8) }, { 0 } } |
| 177 | }; |
| 178 | |
| 179 | #undef F |
| 180 | |
| 181 | #define A(a) (1 << CGEN_INSN_##a) |
| 182 | #define OPERAND(op) OR1K_OPERAND_##op |
| 183 | #define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */ |
| 184 | #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field)) |
| 185 | |
| 186 | /* The instruction table. */ |
| 187 | |
| 188 | static const CGEN_OPCODE or1k_cgen_insn_opcode_table[MAX_INSNS] = |
| 189 | { |
| 190 | /* Special null first entry. |
| 191 | A `num' value of zero is thus invalid. |
| 192 | Also, the special `invalid' insn resides here. */ |
| 193 | { { 0, 0, 0, 0 }, {{0}}, 0, {0}}, |
| 194 | /* l.j ${disp26} */ |
| 195 | { |
| 196 | { 0, 0, 0, 0 }, |
| 197 | { { MNEM, ' ', OP (DISP26), 0 } }, |
| 198 | & ifmt_l_j, { 0x0 } |
| 199 | }, |
| 200 | /* l.adrp $rD,${disp21} */ |
| 201 | { |
| 202 | { 0, 0, 0, 0 }, |
| 203 | { { MNEM, ' ', OP (RD), ',', OP (DISP21), 0 } }, |
| 204 | & ifmt_l_adrp, { 0x8000000 } |
| 205 | }, |
| 206 | /* l.jal ${disp26} */ |
| 207 | { |
| 208 | { 0, 0, 0, 0 }, |
| 209 | { { MNEM, ' ', OP (DISP26), 0 } }, |
| 210 | & ifmt_l_j, { 0x4000000 } |
| 211 | }, |
| 212 | /* l.jr $rB */ |
| 213 | { |
| 214 | { 0, 0, 0, 0 }, |
| 215 | { { MNEM, ' ', OP (RB), 0 } }, |
| 216 | & ifmt_l_jr, { 0x44000000 } |
| 217 | }, |
| 218 | /* l.jalr $rB */ |
| 219 | { |
| 220 | { 0, 0, 0, 0 }, |
| 221 | { { MNEM, ' ', OP (RB), 0 } }, |
| 222 | & ifmt_l_jr, { 0x48000000 } |
| 223 | }, |
| 224 | /* l.bnf ${disp26} */ |
| 225 | { |
| 226 | { 0, 0, 0, 0 }, |
| 227 | { { MNEM, ' ', OP (DISP26), 0 } }, |
| 228 | & ifmt_l_j, { 0xc000000 } |
| 229 | }, |
| 230 | /* l.bf ${disp26} */ |
| 231 | { |
| 232 | { 0, 0, 0, 0 }, |
| 233 | { { MNEM, ' ', OP (DISP26), 0 } }, |
| 234 | & ifmt_l_j, { 0x10000000 } |
| 235 | }, |
| 236 | /* l.trap ${uimm16} */ |
| 237 | { |
| 238 | { 0, 0, 0, 0 }, |
| 239 | { { MNEM, ' ', OP (UIMM16), 0 } }, |
| 240 | & ifmt_l_trap, { 0x21000000 } |
| 241 | }, |
| 242 | /* l.sys ${uimm16} */ |
| 243 | { |
| 244 | { 0, 0, 0, 0 }, |
| 245 | { { MNEM, ' ', OP (UIMM16), 0 } }, |
| 246 | & ifmt_l_trap, { 0x20000000 } |
| 247 | }, |
| 248 | /* l.msync */ |
| 249 | { |
| 250 | { 0, 0, 0, 0 }, |
| 251 | { { MNEM, 0 } }, |
| 252 | & ifmt_l_msync, { 0x22000000 } |
| 253 | }, |
| 254 | /* l.psync */ |
| 255 | { |
| 256 | { 0, 0, 0, 0 }, |
| 257 | { { MNEM, 0 } }, |
| 258 | & ifmt_l_msync, { 0x22800000 } |
| 259 | }, |
| 260 | /* l.csync */ |
| 261 | { |
| 262 | { 0, 0, 0, 0 }, |
| 263 | { { MNEM, 0 } }, |
| 264 | & ifmt_l_msync, { 0x23000000 } |
| 265 | }, |
| 266 | /* l.rfe */ |
| 267 | { |
| 268 | { 0, 0, 0, 0 }, |
| 269 | { { MNEM, 0 } }, |
| 270 | & ifmt_l_rfe, { 0x24000000 } |
| 271 | }, |
| 272 | /* l.nop ${uimm16} */ |
| 273 | { |
| 274 | { 0, 0, 0, 0 }, |
| 275 | { { MNEM, ' ', OP (UIMM16), 0 } }, |
| 276 | & ifmt_l_nop_imm, { 0x15000000 } |
| 277 | }, |
| 278 | /* l.nop */ |
| 279 | { |
| 280 | { 0, 0, 0, 0 }, |
| 281 | { { MNEM, 0 } }, |
| 282 | & ifmt_l_nop_imm, { 0x15000000 } |
| 283 | }, |
| 284 | /* l.movhi $rD,$uimm16 */ |
| 285 | { |
| 286 | { 0, 0, 0, 0 }, |
| 287 | { { MNEM, ' ', OP (RD), ',', OP (UIMM16), 0 } }, |
| 288 | & ifmt_l_movhi, { 0x18000000 } |
| 289 | }, |
| 290 | /* l.macrc $rD */ |
| 291 | { |
| 292 | { 0, 0, 0, 0 }, |
| 293 | { { MNEM, ' ', OP (RD), 0 } }, |
| 294 | & ifmt_l_macrc, { 0x18010000 } |
| 295 | }, |
| 296 | /* l.mfspr $rD,$rA,${uimm16} */ |
| 297 | { |
| 298 | { 0, 0, 0, 0 }, |
| 299 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM16), 0 } }, |
| 300 | & ifmt_l_mfspr, { 0xb4000000 } |
| 301 | }, |
| 302 | /* l.mtspr $rA,$rB,${uimm16-split} */ |
| 303 | { |
| 304 | { 0, 0, 0, 0 }, |
| 305 | { { MNEM, ' ', OP (RA), ',', OP (RB), ',', OP (UIMM16_SPLIT), 0 } }, |
| 306 | & ifmt_l_mtspr, { 0xc0000000 } |
| 307 | }, |
| 308 | /* l.lwz $rD,${simm16}($rA) */ |
| 309 | { |
| 310 | { 0, 0, 0, 0 }, |
| 311 | { { MNEM, ' ', OP (RD), ',', OP (SIMM16), '(', OP (RA), ')', 0 } }, |
| 312 | & ifmt_l_lwz, { 0x84000000 } |
| 313 | }, |
| 314 | /* l.lws $rD,${simm16}($rA) */ |
| 315 | { |
| 316 | { 0, 0, 0, 0 }, |
| 317 | { { MNEM, ' ', OP (RD), ',', OP (SIMM16), '(', OP (RA), ')', 0 } }, |
| 318 | & ifmt_l_lwz, { 0x88000000 } |
| 319 | }, |
| 320 | /* l.lwa $rD,${simm16}($rA) */ |
| 321 | { |
| 322 | { 0, 0, 0, 0 }, |
| 323 | { { MNEM, ' ', OP (RD), ',', OP (SIMM16), '(', OP (RA), ')', 0 } }, |
| 324 | & ifmt_l_lwz, { 0x6c000000 } |
| 325 | }, |
| 326 | /* l.lbz $rD,${simm16}($rA) */ |
| 327 | { |
| 328 | { 0, 0, 0, 0 }, |
| 329 | { { MNEM, ' ', OP (RD), ',', OP (SIMM16), '(', OP (RA), ')', 0 } }, |
| 330 | & ifmt_l_lwz, { 0x8c000000 } |
| 331 | }, |
| 332 | /* l.lbs $rD,${simm16}($rA) */ |
| 333 | { |
| 334 | { 0, 0, 0, 0 }, |
| 335 | { { MNEM, ' ', OP (RD), ',', OP (SIMM16), '(', OP (RA), ')', 0 } }, |
| 336 | & ifmt_l_lwz, { 0x90000000 } |
| 337 | }, |
| 338 | /* l.lhz $rD,${simm16}($rA) */ |
| 339 | { |
| 340 | { 0, 0, 0, 0 }, |
| 341 | { { MNEM, ' ', OP (RD), ',', OP (SIMM16), '(', OP (RA), ')', 0 } }, |
| 342 | & ifmt_l_lwz, { 0x94000000 } |
| 343 | }, |
| 344 | /* l.lhs $rD,${simm16}($rA) */ |
| 345 | { |
| 346 | { 0, 0, 0, 0 }, |
| 347 | { { MNEM, ' ', OP (RD), ',', OP (SIMM16), '(', OP (RA), ')', 0 } }, |
| 348 | & ifmt_l_lwz, { 0x98000000 } |
| 349 | }, |
| 350 | /* l.sw ${simm16-split}($rA),$rB */ |
| 351 | { |
| 352 | { 0, 0, 0, 0 }, |
| 353 | { { MNEM, ' ', OP (SIMM16_SPLIT), '(', OP (RA), ')', ',', OP (RB), 0 } }, |
| 354 | & ifmt_l_sw, { 0xd4000000 } |
| 355 | }, |
| 356 | /* l.sb ${simm16-split}($rA),$rB */ |
| 357 | { |
| 358 | { 0, 0, 0, 0 }, |
| 359 | { { MNEM, ' ', OP (SIMM16_SPLIT), '(', OP (RA), ')', ',', OP (RB), 0 } }, |
| 360 | & ifmt_l_sw, { 0xd8000000 } |
| 361 | }, |
| 362 | /* l.sh ${simm16-split}($rA),$rB */ |
| 363 | { |
| 364 | { 0, 0, 0, 0 }, |
| 365 | { { MNEM, ' ', OP (SIMM16_SPLIT), '(', OP (RA), ')', ',', OP (RB), 0 } }, |
| 366 | & ifmt_l_sw, { 0xdc000000 } |
| 367 | }, |
| 368 | /* l.swa ${simm16-split}($rA),$rB */ |
| 369 | { |
| 370 | { 0, 0, 0, 0 }, |
| 371 | { { MNEM, ' ', OP (SIMM16_SPLIT), '(', OP (RA), ')', ',', OP (RB), 0 } }, |
| 372 | & ifmt_l_swa, { 0xcc000000 } |
| 373 | }, |
| 374 | /* l.sll $rD,$rA,$rB */ |
| 375 | { |
| 376 | { 0, 0, 0, 0 }, |
| 377 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 378 | & ifmt_l_sll, { 0xe0000008 } |
| 379 | }, |
| 380 | /* l.slli $rD,$rA,${uimm6} */ |
| 381 | { |
| 382 | { 0, 0, 0, 0 }, |
| 383 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM6), 0 } }, |
| 384 | & ifmt_l_slli, { 0xb8000000 } |
| 385 | }, |
| 386 | /* l.srl $rD,$rA,$rB */ |
| 387 | { |
| 388 | { 0, 0, 0, 0 }, |
| 389 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 390 | & ifmt_l_sll, { 0xe0000048 } |
| 391 | }, |
| 392 | /* l.srli $rD,$rA,${uimm6} */ |
| 393 | { |
| 394 | { 0, 0, 0, 0 }, |
| 395 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM6), 0 } }, |
| 396 | & ifmt_l_slli, { 0xb8000040 } |
| 397 | }, |
| 398 | /* l.sra $rD,$rA,$rB */ |
| 399 | { |
| 400 | { 0, 0, 0, 0 }, |
| 401 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 402 | & ifmt_l_sll, { 0xe0000088 } |
| 403 | }, |
| 404 | /* l.srai $rD,$rA,${uimm6} */ |
| 405 | { |
| 406 | { 0, 0, 0, 0 }, |
| 407 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM6), 0 } }, |
| 408 | & ifmt_l_slli, { 0xb8000080 } |
| 409 | }, |
| 410 | /* l.ror $rD,$rA,$rB */ |
| 411 | { |
| 412 | { 0, 0, 0, 0 }, |
| 413 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 414 | & ifmt_l_sll, { 0xe00000c8 } |
| 415 | }, |
| 416 | /* l.rori $rD,$rA,${uimm6} */ |
| 417 | { |
| 418 | { 0, 0, 0, 0 }, |
| 419 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM6), 0 } }, |
| 420 | & ifmt_l_slli, { 0xb80000c0 } |
| 421 | }, |
| 422 | /* l.and $rD,$rA,$rB */ |
| 423 | { |
| 424 | { 0, 0, 0, 0 }, |
| 425 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 426 | & ifmt_l_and, { 0xe0000003 } |
| 427 | }, |
| 428 | /* l.or $rD,$rA,$rB */ |
| 429 | { |
| 430 | { 0, 0, 0, 0 }, |
| 431 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 432 | & ifmt_l_and, { 0xe0000004 } |
| 433 | }, |
| 434 | /* l.xor $rD,$rA,$rB */ |
| 435 | { |
| 436 | { 0, 0, 0, 0 }, |
| 437 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 438 | & ifmt_l_and, { 0xe0000005 } |
| 439 | }, |
| 440 | /* l.add $rD,$rA,$rB */ |
| 441 | { |
| 442 | { 0, 0, 0, 0 }, |
| 443 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 444 | & ifmt_l_and, { 0xe0000000 } |
| 445 | }, |
| 446 | /* l.sub $rD,$rA,$rB */ |
| 447 | { |
| 448 | { 0, 0, 0, 0 }, |
| 449 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 450 | & ifmt_l_and, { 0xe0000002 } |
| 451 | }, |
| 452 | /* l.addc $rD,$rA,$rB */ |
| 453 | { |
| 454 | { 0, 0, 0, 0 }, |
| 455 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 456 | & ifmt_l_and, { 0xe0000001 } |
| 457 | }, |
| 458 | /* l.mul $rD,$rA,$rB */ |
| 459 | { |
| 460 | { 0, 0, 0, 0 }, |
| 461 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 462 | & ifmt_l_and, { 0xe0000306 } |
| 463 | }, |
| 464 | /* l.muld $rA,$rB */ |
| 465 | { |
| 466 | { 0, 0, 0, 0 }, |
| 467 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 468 | & ifmt_l_muld, { 0xe0000307 } |
| 469 | }, |
| 470 | /* l.mulu $rD,$rA,$rB */ |
| 471 | { |
| 472 | { 0, 0, 0, 0 }, |
| 473 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 474 | & ifmt_l_and, { 0xe000030b } |
| 475 | }, |
| 476 | /* l.muldu $rA,$rB */ |
| 477 | { |
| 478 | { 0, 0, 0, 0 }, |
| 479 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 480 | & ifmt_l_muld, { 0xe000030d } |
| 481 | }, |
| 482 | /* l.div $rD,$rA,$rB */ |
| 483 | { |
| 484 | { 0, 0, 0, 0 }, |
| 485 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 486 | & ifmt_l_and, { 0xe0000309 } |
| 487 | }, |
| 488 | /* l.divu $rD,$rA,$rB */ |
| 489 | { |
| 490 | { 0, 0, 0, 0 }, |
| 491 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 492 | & ifmt_l_and, { 0xe000030a } |
| 493 | }, |
| 494 | /* l.ff1 $rD,$rA */ |
| 495 | { |
| 496 | { 0, 0, 0, 0 }, |
| 497 | { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, |
| 498 | & ifmt_l_and, { 0xe000000f } |
| 499 | }, |
| 500 | /* l.fl1 $rD,$rA */ |
| 501 | { |
| 502 | { 0, 0, 0, 0 }, |
| 503 | { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, |
| 504 | & ifmt_l_and, { 0xe000010f } |
| 505 | }, |
| 506 | /* l.andi $rD,$rA,$uimm16 */ |
| 507 | { |
| 508 | { 0, 0, 0, 0 }, |
| 509 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM16), 0 } }, |
| 510 | & ifmt_l_mfspr, { 0xa4000000 } |
| 511 | }, |
| 512 | /* l.ori $rD,$rA,$uimm16 */ |
| 513 | { |
| 514 | { 0, 0, 0, 0 }, |
| 515 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (UIMM16), 0 } }, |
| 516 | & ifmt_l_mfspr, { 0xa8000000 } |
| 517 | }, |
| 518 | /* l.xori $rD,$rA,$simm16 */ |
| 519 | { |
| 520 | { 0, 0, 0, 0 }, |
| 521 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (SIMM16), 0 } }, |
| 522 | & ifmt_l_lwz, { 0xac000000 } |
| 523 | }, |
| 524 | /* l.addi $rD,$rA,$simm16 */ |
| 525 | { |
| 526 | { 0, 0, 0, 0 }, |
| 527 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (SIMM16), 0 } }, |
| 528 | & ifmt_l_lwz, { 0x9c000000 } |
| 529 | }, |
| 530 | /* l.addic $rD,$rA,$simm16 */ |
| 531 | { |
| 532 | { 0, 0, 0, 0 }, |
| 533 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (SIMM16), 0 } }, |
| 534 | & ifmt_l_lwz, { 0xa0000000 } |
| 535 | }, |
| 536 | /* l.muli $rD,$rA,$simm16 */ |
| 537 | { |
| 538 | { 0, 0, 0, 0 }, |
| 539 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (SIMM16), 0 } }, |
| 540 | & ifmt_l_lwz, { 0xb0000000 } |
| 541 | }, |
| 542 | /* l.exths $rD,$rA */ |
| 543 | { |
| 544 | { 0, 0, 0, 0 }, |
| 545 | { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, |
| 546 | & ifmt_l_exths, { 0xe000000c } |
| 547 | }, |
| 548 | /* l.extbs $rD,$rA */ |
| 549 | { |
| 550 | { 0, 0, 0, 0 }, |
| 551 | { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, |
| 552 | & ifmt_l_exths, { 0xe000004c } |
| 553 | }, |
| 554 | /* l.exthz $rD,$rA */ |
| 555 | { |
| 556 | { 0, 0, 0, 0 }, |
| 557 | { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, |
| 558 | & ifmt_l_exths, { 0xe000008c } |
| 559 | }, |
| 560 | /* l.extbz $rD,$rA */ |
| 561 | { |
| 562 | { 0, 0, 0, 0 }, |
| 563 | { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, |
| 564 | & ifmt_l_exths, { 0xe00000cc } |
| 565 | }, |
| 566 | /* l.extws $rD,$rA */ |
| 567 | { |
| 568 | { 0, 0, 0, 0 }, |
| 569 | { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, |
| 570 | & ifmt_l_exths, { 0xe000000d } |
| 571 | }, |
| 572 | /* l.extwz $rD,$rA */ |
| 573 | { |
| 574 | { 0, 0, 0, 0 }, |
| 575 | { { MNEM, ' ', OP (RD), ',', OP (RA), 0 } }, |
| 576 | & ifmt_l_exths, { 0xe000004d } |
| 577 | }, |
| 578 | /* l.cmov $rD,$rA,$rB */ |
| 579 | { |
| 580 | { 0, 0, 0, 0 }, |
| 581 | { { MNEM, ' ', OP (RD), ',', OP (RA), ',', OP (RB), 0 } }, |
| 582 | & ifmt_l_cmov, { 0xe000000e } |
| 583 | }, |
| 584 | /* l.sfgts $rA,$rB */ |
| 585 | { |
| 586 | { 0, 0, 0, 0 }, |
| 587 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 588 | & ifmt_l_sfgts, { 0xe5400000 } |
| 589 | }, |
| 590 | /* l.sfgtsi $rA,$simm16 */ |
| 591 | { |
| 592 | { 0, 0, 0, 0 }, |
| 593 | { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, |
| 594 | & ifmt_l_sfgtsi, { 0xbd400000 } |
| 595 | }, |
| 596 | /* l.sfgtu $rA,$rB */ |
| 597 | { |
| 598 | { 0, 0, 0, 0 }, |
| 599 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 600 | & ifmt_l_sfgts, { 0xe4400000 } |
| 601 | }, |
| 602 | /* l.sfgtui $rA,$simm16 */ |
| 603 | { |
| 604 | { 0, 0, 0, 0 }, |
| 605 | { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, |
| 606 | & ifmt_l_sfgtsi, { 0xbc400000 } |
| 607 | }, |
| 608 | /* l.sfges $rA,$rB */ |
| 609 | { |
| 610 | { 0, 0, 0, 0 }, |
| 611 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 612 | & ifmt_l_sfgts, { 0xe5600000 } |
| 613 | }, |
| 614 | /* l.sfgesi $rA,$simm16 */ |
| 615 | { |
| 616 | { 0, 0, 0, 0 }, |
| 617 | { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, |
| 618 | & ifmt_l_sfgtsi, { 0xbd600000 } |
| 619 | }, |
| 620 | /* l.sfgeu $rA,$rB */ |
| 621 | { |
| 622 | { 0, 0, 0, 0 }, |
| 623 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 624 | & ifmt_l_sfgts, { 0xe4600000 } |
| 625 | }, |
| 626 | /* l.sfgeui $rA,$simm16 */ |
| 627 | { |
| 628 | { 0, 0, 0, 0 }, |
| 629 | { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, |
| 630 | & ifmt_l_sfgtsi, { 0xbc600000 } |
| 631 | }, |
| 632 | /* l.sflts $rA,$rB */ |
| 633 | { |
| 634 | { 0, 0, 0, 0 }, |
| 635 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 636 | & ifmt_l_sfgts, { 0xe5800000 } |
| 637 | }, |
| 638 | /* l.sfltsi $rA,$simm16 */ |
| 639 | { |
| 640 | { 0, 0, 0, 0 }, |
| 641 | { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, |
| 642 | & ifmt_l_sfgtsi, { 0xbd800000 } |
| 643 | }, |
| 644 | /* l.sfltu $rA,$rB */ |
| 645 | { |
| 646 | { 0, 0, 0, 0 }, |
| 647 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 648 | & ifmt_l_sfgts, { 0xe4800000 } |
| 649 | }, |
| 650 | /* l.sfltui $rA,$simm16 */ |
| 651 | { |
| 652 | { 0, 0, 0, 0 }, |
| 653 | { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, |
| 654 | & ifmt_l_sfgtsi, { 0xbc800000 } |
| 655 | }, |
| 656 | /* l.sfles $rA,$rB */ |
| 657 | { |
| 658 | { 0, 0, 0, 0 }, |
| 659 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 660 | & ifmt_l_sfgts, { 0xe5a00000 } |
| 661 | }, |
| 662 | /* l.sflesi $rA,$simm16 */ |
| 663 | { |
| 664 | { 0, 0, 0, 0 }, |
| 665 | { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, |
| 666 | & ifmt_l_sfgtsi, { 0xbda00000 } |
| 667 | }, |
| 668 | /* l.sfleu $rA,$rB */ |
| 669 | { |
| 670 | { 0, 0, 0, 0 }, |
| 671 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 672 | & ifmt_l_sfgts, { 0xe4a00000 } |
| 673 | }, |
| 674 | /* l.sfleui $rA,$simm16 */ |
| 675 | { |
| 676 | { 0, 0, 0, 0 }, |
| 677 | { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, |
| 678 | & ifmt_l_sfgtsi, { 0xbca00000 } |
| 679 | }, |
| 680 | /* l.sfeq $rA,$rB */ |
| 681 | { |
| 682 | { 0, 0, 0, 0 }, |
| 683 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 684 | & ifmt_l_sfgts, { 0xe4000000 } |
| 685 | }, |
| 686 | /* l.sfeqi $rA,$simm16 */ |
| 687 | { |
| 688 | { 0, 0, 0, 0 }, |
| 689 | { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, |
| 690 | & ifmt_l_sfgtsi, { 0xbc000000 } |
| 691 | }, |
| 692 | /* l.sfne $rA,$rB */ |
| 693 | { |
| 694 | { 0, 0, 0, 0 }, |
| 695 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 696 | & ifmt_l_sfgts, { 0xe4200000 } |
| 697 | }, |
| 698 | /* l.sfnei $rA,$simm16 */ |
| 699 | { |
| 700 | { 0, 0, 0, 0 }, |
| 701 | { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, |
| 702 | & ifmt_l_sfgtsi, { 0xbc200000 } |
| 703 | }, |
| 704 | /* l.mac $rA,$rB */ |
| 705 | { |
| 706 | { 0, 0, 0, 0 }, |
| 707 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 708 | & ifmt_l_mac, { 0xc4000001 } |
| 709 | }, |
| 710 | /* l.maci $rA,${simm16} */ |
| 711 | { |
| 712 | { 0, 0, 0, 0 }, |
| 713 | { { MNEM, ' ', OP (RA), ',', OP (SIMM16), 0 } }, |
| 714 | & ifmt_l_maci, { 0x4c000000 } |
| 715 | }, |
| 716 | /* l.macu $rA,$rB */ |
| 717 | { |
| 718 | { 0, 0, 0, 0 }, |
| 719 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 720 | & ifmt_l_mac, { 0xc4000003 } |
| 721 | }, |
| 722 | /* l.msb $rA,$rB */ |
| 723 | { |
| 724 | { 0, 0, 0, 0 }, |
| 725 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 726 | & ifmt_l_mac, { 0xc4000002 } |
| 727 | }, |
| 728 | /* l.msbu $rA,$rB */ |
| 729 | { |
| 730 | { 0, 0, 0, 0 }, |
| 731 | { { MNEM, ' ', OP (RA), ',', OP (RB), 0 } }, |
| 732 | & ifmt_l_mac, { 0xc4000004 } |
| 733 | }, |
| 734 | /* l.cust1 */ |
| 735 | { |
| 736 | { 0, 0, 0, 0 }, |
| 737 | { { MNEM, 0 } }, |
| 738 | & ifmt_l_rfe, { 0x70000000 } |
| 739 | }, |
| 740 | /* l.cust2 */ |
| 741 | { |
| 742 | { 0, 0, 0, 0 }, |
| 743 | { { MNEM, 0 } }, |
| 744 | & ifmt_l_rfe, { 0x74000000 } |
| 745 | }, |
| 746 | /* l.cust3 */ |
| 747 | { |
| 748 | { 0, 0, 0, 0 }, |
| 749 | { { MNEM, 0 } }, |
| 750 | & ifmt_l_rfe, { 0x78000000 } |
| 751 | }, |
| 752 | /* l.cust4 */ |
| 753 | { |
| 754 | { 0, 0, 0, 0 }, |
| 755 | { { MNEM, 0 } }, |
| 756 | & ifmt_l_rfe, { 0x7c000000 } |
| 757 | }, |
| 758 | /* l.cust5 */ |
| 759 | { |
| 760 | { 0, 0, 0, 0 }, |
| 761 | { { MNEM, 0 } }, |
| 762 | & ifmt_l_rfe, { 0xf0000000 } |
| 763 | }, |
| 764 | /* l.cust6 */ |
| 765 | { |
| 766 | { 0, 0, 0, 0 }, |
| 767 | { { MNEM, 0 } }, |
| 768 | & ifmt_l_rfe, { 0xf4000000 } |
| 769 | }, |
| 770 | /* l.cust7 */ |
| 771 | { |
| 772 | { 0, 0, 0, 0 }, |
| 773 | { { MNEM, 0 } }, |
| 774 | & ifmt_l_rfe, { 0xf8000000 } |
| 775 | }, |
| 776 | /* l.cust8 */ |
| 777 | { |
| 778 | { 0, 0, 0, 0 }, |
| 779 | { { MNEM, 0 } }, |
| 780 | & ifmt_l_rfe, { 0xfc000000 } |
| 781 | }, |
| 782 | /* lf.add.s $rDSF,$rASF,$rBSF */ |
| 783 | { |
| 784 | { 0, 0, 0, 0 }, |
| 785 | { { MNEM, ' ', OP (RDSF), ',', OP (RASF), ',', OP (RBSF), 0 } }, |
| 786 | & ifmt_lf_add_s, { 0xc8000000 } |
| 787 | }, |
| 788 | /* lf.add.d $rDDF,$rADF,$rBDF */ |
| 789 | { |
| 790 | { 0, 0, 0, 0 }, |
| 791 | { { MNEM, ' ', OP (RDDF), ',', OP (RADF), ',', OP (RBDF), 0 } }, |
| 792 | & ifmt_lf_add_d, { 0xc8000010 } |
| 793 | }, |
| 794 | /* lf.sub.s $rDSF,$rASF,$rBSF */ |
| 795 | { |
| 796 | { 0, 0, 0, 0 }, |
| 797 | { { MNEM, ' ', OP (RDSF), ',', OP (RASF), ',', OP (RBSF), 0 } }, |
| 798 | & ifmt_lf_add_s, { 0xc8000001 } |
| 799 | }, |
| 800 | /* lf.sub.d $rDDF,$rADF,$rBDF */ |
| 801 | { |
| 802 | { 0, 0, 0, 0 }, |
| 803 | { { MNEM, ' ', OP (RDDF), ',', OP (RADF), ',', OP (RBDF), 0 } }, |
| 804 | & ifmt_lf_add_d, { 0xc8000011 } |
| 805 | }, |
| 806 | /* lf.mul.s $rDSF,$rASF,$rBSF */ |
| 807 | { |
| 808 | { 0, 0, 0, 0 }, |
| 809 | { { MNEM, ' ', OP (RDSF), ',', OP (RASF), ',', OP (RBSF), 0 } }, |
| 810 | & ifmt_lf_add_s, { 0xc8000002 } |
| 811 | }, |
| 812 | /* lf.mul.d $rDDF,$rADF,$rBDF */ |
| 813 | { |
| 814 | { 0, 0, 0, 0 }, |
| 815 | { { MNEM, ' ', OP (RDDF), ',', OP (RADF), ',', OP (RBDF), 0 } }, |
| 816 | & ifmt_lf_add_d, { 0xc8000012 } |
| 817 | }, |
| 818 | /* lf.div.s $rDSF,$rASF,$rBSF */ |
| 819 | { |
| 820 | { 0, 0, 0, 0 }, |
| 821 | { { MNEM, ' ', OP (RDSF), ',', OP (RASF), ',', OP (RBSF), 0 } }, |
| 822 | & ifmt_lf_add_s, { 0xc8000003 } |
| 823 | }, |
| 824 | /* lf.div.d $rDDF,$rADF,$rBDF */ |
| 825 | { |
| 826 | { 0, 0, 0, 0 }, |
| 827 | { { MNEM, ' ', OP (RDDF), ',', OP (RADF), ',', OP (RBDF), 0 } }, |
| 828 | & ifmt_lf_add_d, { 0xc8000013 } |
| 829 | }, |
| 830 | /* lf.rem.s $rDSF,$rASF,$rBSF */ |
| 831 | { |
| 832 | { 0, 0, 0, 0 }, |
| 833 | { { MNEM, ' ', OP (RDSF), ',', OP (RASF), ',', OP (RBSF), 0 } }, |
| 834 | & ifmt_lf_add_s, { 0xc8000006 } |
| 835 | }, |
| 836 | /* lf.rem.d $rDDF,$rADF,$rBDF */ |
| 837 | { |
| 838 | { 0, 0, 0, 0 }, |
| 839 | { { MNEM, ' ', OP (RDDF), ',', OP (RADF), ',', OP (RBDF), 0 } }, |
| 840 | & ifmt_lf_add_d, { 0xc8000016 } |
| 841 | }, |
| 842 | /* lf.itof.s $rDSF,$rA */ |
| 843 | { |
| 844 | { 0, 0, 0, 0 }, |
| 845 | { { MNEM, ' ', OP (RDSF), ',', OP (RA), 0 } }, |
| 846 | & ifmt_lf_itof_s, { 0xc8000004 } |
| 847 | }, |
| 848 | /* lf.itof.d $rDSF,$rA */ |
| 849 | { |
| 850 | { 0, 0, 0, 0 }, |
| 851 | { { MNEM, ' ', OP (RDSF), ',', OP (RA), 0 } }, |
| 852 | & ifmt_lf_itof_s, { 0xc8000014 } |
| 853 | }, |
| 854 | /* lf.ftoi.s $rD,$rASF */ |
| 855 | { |
| 856 | { 0, 0, 0, 0 }, |
| 857 | { { MNEM, ' ', OP (RD), ',', OP (RASF), 0 } }, |
| 858 | & ifmt_lf_ftoi_s, { 0xc8000005 } |
| 859 | }, |
| 860 | /* lf.ftoi.d $rD,$rADF */ |
| 861 | { |
| 862 | { 0, 0, 0, 0 }, |
| 863 | { { MNEM, ' ', OP (RD), ',', OP (RADF), 0 } }, |
| 864 | & ifmt_lf_ftoi_d, { 0xc8000015 } |
| 865 | }, |
| 866 | /* lf.sfeq.s $rASF,$rBSF */ |
| 867 | { |
| 868 | { 0, 0, 0, 0 }, |
| 869 | { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, |
| 870 | & ifmt_lf_eq_s, { 0xc8000008 } |
| 871 | }, |
| 872 | /* lf.sfeq.d $rASF,$rBSF */ |
| 873 | { |
| 874 | { 0, 0, 0, 0 }, |
| 875 | { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, |
| 876 | & ifmt_lf_eq_s, { 0xc8000018 } |
| 877 | }, |
| 878 | /* lf.sfne.s $rASF,$rBSF */ |
| 879 | { |
| 880 | { 0, 0, 0, 0 }, |
| 881 | { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, |
| 882 | & ifmt_lf_eq_s, { 0xc8000009 } |
| 883 | }, |
| 884 | /* lf.sfne.d $rASF,$rBSF */ |
| 885 | { |
| 886 | { 0, 0, 0, 0 }, |
| 887 | { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, |
| 888 | & ifmt_lf_eq_s, { 0xc8000019 } |
| 889 | }, |
| 890 | /* lf.sfge.s $rASF,$rBSF */ |
| 891 | { |
| 892 | { 0, 0, 0, 0 }, |
| 893 | { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, |
| 894 | & ifmt_lf_eq_s, { 0xc800000b } |
| 895 | }, |
| 896 | /* lf.sfge.d $rASF,$rBSF */ |
| 897 | { |
| 898 | { 0, 0, 0, 0 }, |
| 899 | { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, |
| 900 | & ifmt_lf_eq_s, { 0xc800001b } |
| 901 | }, |
| 902 | /* lf.sfgt.s $rASF,$rBSF */ |
| 903 | { |
| 904 | { 0, 0, 0, 0 }, |
| 905 | { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, |
| 906 | & ifmt_lf_eq_s, { 0xc800000a } |
| 907 | }, |
| 908 | /* lf.sfgt.d $rASF,$rBSF */ |
| 909 | { |
| 910 | { 0, 0, 0, 0 }, |
| 911 | { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, |
| 912 | & ifmt_lf_eq_s, { 0xc800001a } |
| 913 | }, |
| 914 | /* lf.sflt.s $rASF,$rBSF */ |
| 915 | { |
| 916 | { 0, 0, 0, 0 }, |
| 917 | { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, |
| 918 | & ifmt_lf_eq_s, { 0xc800000c } |
| 919 | }, |
| 920 | /* lf.sflt.d $rASF,$rBSF */ |
| 921 | { |
| 922 | { 0, 0, 0, 0 }, |
| 923 | { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, |
| 924 | & ifmt_lf_eq_s, { 0xc800001c } |
| 925 | }, |
| 926 | /* lf.sfle.s $rASF,$rBSF */ |
| 927 | { |
| 928 | { 0, 0, 0, 0 }, |
| 929 | { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, |
| 930 | & ifmt_lf_eq_s, { 0xc800000d } |
| 931 | }, |
| 932 | /* lf.sfle.d $rASF,$rBSF */ |
| 933 | { |
| 934 | { 0, 0, 0, 0 }, |
| 935 | { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, |
| 936 | & ifmt_lf_eq_s, { 0xc800001d } |
| 937 | }, |
| 938 | /* lf.madd.s $rDSF,$rASF,$rBSF */ |
| 939 | { |
| 940 | { 0, 0, 0, 0 }, |
| 941 | { { MNEM, ' ', OP (RDSF), ',', OP (RASF), ',', OP (RBSF), 0 } }, |
| 942 | & ifmt_lf_add_s, { 0xc8000007 } |
| 943 | }, |
| 944 | /* lf.madd.d $rDDF,$rADF,$rBDF */ |
| 945 | { |
| 946 | { 0, 0, 0, 0 }, |
| 947 | { { MNEM, ' ', OP (RDDF), ',', OP (RADF), ',', OP (RBDF), 0 } }, |
| 948 | & ifmt_lf_add_d, { 0xc8000017 } |
| 949 | }, |
| 950 | /* lf.cust1.s $rASF,$rBSF */ |
| 951 | { |
| 952 | { 0, 0, 0, 0 }, |
| 953 | { { MNEM, ' ', OP (RASF), ',', OP (RBSF), 0 } }, |
| 954 | & ifmt_lf_cust1_s, { 0xc80000d0 } |
| 955 | }, |
| 956 | /* lf.cust1.d */ |
| 957 | { |
| 958 | { 0, 0, 0, 0 }, |
| 959 | { { MNEM, 0 } }, |
| 960 | & ifmt_lf_cust1_d, { 0xc80000e0 } |
| 961 | }, |
| 962 | }; |
| 963 | |
| 964 | #undef A |
| 965 | #undef OPERAND |
| 966 | #undef MNEM |
| 967 | #undef OP |
| 968 | |
| 969 | /* Formats for ALIAS macro-insns. */ |
| 970 | |
| 971 | #define F(f) & or1k_cgen_ifld_table[OR1K_##f] |
| 972 | #undef F |
| 973 | |
| 974 | /* Each non-simple macro entry points to an array of expansion possibilities. */ |
| 975 | |
| 976 | #define A(a) (1 << CGEN_INSN_##a) |
| 977 | #define OPERAND(op) OR1K_OPERAND_##op |
| 978 | #define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */ |
| 979 | #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field)) |
| 980 | |
| 981 | /* The macro instruction table. */ |
| 982 | |
| 983 | static const CGEN_IBASE or1k_cgen_macro_insn_table[] = |
| 984 | { |
| 985 | }; |
| 986 | |
| 987 | /* The macro instruction opcode table. */ |
| 988 | |
| 989 | static const CGEN_OPCODE or1k_cgen_macro_insn_opcode_table[] = |
| 990 | { |
| 991 | }; |
| 992 | |
| 993 | #undef A |
| 994 | #undef OPERAND |
| 995 | #undef MNEM |
| 996 | #undef OP |
| 997 | |
| 998 | #ifndef CGEN_ASM_HASH_P |
| 999 | #define CGEN_ASM_HASH_P(insn) 1 |
| 1000 | #endif |
| 1001 | |
| 1002 | #ifndef CGEN_DIS_HASH_P |
| 1003 | #define CGEN_DIS_HASH_P(insn) 1 |
| 1004 | #endif |
| 1005 | |
| 1006 | /* Return non-zero if INSN is to be added to the hash table. |
| 1007 | Targets are free to override CGEN_{ASM,DIS}_HASH_P in the .opc file. */ |
| 1008 | |
| 1009 | static int |
| 1010 | asm_hash_insn_p (const CGEN_INSN *insn ATTRIBUTE_UNUSED) |
| 1011 | { |
| 1012 | return CGEN_ASM_HASH_P (insn); |
| 1013 | } |
| 1014 | |
| 1015 | static int |
| 1016 | dis_hash_insn_p (const CGEN_INSN *insn) |
| 1017 | { |
| 1018 | /* If building the hash table and the NO-DIS attribute is present, |
| 1019 | ignore. */ |
| 1020 | if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_NO_DIS)) |
| 1021 | return 0; |
| 1022 | return CGEN_DIS_HASH_P (insn); |
| 1023 | } |
| 1024 | |
| 1025 | #ifndef CGEN_ASM_HASH |
| 1026 | #define CGEN_ASM_HASH_SIZE 127 |
| 1027 | #ifdef CGEN_MNEMONIC_OPERANDS |
| 1028 | #define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE) |
| 1029 | #else |
| 1030 | #define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE) /*FIXME*/ |
| 1031 | #endif |
| 1032 | #endif |
| 1033 | |
| 1034 | /* It doesn't make much sense to provide a default here, |
| 1035 | but while this is under development we do. |
| 1036 | BUFFER is a pointer to the bytes of the insn, target order. |
| 1037 | VALUE is the first base_insn_bitsize bits as an int in host order. */ |
| 1038 | |
| 1039 | #ifndef CGEN_DIS_HASH |
| 1040 | #define CGEN_DIS_HASH_SIZE 256 |
| 1041 | #define CGEN_DIS_HASH(buf, value) (*(unsigned char *) (buf)) |
| 1042 | #endif |
| 1043 | |
| 1044 | /* The result is the hash value of the insn. |
| 1045 | Targets are free to override CGEN_{ASM,DIS}_HASH in the .opc file. */ |
| 1046 | |
| 1047 | static unsigned int |
| 1048 | asm_hash_insn (const char *mnem) |
| 1049 | { |
| 1050 | return CGEN_ASM_HASH (mnem); |
| 1051 | } |
| 1052 | |
| 1053 | /* BUF is a pointer to the bytes of the insn, target order. |
| 1054 | VALUE is the first base_insn_bitsize bits as an int in host order. */ |
| 1055 | |
| 1056 | static unsigned int |
| 1057 | dis_hash_insn (const char *buf ATTRIBUTE_UNUSED, |
| 1058 | CGEN_INSN_INT value ATTRIBUTE_UNUSED) |
| 1059 | { |
| 1060 | return CGEN_DIS_HASH (buf, value); |
| 1061 | } |
| 1062 | |
| 1063 | /* Set the recorded length of the insn in the CGEN_FIELDS struct. */ |
| 1064 | |
| 1065 | static void |
| 1066 | set_fields_bitsize (CGEN_FIELDS *fields, int size) |
| 1067 | { |
| 1068 | CGEN_FIELDS_BITSIZE (fields) = size; |
| 1069 | } |
| 1070 | |
| 1071 | /* Function to call before using the operand instance table. |
| 1072 | This plugs the opcode entries and macro instructions into the cpu table. */ |
| 1073 | |
| 1074 | void |
| 1075 | or1k_cgen_init_opcode_table (CGEN_CPU_DESC cd) |
| 1076 | { |
| 1077 | int i; |
| 1078 | int num_macros = (sizeof (or1k_cgen_macro_insn_table) / |
| 1079 | sizeof (or1k_cgen_macro_insn_table[0])); |
| 1080 | const CGEN_IBASE *ib = & or1k_cgen_macro_insn_table[0]; |
| 1081 | const CGEN_OPCODE *oc = & or1k_cgen_macro_insn_opcode_table[0]; |
| 1082 | CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN)); |
| 1083 | |
| 1084 | /* This test has been added to avoid a warning generated |
| 1085 | if memset is called with a third argument of value zero. */ |
| 1086 | if (num_macros >= 1) |
| 1087 | memset (insns, 0, num_macros * sizeof (CGEN_INSN)); |
| 1088 | for (i = 0; i < num_macros; ++i) |
| 1089 | { |
| 1090 | insns[i].base = &ib[i]; |
| 1091 | insns[i].opcode = &oc[i]; |
| 1092 | or1k_cgen_build_insn_regex (& insns[i]); |
| 1093 | } |
| 1094 | cd->macro_insn_table.init_entries = insns; |
| 1095 | cd->macro_insn_table.entry_size = sizeof (CGEN_IBASE); |
| 1096 | cd->macro_insn_table.num_init_entries = num_macros; |
| 1097 | |
| 1098 | oc = & or1k_cgen_insn_opcode_table[0]; |
| 1099 | insns = (CGEN_INSN *) cd->insn_table.init_entries; |
| 1100 | for (i = 0; i < MAX_INSNS; ++i) |
| 1101 | { |
| 1102 | insns[i].opcode = &oc[i]; |
| 1103 | or1k_cgen_build_insn_regex (& insns[i]); |
| 1104 | } |
| 1105 | |
| 1106 | cd->sizeof_fields = sizeof (CGEN_FIELDS); |
| 1107 | cd->set_fields_bitsize = set_fields_bitsize; |
| 1108 | |
| 1109 | cd->asm_hash_p = asm_hash_insn_p; |
| 1110 | cd->asm_hash = asm_hash_insn; |
| 1111 | cd->asm_hash_size = CGEN_ASM_HASH_SIZE; |
| 1112 | |
| 1113 | cd->dis_hash_p = dis_hash_insn_p; |
| 1114 | cd->dis_hash = dis_hash_insn; |
| 1115 | cd->dis_hash_size = CGEN_DIS_HASH_SIZE; |
| 1116 | } |