Back to index

cell-binutils  2.17cvs20070401
fr30-opc.c
Go to the documentation of this file.
00001 /* Instruction opcode table for fr30.
00002 
00003 THIS FILE IS MACHINE GENERATED WITH CGEN.
00004 
00005 Copyright 1996-2005 Free Software Foundation, Inc.
00006 
00007 This file is part of the GNU Binutils and/or GDB, the GNU debugger.
00008 
00009 This program is free software; you can redistribute it and/or modify
00010 it under the terms of the GNU General Public License as published by
00011 the Free Software Foundation; either version 2, or (at your option)
00012 any later version.
00013 
00014 This program is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 GNU General Public License for more details.
00018 
00019 You should have received a copy of the GNU General Public License along
00020 with this program; if not, write to the Free Software Foundation, Inc.,
00021 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
00022 
00023 */
00024 
00025 #include "sysdep.h"
00026 #include "ansidecl.h"
00027 #include "bfd.h"
00028 #include "symcat.h"
00029 #include "fr30-desc.h"
00030 #include "fr30-opc.h"
00031 #include "libiberty.h"
00032 
00033 /* The hash functions are recorded here to help keep assembler code out of
00034    the disassembler and vice versa.  */
00035 
00036 static int asm_hash_insn_p        (const CGEN_INSN *);
00037 static unsigned int asm_hash_insn (const char *);
00038 static int dis_hash_insn_p        (const CGEN_INSN *);
00039 static unsigned int dis_hash_insn (const char *, CGEN_INSN_INT);
00040 
00041 /* Instruction formats.  */
00042 
00043 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
00044 #define F(f) & fr30_cgen_ifld_table[FR30_##f]
00045 #else
00046 #define F(f) & fr30_cgen_ifld_table[FR30_f]
00047 #endif
00048 static const CGEN_IFMT ifmt_empty ATTRIBUTE_UNUSED = {
00049   0, 0, 0x0, { { 0 } }
00050 };
00051 
00052 static const CGEN_IFMT ifmt_add ATTRIBUTE_UNUSED = {
00053   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_RJ) }, { F (F_RI) }, { 0 } }
00054 };
00055 
00056 static const CGEN_IFMT ifmt_addi ATTRIBUTE_UNUSED = {
00057   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_U4) }, { F (F_RI) }, { 0 } }
00058 };
00059 
00060 static const CGEN_IFMT ifmt_add2 ATTRIBUTE_UNUSED = {
00061   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_M4) }, { F (F_RI) }, { 0 } }
00062 };
00063 
00064 static const CGEN_IFMT ifmt_div0s ATTRIBUTE_UNUSED = {
00065   16, 16, 0xfff0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_OP3) }, { F (F_RI) }, { 0 } }
00066 };
00067 
00068 static const CGEN_IFMT ifmt_div3 ATTRIBUTE_UNUSED = {
00069   16, 16, 0xffff, { { F (F_OP1) }, { F (F_OP2) }, { F (F_OP3) }, { F (F_OP4) }, { 0 } }
00070 };
00071 
00072 static const CGEN_IFMT ifmt_ldi8 ATTRIBUTE_UNUSED = {
00073   16, 16, 0xf000, { { F (F_OP1) }, { F (F_I8) }, { F (F_RI) }, { 0 } }
00074 };
00075 
00076 static const CGEN_IFMT ifmt_ldi20 ATTRIBUTE_UNUSED = {
00077   16, 32, 0xff00, { { F (F_OP1) }, { F (F_I20) }, { F (F_OP2) }, { F (F_RI) }, { 0 } }
00078 };
00079 
00080 static const CGEN_IFMT ifmt_ldi32 ATTRIBUTE_UNUSED = {
00081   16, 48, 0xfff0, { { F (F_OP1) }, { F (F_I32) }, { F (F_OP2) }, { F (F_OP3) }, { F (F_RI) }, { 0 } }
00082 };
00083 
00084 static const CGEN_IFMT ifmt_ldr14 ATTRIBUTE_UNUSED = {
00085   16, 16, 0xf000, { { F (F_OP1) }, { F (F_DISP10) }, { F (F_RI) }, { 0 } }
00086 };
00087 
00088 static const CGEN_IFMT ifmt_ldr14uh ATTRIBUTE_UNUSED = {
00089   16, 16, 0xf000, { { F (F_OP1) }, { F (F_DISP9) }, { F (F_RI) }, { 0 } }
00090 };
00091 
00092 static const CGEN_IFMT ifmt_ldr14ub ATTRIBUTE_UNUSED = {
00093   16, 16, 0xf000, { { F (F_OP1) }, { F (F_DISP8) }, { F (F_RI) }, { 0 } }
00094 };
00095 
00096 static const CGEN_IFMT ifmt_ldr15 ATTRIBUTE_UNUSED = {
00097   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_UDISP6) }, { F (F_RI) }, { 0 } }
00098 };
00099 
00100 static const CGEN_IFMT ifmt_ldr15dr ATTRIBUTE_UNUSED = {
00101   16, 16, 0xfff0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_OP3) }, { F (F_RS2) }, { 0 } }
00102 };
00103 
00104 static const CGEN_IFMT ifmt_movdr ATTRIBUTE_UNUSED = {
00105   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_RS1) }, { F (F_RI) }, { 0 } }
00106 };
00107 
00108 static const CGEN_IFMT ifmt_call ATTRIBUTE_UNUSED = {
00109   16, 16, 0xf800, { { F (F_OP1) }, { F (F_OP5) }, { F (F_REL12) }, { 0 } }
00110 };
00111 
00112 static const CGEN_IFMT ifmt_int ATTRIBUTE_UNUSED = {
00113   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_U8) }, { 0 } }
00114 };
00115 
00116 static const CGEN_IFMT ifmt_brad ATTRIBUTE_UNUSED = {
00117   16, 16, 0xff00, { { F (F_OP1) }, { F (F_CC) }, { F (F_REL9) }, { 0 } }
00118 };
00119 
00120 static const CGEN_IFMT ifmt_dmovr13 ATTRIBUTE_UNUSED = {
00121   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_DIR10) }, { 0 } }
00122 };
00123 
00124 static const CGEN_IFMT ifmt_dmovr13h ATTRIBUTE_UNUSED = {
00125   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_DIR9) }, { 0 } }
00126 };
00127 
00128 static const CGEN_IFMT ifmt_dmovr13b ATTRIBUTE_UNUSED = {
00129   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_DIR8) }, { 0 } }
00130 };
00131 
00132 static const CGEN_IFMT ifmt_copop ATTRIBUTE_UNUSED = {
00133   16, 32, 0xfff0, { { F (F_OP1) }, { F (F_CCC) }, { F (F_OP2) }, { F (F_OP3) }, { F (F_CRJ) }, { F (F_U4C) }, { F (F_CRI) }, { 0 } }
00134 };
00135 
00136 static const CGEN_IFMT ifmt_copld ATTRIBUTE_UNUSED = {
00137   16, 32, 0xfff0, { { F (F_OP1) }, { F (F_CCC) }, { F (F_OP2) }, { F (F_OP3) }, { F (F_RJC) }, { F (F_U4C) }, { F (F_CRI) }, { 0 } }
00138 };
00139 
00140 static const CGEN_IFMT ifmt_copst ATTRIBUTE_UNUSED = {
00141   16, 32, 0xfff0, { { F (F_OP1) }, { F (F_CCC) }, { F (F_OP2) }, { F (F_OP3) }, { F (F_CRJ) }, { F (F_U4C) }, { F (F_RIC) }, { 0 } }
00142 };
00143 
00144 static const CGEN_IFMT ifmt_addsp ATTRIBUTE_UNUSED = {
00145   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_S10) }, { 0 } }
00146 };
00147 
00148 static const CGEN_IFMT ifmt_ldm0 ATTRIBUTE_UNUSED = {
00149   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_REGLIST_LOW_LD) }, { 0 } }
00150 };
00151 
00152 static const CGEN_IFMT ifmt_ldm1 ATTRIBUTE_UNUSED = {
00153   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_REGLIST_HI_LD) }, { 0 } }
00154 };
00155 
00156 static const CGEN_IFMT ifmt_stm0 ATTRIBUTE_UNUSED = {
00157   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_REGLIST_LOW_ST) }, { 0 } }
00158 };
00159 
00160 static const CGEN_IFMT ifmt_stm1 ATTRIBUTE_UNUSED = {
00161   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_REGLIST_HI_ST) }, { 0 } }
00162 };
00163 
00164 static const CGEN_IFMT ifmt_enter ATTRIBUTE_UNUSED = {
00165   16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_U10) }, { 0 } }
00166 };
00167 
00168 #undef F
00169 
00170 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
00171 #define A(a) (1 << CGEN_INSN_##a)
00172 #else
00173 #define A(a) (1 << CGEN_INSN_a)
00174 #endif
00175 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
00176 #define OPERAND(op) FR30_OPERAND_##op
00177 #else
00178 #define OPERAND(op) FR30_OPERAND_op
00179 #endif
00180 #define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
00181 #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
00182 
00183 /* The instruction table.  */
00184 
00185 static const CGEN_OPCODE fr30_cgen_insn_opcode_table[MAX_INSNS] =
00186 {
00187   /* Special null first entry.
00188      A `num' value of zero is thus invalid.
00189      Also, the special `invalid' insn resides here.  */
00190   { { 0, 0, 0, 0 }, {{0}}, 0, {0}},
00191 /* add $Rj,$Ri */
00192   {
00193     { 0, 0, 0, 0 },
00194     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00195     & ifmt_add, { 0xa600 }
00196   },
00197 /* add $u4,$Ri */
00198   {
00199     { 0, 0, 0, 0 },
00200     { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
00201     & ifmt_addi, { 0xa400 }
00202   },
00203 /* add2 $m4,$Ri */
00204   {
00205     { 0, 0, 0, 0 },
00206     { { MNEM, ' ', OP (M4), ',', OP (RI), 0 } },
00207     & ifmt_add2, { 0xa500 }
00208   },
00209 /* addc $Rj,$Ri */
00210   {
00211     { 0, 0, 0, 0 },
00212     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00213     & ifmt_add, { 0xa700 }
00214   },
00215 /* addn $Rj,$Ri */
00216   {
00217     { 0, 0, 0, 0 },
00218     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00219     & ifmt_add, { 0xa200 }
00220   },
00221 /* addn $u4,$Ri */
00222   {
00223     { 0, 0, 0, 0 },
00224     { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
00225     & ifmt_addi, { 0xa000 }
00226   },
00227 /* addn2 $m4,$Ri */
00228   {
00229     { 0, 0, 0, 0 },
00230     { { MNEM, ' ', OP (M4), ',', OP (RI), 0 } },
00231     & ifmt_add2, { 0xa100 }
00232   },
00233 /* sub $Rj,$Ri */
00234   {
00235     { 0, 0, 0, 0 },
00236     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00237     & ifmt_add, { 0xac00 }
00238   },
00239 /* subc $Rj,$Ri */
00240   {
00241     { 0, 0, 0, 0 },
00242     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00243     & ifmt_add, { 0xad00 }
00244   },
00245 /* subn $Rj,$Ri */
00246   {
00247     { 0, 0, 0, 0 },
00248     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00249     & ifmt_add, { 0xae00 }
00250   },
00251 /* cmp $Rj,$Ri */
00252   {
00253     { 0, 0, 0, 0 },
00254     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00255     & ifmt_add, { 0xaa00 }
00256   },
00257 /* cmp $u4,$Ri */
00258   {
00259     { 0, 0, 0, 0 },
00260     { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
00261     & ifmt_addi, { 0xa800 }
00262   },
00263 /* cmp2 $m4,$Ri */
00264   {
00265     { 0, 0, 0, 0 },
00266     { { MNEM, ' ', OP (M4), ',', OP (RI), 0 } },
00267     & ifmt_add2, { 0xa900 }
00268   },
00269 /* and $Rj,$Ri */
00270   {
00271     { 0, 0, 0, 0 },
00272     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00273     & ifmt_add, { 0x8200 }
00274   },
00275 /* or $Rj,$Ri */
00276   {
00277     { 0, 0, 0, 0 },
00278     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00279     & ifmt_add, { 0x9200 }
00280   },
00281 /* eor $Rj,$Ri */
00282   {
00283     { 0, 0, 0, 0 },
00284     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00285     & ifmt_add, { 0x9a00 }
00286   },
00287 /* and $Rj,@$Ri */
00288   {
00289     { 0, 0, 0, 0 },
00290     { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
00291     & ifmt_add, { 0x8400 }
00292   },
00293 /* andh $Rj,@$Ri */
00294   {
00295     { 0, 0, 0, 0 },
00296     { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
00297     & ifmt_add, { 0x8500 }
00298   },
00299 /* andb $Rj,@$Ri */
00300   {
00301     { 0, 0, 0, 0 },
00302     { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
00303     & ifmt_add, { 0x8600 }
00304   },
00305 /* or $Rj,@$Ri */
00306   {
00307     { 0, 0, 0, 0 },
00308     { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
00309     & ifmt_add, { 0x9400 }
00310   },
00311 /* orh $Rj,@$Ri */
00312   {
00313     { 0, 0, 0, 0 },
00314     { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
00315     & ifmt_add, { 0x9500 }
00316   },
00317 /* orb $Rj,@$Ri */
00318   {
00319     { 0, 0, 0, 0 },
00320     { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
00321     & ifmt_add, { 0x9600 }
00322   },
00323 /* eor $Rj,@$Ri */
00324   {
00325     { 0, 0, 0, 0 },
00326     { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
00327     & ifmt_add, { 0x9c00 }
00328   },
00329 /* eorh $Rj,@$Ri */
00330   {
00331     { 0, 0, 0, 0 },
00332     { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
00333     & ifmt_add, { 0x9d00 }
00334   },
00335 /* eorb $Rj,@$Ri */
00336   {
00337     { 0, 0, 0, 0 },
00338     { { MNEM, ' ', OP (RJ), ',', '@', OP (RI), 0 } },
00339     & ifmt_add, { 0x9e00 }
00340   },
00341 /* bandl $u4,@$Ri */
00342   {
00343     { 0, 0, 0, 0 },
00344     { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
00345     & ifmt_addi, { 0x8000 }
00346   },
00347 /* borl $u4,@$Ri */
00348   {
00349     { 0, 0, 0, 0 },
00350     { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
00351     & ifmt_addi, { 0x9000 }
00352   },
00353 /* beorl $u4,@$Ri */
00354   {
00355     { 0, 0, 0, 0 },
00356     { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
00357     & ifmt_addi, { 0x9800 }
00358   },
00359 /* bandh $u4,@$Ri */
00360   {
00361     { 0, 0, 0, 0 },
00362     { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
00363     & ifmt_addi, { 0x8100 }
00364   },
00365 /* borh $u4,@$Ri */
00366   {
00367     { 0, 0, 0, 0 },
00368     { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
00369     & ifmt_addi, { 0x9100 }
00370   },
00371 /* beorh $u4,@$Ri */
00372   {
00373     { 0, 0, 0, 0 },
00374     { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
00375     & ifmt_addi, { 0x9900 }
00376   },
00377 /* btstl $u4,@$Ri */
00378   {
00379     { 0, 0, 0, 0 },
00380     { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
00381     & ifmt_addi, { 0x8800 }
00382   },
00383 /* btsth $u4,@$Ri */
00384   {
00385     { 0, 0, 0, 0 },
00386     { { MNEM, ' ', OP (U4), ',', '@', OP (RI), 0 } },
00387     & ifmt_addi, { 0x8900 }
00388   },
00389 /* mul $Rj,$Ri */
00390   {
00391     { 0, 0, 0, 0 },
00392     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00393     & ifmt_add, { 0xaf00 }
00394   },
00395 /* mulu $Rj,$Ri */
00396   {
00397     { 0, 0, 0, 0 },
00398     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00399     & ifmt_add, { 0xab00 }
00400   },
00401 /* mulh $Rj,$Ri */
00402   {
00403     { 0, 0, 0, 0 },
00404     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00405     & ifmt_add, { 0xbf00 }
00406   },
00407 /* muluh $Rj,$Ri */
00408   {
00409     { 0, 0, 0, 0 },
00410     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00411     & ifmt_add, { 0xbb00 }
00412   },
00413 /* div0s $Ri */
00414   {
00415     { 0, 0, 0, 0 },
00416     { { MNEM, ' ', OP (RI), 0 } },
00417     & ifmt_div0s, { 0x9740 }
00418   },
00419 /* div0u $Ri */
00420   {
00421     { 0, 0, 0, 0 },
00422     { { MNEM, ' ', OP (RI), 0 } },
00423     & ifmt_div0s, { 0x9750 }
00424   },
00425 /* div1 $Ri */
00426   {
00427     { 0, 0, 0, 0 },
00428     { { MNEM, ' ', OP (RI), 0 } },
00429     & ifmt_div0s, { 0x9760 }
00430   },
00431 /* div2 $Ri */
00432   {
00433     { 0, 0, 0, 0 },
00434     { { MNEM, ' ', OP (RI), 0 } },
00435     & ifmt_div0s, { 0x9770 }
00436   },
00437 /* div3 */
00438   {
00439     { 0, 0, 0, 0 },
00440     { { MNEM, 0 } },
00441     & ifmt_div3, { 0x9f60 }
00442   },
00443 /* div4s */
00444   {
00445     { 0, 0, 0, 0 },
00446     { { MNEM, 0 } },
00447     & ifmt_div3, { 0x9f70 }
00448   },
00449 /* lsl $Rj,$Ri */
00450   {
00451     { 0, 0, 0, 0 },
00452     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00453     & ifmt_add, { 0xb600 }
00454   },
00455 /* lsl $u4,$Ri */
00456   {
00457     { 0, 0, 0, 0 },
00458     { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
00459     & ifmt_addi, { 0xb400 }
00460   },
00461 /* lsl2 $u4,$Ri */
00462   {
00463     { 0, 0, 0, 0 },
00464     { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
00465     & ifmt_addi, { 0xb500 }
00466   },
00467 /* lsr $Rj,$Ri */
00468   {
00469     { 0, 0, 0, 0 },
00470     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00471     & ifmt_add, { 0xb200 }
00472   },
00473 /* lsr $u4,$Ri */
00474   {
00475     { 0, 0, 0, 0 },
00476     { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
00477     & ifmt_addi, { 0xb000 }
00478   },
00479 /* lsr2 $u4,$Ri */
00480   {
00481     { 0, 0, 0, 0 },
00482     { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
00483     & ifmt_addi, { 0xb100 }
00484   },
00485 /* asr $Rj,$Ri */
00486   {
00487     { 0, 0, 0, 0 },
00488     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00489     & ifmt_add, { 0xba00 }
00490   },
00491 /* asr $u4,$Ri */
00492   {
00493     { 0, 0, 0, 0 },
00494     { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
00495     & ifmt_addi, { 0xb800 }
00496   },
00497 /* asr2 $u4,$Ri */
00498   {
00499     { 0, 0, 0, 0 },
00500     { { MNEM, ' ', OP (U4), ',', OP (RI), 0 } },
00501     & ifmt_addi, { 0xb900 }
00502   },
00503 /* ldi:8 $i8,$Ri */
00504   {
00505     { 0, 0, 0, 0 },
00506     { { MNEM, ' ', OP (I8), ',', OP (RI), 0 } },
00507     & ifmt_ldi8, { 0xc000 }
00508   },
00509 /* ldi:20 $i20,$Ri */
00510   {
00511     { 0, 0, 0, 0 },
00512     { { MNEM, ' ', OP (I20), ',', OP (RI), 0 } },
00513     & ifmt_ldi20, { 0x9b00 }
00514   },
00515 /* ldi:32 $i32,$Ri */
00516   {
00517     { 0, 0, 0, 0 },
00518     { { MNEM, ' ', OP (I32), ',', OP (RI), 0 } },
00519     & ifmt_ldi32, { 0x9f80 }
00520   },
00521 /* ld @$Rj,$Ri */
00522   {
00523     { 0, 0, 0, 0 },
00524     { { MNEM, ' ', '@', OP (RJ), ',', OP (RI), 0 } },
00525     & ifmt_add, { 0x400 }
00526   },
00527 /* lduh @$Rj,$Ri */
00528   {
00529     { 0, 0, 0, 0 },
00530     { { MNEM, ' ', '@', OP (RJ), ',', OP (RI), 0 } },
00531     & ifmt_add, { 0x500 }
00532   },
00533 /* ldub @$Rj,$Ri */
00534   {
00535     { 0, 0, 0, 0 },
00536     { { MNEM, ' ', '@', OP (RJ), ',', OP (RI), 0 } },
00537     & ifmt_add, { 0x600 }
00538   },
00539 /* ld @($R13,$Rj),$Ri */
00540   {
00541     { 0, 0, 0, 0 },
00542     { { MNEM, ' ', '@', '(', OP (R13), ',', OP (RJ), ')', ',', OP (RI), 0 } },
00543     & ifmt_add, { 0x0 }
00544   },
00545 /* lduh @($R13,$Rj),$Ri */
00546   {
00547     { 0, 0, 0, 0 },
00548     { { MNEM, ' ', '@', '(', OP (R13), ',', OP (RJ), ')', ',', OP (RI), 0 } },
00549     & ifmt_add, { 0x100 }
00550   },
00551 /* ldub @($R13,$Rj),$Ri */
00552   {
00553     { 0, 0, 0, 0 },
00554     { { MNEM, ' ', '@', '(', OP (R13), ',', OP (RJ), ')', ',', OP (RI), 0 } },
00555     & ifmt_add, { 0x200 }
00556   },
00557 /* ld @($R14,$disp10),$Ri */
00558   {
00559     { 0, 0, 0, 0 },
00560     { { MNEM, ' ', '@', '(', OP (R14), ',', OP (DISP10), ')', ',', OP (RI), 0 } },
00561     & ifmt_ldr14, { 0x2000 }
00562   },
00563 /* lduh @($R14,$disp9),$Ri */
00564   {
00565     { 0, 0, 0, 0 },
00566     { { MNEM, ' ', '@', '(', OP (R14), ',', OP (DISP9), ')', ',', OP (RI), 0 } },
00567     & ifmt_ldr14uh, { 0x4000 }
00568   },
00569 /* ldub @($R14,$disp8),$Ri */
00570   {
00571     { 0, 0, 0, 0 },
00572     { { MNEM, ' ', '@', '(', OP (R14), ',', OP (DISP8), ')', ',', OP (RI), 0 } },
00573     & ifmt_ldr14ub, { 0x6000 }
00574   },
00575 /* ld @($R15,$udisp6),$Ri */
00576   {
00577     { 0, 0, 0, 0 },
00578     { { MNEM, ' ', '@', '(', OP (R15), ',', OP (UDISP6), ')', ',', OP (RI), 0 } },
00579     & ifmt_ldr15, { 0x300 }
00580   },
00581 /* ld @$R15+,$Ri */
00582   {
00583     { 0, 0, 0, 0 },
00584     { { MNEM, ' ', '@', OP (R15), '+', ',', OP (RI), 0 } },
00585     & ifmt_div0s, { 0x700 }
00586   },
00587 /* ld @$R15+,$Rs2 */
00588   {
00589     { 0, 0, 0, 0 },
00590     { { MNEM, ' ', '@', OP (R15), '+', ',', OP (RS2), 0 } },
00591     & ifmt_ldr15dr, { 0x780 }
00592   },
00593 /* ld @$R15+,$ps */
00594   {
00595     { 0, 0, 0, 0 },
00596     { { MNEM, ' ', '@', OP (R15), '+', ',', OP (PS), 0 } },
00597     & ifmt_div3, { 0x790 }
00598   },
00599 /* st $Ri,@$Rj */
00600   {
00601     { 0, 0, 0, 0 },
00602     { { MNEM, ' ', OP (RI), ',', '@', OP (RJ), 0 } },
00603     & ifmt_add, { 0x1400 }
00604   },
00605 /* sth $Ri,@$Rj */
00606   {
00607     { 0, 0, 0, 0 },
00608     { { MNEM, ' ', OP (RI), ',', '@', OP (RJ), 0 } },
00609     & ifmt_add, { 0x1500 }
00610   },
00611 /* stb $Ri,@$Rj */
00612   {
00613     { 0, 0, 0, 0 },
00614     { { MNEM, ' ', OP (RI), ',', '@', OP (RJ), 0 } },
00615     & ifmt_add, { 0x1600 }
00616   },
00617 /* st $Ri,@($R13,$Rj) */
00618   {
00619     { 0, 0, 0, 0 },
00620     { { MNEM, ' ', OP (RI), ',', '@', '(', OP (R13), ',', OP (RJ), ')', 0 } },
00621     & ifmt_add, { 0x1000 }
00622   },
00623 /* sth $Ri,@($R13,$Rj) */
00624   {
00625     { 0, 0, 0, 0 },
00626     { { MNEM, ' ', OP (RI), ',', '@', '(', OP (R13), ',', OP (RJ), ')', 0 } },
00627     & ifmt_add, { 0x1100 }
00628   },
00629 /* stb $Ri,@($R13,$Rj) */
00630   {
00631     { 0, 0, 0, 0 },
00632     { { MNEM, ' ', OP (RI), ',', '@', '(', OP (R13), ',', OP (RJ), ')', 0 } },
00633     & ifmt_add, { 0x1200 }
00634   },
00635 /* st $Ri,@($R14,$disp10) */
00636   {
00637     { 0, 0, 0, 0 },
00638     { { MNEM, ' ', OP (RI), ',', '@', '(', OP (R14), ',', OP (DISP10), ')', 0 } },
00639     & ifmt_ldr14, { 0x3000 }
00640   },
00641 /* sth $Ri,@($R14,$disp9) */
00642   {
00643     { 0, 0, 0, 0 },
00644     { { MNEM, ' ', OP (RI), ',', '@', '(', OP (R14), ',', OP (DISP9), ')', 0 } },
00645     & ifmt_ldr14uh, { 0x5000 }
00646   },
00647 /* stb $Ri,@($R14,$disp8) */
00648   {
00649     { 0, 0, 0, 0 },
00650     { { MNEM, ' ', OP (RI), ',', '@', '(', OP (R14), ',', OP (DISP8), ')', 0 } },
00651     & ifmt_ldr14ub, { 0x7000 }
00652   },
00653 /* st $Ri,@($R15,$udisp6) */
00654   {
00655     { 0, 0, 0, 0 },
00656     { { MNEM, ' ', OP (RI), ',', '@', '(', OP (R15), ',', OP (UDISP6), ')', 0 } },
00657     & ifmt_ldr15, { 0x1300 }
00658   },
00659 /* st $Ri,@-$R15 */
00660   {
00661     { 0, 0, 0, 0 },
00662     { { MNEM, ' ', OP (RI), ',', '@', '-', OP (R15), 0 } },
00663     & ifmt_div0s, { 0x1700 }
00664   },
00665 /* st $Rs2,@-$R15 */
00666   {
00667     { 0, 0, 0, 0 },
00668     { { MNEM, ' ', OP (RS2), ',', '@', '-', OP (R15), 0 } },
00669     & ifmt_ldr15dr, { 0x1780 }
00670   },
00671 /* st $ps,@-$R15 */
00672   {
00673     { 0, 0, 0, 0 },
00674     { { MNEM, ' ', OP (PS), ',', '@', '-', OP (R15), 0 } },
00675     & ifmt_div3, { 0x1790 }
00676   },
00677 /* mov $Rj,$Ri */
00678   {
00679     { 0, 0, 0, 0 },
00680     { { MNEM, ' ', OP (RJ), ',', OP (RI), 0 } },
00681     & ifmt_add, { 0x8b00 }
00682   },
00683 /* mov $Rs1,$Ri */
00684   {
00685     { 0, 0, 0, 0 },
00686     { { MNEM, ' ', OP (RS1), ',', OP (RI), 0 } },
00687     & ifmt_movdr, { 0xb700 }
00688   },
00689 /* mov $ps,$Ri */
00690   {
00691     { 0, 0, 0, 0 },
00692     { { MNEM, ' ', OP (PS), ',', OP (RI), 0 } },
00693     & ifmt_div0s, { 0x1710 }
00694   },
00695 /* mov $Ri,$Rs1 */
00696   {
00697     { 0, 0, 0, 0 },
00698     { { MNEM, ' ', OP (RI), ',', OP (RS1), 0 } },
00699     & ifmt_movdr, { 0xb300 }
00700   },
00701 /* mov $Ri,$ps */
00702   {
00703     { 0, 0, 0, 0 },
00704     { { MNEM, ' ', OP (RI), ',', OP (PS), 0 } },
00705     & ifmt_div0s, { 0x710 }
00706   },
00707 /* jmp @$Ri */
00708   {
00709     { 0, 0, 0, 0 },
00710     { { MNEM, ' ', '@', OP (RI), 0 } },
00711     & ifmt_div0s, { 0x9700 }
00712   },
00713 /* jmp:d @$Ri */
00714   {
00715     { 0, 0, 0, 0 },
00716     { { MNEM, ' ', '@', OP (RI), 0 } },
00717     & ifmt_div0s, { 0x9f00 }
00718   },
00719 /* call @$Ri */
00720   {
00721     { 0, 0, 0, 0 },
00722     { { MNEM, ' ', '@', OP (RI), 0 } },
00723     & ifmt_div0s, { 0x9710 }
00724   },
00725 /* call:d @$Ri */
00726   {
00727     { 0, 0, 0, 0 },
00728     { { MNEM, ' ', '@', OP (RI), 0 } },
00729     & ifmt_div0s, { 0x9f10 }
00730   },
00731 /* call $label12 */
00732   {
00733     { 0, 0, 0, 0 },
00734     { { MNEM, ' ', OP (LABEL12), 0 } },
00735     & ifmt_call, { 0xd000 }
00736   },
00737 /* call:d $label12 */
00738   {
00739     { 0, 0, 0, 0 },
00740     { { MNEM, ' ', OP (LABEL12), 0 } },
00741     & ifmt_call, { 0xd800 }
00742   },
00743 /* ret */
00744   {
00745     { 0, 0, 0, 0 },
00746     { { MNEM, 0 } },
00747     & ifmt_div3, { 0x9720 }
00748   },
00749 /* ret:d */
00750   {
00751     { 0, 0, 0, 0 },
00752     { { MNEM, 0 } },
00753     & ifmt_div3, { 0x9f20 }
00754   },
00755 /* int $u8 */
00756   {
00757     { 0, 0, 0, 0 },
00758     { { MNEM, ' ', OP (U8), 0 } },
00759     & ifmt_int, { 0x1f00 }
00760   },
00761 /* inte */
00762   {
00763     { 0, 0, 0, 0 },
00764     { { MNEM, 0 } },
00765     & ifmt_div3, { 0x9f30 }
00766   },
00767 /* reti */
00768   {
00769     { 0, 0, 0, 0 },
00770     { { MNEM, 0 } },
00771     & ifmt_div3, { 0x9730 }
00772   },
00773 /* bra:d $label9 */
00774   {
00775     { 0, 0, 0, 0 },
00776     { { MNEM, ' ', OP (LABEL9), 0 } },
00777     & ifmt_brad, { 0xf000 }
00778   },
00779 /* bra $label9 */
00780   {
00781     { 0, 0, 0, 0 },
00782     { { MNEM, ' ', OP (LABEL9), 0 } },
00783     & ifmt_brad, { 0xe000 }
00784   },
00785 /* bno:d $label9 */
00786   {
00787     { 0, 0, 0, 0 },
00788     { { MNEM, ' ', OP (LABEL9), 0 } },
00789     & ifmt_brad, { 0xf100 }
00790   },
00791 /* bno $label9 */
00792   {
00793     { 0, 0, 0, 0 },
00794     { { MNEM, ' ', OP (LABEL9), 0 } },
00795     & ifmt_brad, { 0xe100 }
00796   },
00797 /* beq:d $label9 */
00798   {
00799     { 0, 0, 0, 0 },
00800     { { MNEM, ' ', OP (LABEL9), 0 } },
00801     & ifmt_brad, { 0xf200 }
00802   },
00803 /* beq $label9 */
00804   {
00805     { 0, 0, 0, 0 },
00806     { { MNEM, ' ', OP (LABEL9), 0 } },
00807     & ifmt_brad, { 0xe200 }
00808   },
00809 /* bne:d $label9 */
00810   {
00811     { 0, 0, 0, 0 },
00812     { { MNEM, ' ', OP (LABEL9), 0 } },
00813     & ifmt_brad, { 0xf300 }
00814   },
00815 /* bne $label9 */
00816   {
00817     { 0, 0, 0, 0 },
00818     { { MNEM, ' ', OP (LABEL9), 0 } },
00819     & ifmt_brad, { 0xe300 }
00820   },
00821 /* bc:d $label9 */
00822   {
00823     { 0, 0, 0, 0 },
00824     { { MNEM, ' ', OP (LABEL9), 0 } },
00825     & ifmt_brad, { 0xf400 }
00826   },
00827 /* bc $label9 */
00828   {
00829     { 0, 0, 0, 0 },
00830     { { MNEM, ' ', OP (LABEL9), 0 } },
00831     & ifmt_brad, { 0xe400 }
00832   },
00833 /* bnc:d $label9 */
00834   {
00835     { 0, 0, 0, 0 },
00836     { { MNEM, ' ', OP (LABEL9), 0 } },
00837     & ifmt_brad, { 0xf500 }
00838   },
00839 /* bnc $label9 */
00840   {
00841     { 0, 0, 0, 0 },
00842     { { MNEM, ' ', OP (LABEL9), 0 } },
00843     & ifmt_brad, { 0xe500 }
00844   },
00845 /* bn:d $label9 */
00846   {
00847     { 0, 0, 0, 0 },
00848     { { MNEM, ' ', OP (LABEL9), 0 } },
00849     & ifmt_brad, { 0xf600 }
00850   },
00851 /* bn $label9 */
00852   {
00853     { 0, 0, 0, 0 },
00854     { { MNEM, ' ', OP (LABEL9), 0 } },
00855     & ifmt_brad, { 0xe600 }
00856   },
00857 /* bp:d $label9 */
00858   {
00859     { 0, 0, 0, 0 },
00860     { { MNEM, ' ', OP (LABEL9), 0 } },
00861     & ifmt_brad, { 0xf700 }
00862   },
00863 /* bp $label9 */
00864   {
00865     { 0, 0, 0, 0 },
00866     { { MNEM, ' ', OP (LABEL9), 0 } },
00867     & ifmt_brad, { 0xe700 }
00868   },
00869 /* bv:d $label9 */
00870   {
00871     { 0, 0, 0, 0 },
00872     { { MNEM, ' ', OP (LABEL9), 0 } },
00873     & ifmt_brad, { 0xf800 }
00874   },
00875 /* bv $label9 */
00876   {
00877     { 0, 0, 0, 0 },
00878     { { MNEM, ' ', OP (LABEL9), 0 } },
00879     & ifmt_brad, { 0xe800 }
00880   },
00881 /* bnv:d $label9 */
00882   {
00883     { 0, 0, 0, 0 },
00884     { { MNEM, ' ', OP (LABEL9), 0 } },
00885     & ifmt_brad, { 0xf900 }
00886   },
00887 /* bnv $label9 */
00888   {
00889     { 0, 0, 0, 0 },
00890     { { MNEM, ' ', OP (LABEL9), 0 } },
00891     & ifmt_brad, { 0xe900 }
00892   },
00893 /* blt:d $label9 */
00894   {
00895     { 0, 0, 0, 0 },
00896     { { MNEM, ' ', OP (LABEL9), 0 } },
00897     & ifmt_brad, { 0xfa00 }
00898   },
00899 /* blt $label9 */
00900   {
00901     { 0, 0, 0, 0 },
00902     { { MNEM, ' ', OP (LABEL9), 0 } },
00903     & ifmt_brad, { 0xea00 }
00904   },
00905 /* bge:d $label9 */
00906   {
00907     { 0, 0, 0, 0 },
00908     { { MNEM, ' ', OP (LABEL9), 0 } },
00909     & ifmt_brad, { 0xfb00 }
00910   },
00911 /* bge $label9 */
00912   {
00913     { 0, 0, 0, 0 },
00914     { { MNEM, ' ', OP (LABEL9), 0 } },
00915     & ifmt_brad, { 0xeb00 }
00916   },
00917 /* ble:d $label9 */
00918   {
00919     { 0, 0, 0, 0 },
00920     { { MNEM, ' ', OP (LABEL9), 0 } },
00921     & ifmt_brad, { 0xfc00 }
00922   },
00923 /* ble $label9 */
00924   {
00925     { 0, 0, 0, 0 },
00926     { { MNEM, ' ', OP (LABEL9), 0 } },
00927     & ifmt_brad, { 0xec00 }
00928   },
00929 /* bgt:d $label9 */
00930   {
00931     { 0, 0, 0, 0 },
00932     { { MNEM, ' ', OP (LABEL9), 0 } },
00933     & ifmt_brad, { 0xfd00 }
00934   },
00935 /* bgt $label9 */
00936   {
00937     { 0, 0, 0, 0 },
00938     { { MNEM, ' ', OP (LABEL9), 0 } },
00939     & ifmt_brad, { 0xed00 }
00940   },
00941 /* bls:d $label9 */
00942   {
00943     { 0, 0, 0, 0 },
00944     { { MNEM, ' ', OP (LABEL9), 0 } },
00945     & ifmt_brad, { 0xfe00 }
00946   },
00947 /* bls $label9 */
00948   {
00949     { 0, 0, 0, 0 },
00950     { { MNEM, ' ', OP (LABEL9), 0 } },
00951     & ifmt_brad, { 0xee00 }
00952   },
00953 /* bhi:d $label9 */
00954   {
00955     { 0, 0, 0, 0 },
00956     { { MNEM, ' ', OP (LABEL9), 0 } },
00957     & ifmt_brad, { 0xff00 }
00958   },
00959 /* bhi $label9 */
00960   {
00961     { 0, 0, 0, 0 },
00962     { { MNEM, ' ', OP (LABEL9), 0 } },
00963     & ifmt_brad, { 0xef00 }
00964   },
00965 /* dmov $R13,@$dir10 */
00966   {
00967     { 0, 0, 0, 0 },
00968     { { MNEM, ' ', OP (R13), ',', '@', OP (DIR10), 0 } },
00969     & ifmt_dmovr13, { 0x1800 }
00970   },
00971 /* dmovh $R13,@$dir9 */
00972   {
00973     { 0, 0, 0, 0 },
00974     { { MNEM, ' ', OP (R13), ',', '@', OP (DIR9), 0 } },
00975     & ifmt_dmovr13h, { 0x1900 }
00976   },
00977 /* dmovb $R13,@$dir8 */
00978   {
00979     { 0, 0, 0, 0 },
00980     { { MNEM, ' ', OP (R13), ',', '@', OP (DIR8), 0 } },
00981     & ifmt_dmovr13b, { 0x1a00 }
00982   },
00983 /* dmov @$R13+,@$dir10 */
00984   {
00985     { 0, 0, 0, 0 },
00986     { { MNEM, ' ', '@', OP (R13), '+', ',', '@', OP (DIR10), 0 } },
00987     & ifmt_dmovr13, { 0x1c00 }
00988   },
00989 /* dmovh @$R13+,@$dir9 */
00990   {
00991     { 0, 0, 0, 0 },
00992     { { MNEM, ' ', '@', OP (R13), '+', ',', '@', OP (DIR9), 0 } },
00993     & ifmt_dmovr13h, { 0x1d00 }
00994   },
00995 /* dmovb @$R13+,@$dir8 */
00996   {
00997     { 0, 0, 0, 0 },
00998     { { MNEM, ' ', '@', OP (R13), '+', ',', '@', OP (DIR8), 0 } },
00999     & ifmt_dmovr13b, { 0x1e00 }
01000   },
01001 /* dmov @$R15+,@$dir10 */
01002   {
01003     { 0, 0, 0, 0 },
01004     { { MNEM, ' ', '@', OP (R15), '+', ',', '@', OP (DIR10), 0 } },
01005     & ifmt_dmovr13, { 0x1b00 }
01006   },
01007 /* dmov @$dir10,$R13 */
01008   {
01009     { 0, 0, 0, 0 },
01010     { { MNEM, ' ', '@', OP (DIR10), ',', OP (R13), 0 } },
01011     & ifmt_dmovr13, { 0x800 }
01012   },
01013 /* dmovh @$dir9,$R13 */
01014   {
01015     { 0, 0, 0, 0 },
01016     { { MNEM, ' ', '@', OP (DIR9), ',', OP (R13), 0 } },
01017     & ifmt_dmovr13h, { 0x900 }
01018   },
01019 /* dmovb @$dir8,$R13 */
01020   {
01021     { 0, 0, 0, 0 },
01022     { { MNEM, ' ', '@', OP (DIR8), ',', OP (R13), 0 } },
01023     & ifmt_dmovr13b, { 0xa00 }
01024   },
01025 /* dmov @$dir10,@$R13+ */
01026   {
01027     { 0, 0, 0, 0 },
01028     { { MNEM, ' ', '@', OP (DIR10), ',', '@', OP (R13), '+', 0 } },
01029     & ifmt_dmovr13, { 0xc00 }
01030   },
01031 /* dmovh @$dir9,@$R13+ */
01032   {
01033     { 0, 0, 0, 0 },
01034     { { MNEM, ' ', '@', OP (DIR9), ',', '@', OP (R13), '+', 0 } },
01035     & ifmt_dmovr13h, { 0xd00 }
01036   },
01037 /* dmovb @$dir8,@$R13+ */
01038   {
01039     { 0, 0, 0, 0 },
01040     { { MNEM, ' ', '@', OP (DIR8), ',', '@', OP (R13), '+', 0 } },
01041     & ifmt_dmovr13b, { 0xe00 }
01042   },
01043 /* dmov @$dir10,@-$R15 */
01044   {
01045     { 0, 0, 0, 0 },
01046     { { MNEM, ' ', '@', OP (DIR10), ',', '@', '-', OP (R15), 0 } },
01047     & ifmt_dmovr13, { 0xb00 }
01048   },
01049 /* ldres @$Ri+,$u4 */
01050   {
01051     { 0, 0, 0, 0 },
01052     { { MNEM, ' ', '@', OP (RI), '+', ',', OP (U4), 0 } },
01053     & ifmt_addi, { 0xbc00 }
01054   },
01055 /* stres $u4,@$Ri+ */
01056   {
01057     { 0, 0, 0, 0 },
01058     { { MNEM, ' ', OP (U4), ',', '@', OP (RI), '+', 0 } },
01059     & ifmt_addi, { 0xbd00 }
01060   },
01061 /* copop $u4c,$ccc,$CRj,$CRi */
01062   {
01063     { 0, 0, 0, 0 },
01064     { { MNEM, ' ', OP (U4C), ',', OP (CCC), ',', OP (CRJ), ',', OP (CRI), 0 } },
01065     & ifmt_copop, { 0x9fc0 }
01066   },
01067 /* copld $u4c,$ccc,$Rjc,$CRi */
01068   {
01069     { 0, 0, 0, 0 },
01070     { { MNEM, ' ', OP (U4C), ',', OP (CCC), ',', OP (RJC), ',', OP (CRI), 0 } },
01071     & ifmt_copld, { 0x9fd0 }
01072   },
01073 /* copst $u4c,$ccc,$CRj,$Ric */
01074   {
01075     { 0, 0, 0, 0 },
01076     { { MNEM, ' ', OP (U4C), ',', OP (CCC), ',', OP (CRJ), ',', OP (RIC), 0 } },
01077     & ifmt_copst, { 0x9fe0 }
01078   },
01079 /* copsv $u4c,$ccc,$CRj,$Ric */
01080   {
01081     { 0, 0, 0, 0 },
01082     { { MNEM, ' ', OP (U4C), ',', OP (CCC), ',', OP (CRJ), ',', OP (RIC), 0 } },
01083     & ifmt_copst, { 0x9ff0 }
01084   },
01085 /* nop */
01086   {
01087     { 0, 0, 0, 0 },
01088     { { MNEM, 0 } },
01089     & ifmt_div3, { 0x9fa0 }
01090   },
01091 /* andccr $u8 */
01092   {
01093     { 0, 0, 0, 0 },
01094     { { MNEM, ' ', OP (U8), 0 } },
01095     & ifmt_int, { 0x8300 }
01096   },
01097 /* orccr $u8 */
01098   {
01099     { 0, 0, 0, 0 },
01100     { { MNEM, ' ', OP (U8), 0 } },
01101     & ifmt_int, { 0x9300 }
01102   },
01103 /* stilm $u8 */
01104   {
01105     { 0, 0, 0, 0 },
01106     { { MNEM, ' ', OP (U8), 0 } },
01107     & ifmt_int, { 0x8700 }
01108   },
01109 /* addsp $s10 */
01110   {
01111     { 0, 0, 0, 0 },
01112     { { MNEM, ' ', OP (S10), 0 } },
01113     & ifmt_addsp, { 0xa300 }
01114   },
01115 /* extsb $Ri */
01116   {
01117     { 0, 0, 0, 0 },
01118     { { MNEM, ' ', OP (RI), 0 } },
01119     & ifmt_div0s, { 0x9780 }
01120   },
01121 /* extub $Ri */
01122   {
01123     { 0, 0, 0, 0 },
01124     { { MNEM, ' ', OP (RI), 0 } },
01125     & ifmt_div0s, { 0x9790 }
01126   },
01127 /* extsh $Ri */
01128   {
01129     { 0, 0, 0, 0 },
01130     { { MNEM, ' ', OP (RI), 0 } },
01131     & ifmt_div0s, { 0x97a0 }
01132   },
01133 /* extuh $Ri */
01134   {
01135     { 0, 0, 0, 0 },
01136     { { MNEM, ' ', OP (RI), 0 } },
01137     & ifmt_div0s, { 0x97b0 }
01138   },
01139 /* ldm0 ($reglist_low_ld) */
01140   {
01141     { 0, 0, 0, 0 },
01142     { { MNEM, ' ', '(', OP (REGLIST_LOW_LD), ')', 0 } },
01143     & ifmt_ldm0, { 0x8c00 }
01144   },
01145 /* ldm1 ($reglist_hi_ld) */
01146   {
01147     { 0, 0, 0, 0 },
01148     { { MNEM, ' ', '(', OP (REGLIST_HI_LD), ')', 0 } },
01149     & ifmt_ldm1, { 0x8d00 }
01150   },
01151 /* stm0 ($reglist_low_st) */
01152   {
01153     { 0, 0, 0, 0 },
01154     { { MNEM, ' ', '(', OP (REGLIST_LOW_ST), ')', 0 } },
01155     & ifmt_stm0, { 0x8e00 }
01156   },
01157 /* stm1 ($reglist_hi_st) */
01158   {
01159     { 0, 0, 0, 0 },
01160     { { MNEM, ' ', '(', OP (REGLIST_HI_ST), ')', 0 } },
01161     & ifmt_stm1, { 0x8f00 }
01162   },
01163 /* enter $u10 */
01164   {
01165     { 0, 0, 0, 0 },
01166     { { MNEM, ' ', OP (U10), 0 } },
01167     & ifmt_enter, { 0xf00 }
01168   },
01169 /* leave */
01170   {
01171     { 0, 0, 0, 0 },
01172     { { MNEM, 0 } },
01173     & ifmt_div3, { 0x9f90 }
01174   },
01175 /* xchb @$Rj,$Ri */
01176   {
01177     { 0, 0, 0, 0 },
01178     { { MNEM, ' ', '@', OP (RJ), ',', OP (RI), 0 } },
01179     & ifmt_add, { 0x8a00 }
01180   },
01181 };
01182 
01183 #undef A
01184 #undef OPERAND
01185 #undef MNEM
01186 #undef OP
01187 
01188 /* Formats for ALIAS macro-insns.  */
01189 
01190 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
01191 #define F(f) & fr30_cgen_ifld_table[FR30_##f]
01192 #else
01193 #define F(f) & fr30_cgen_ifld_table[FR30_f]
01194 #endif
01195 static const CGEN_IFMT ifmt_ldi8m ATTRIBUTE_UNUSED = {
01196   16, 16, 0xf000, { { F (F_OP1) }, { F (F_I8) }, { F (F_RI) }, { 0 } }
01197 };
01198 
01199 static const CGEN_IFMT ifmt_ldi20m ATTRIBUTE_UNUSED = {
01200   16, 32, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_RI) }, { F (F_I20) }, { 0 } }
01201 };
01202 
01203 static const CGEN_IFMT ifmt_ldi32m ATTRIBUTE_UNUSED = {
01204   16, 48, 0xfff0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_OP3) }, { F (F_RI) }, { F (F_I32) }, { 0 } }
01205 };
01206 
01207 #undef F
01208 
01209 /* Each non-simple macro entry points to an array of expansion possibilities.  */
01210 
01211 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
01212 #define A(a) (1 << CGEN_INSN_##a)
01213 #else
01214 #define A(a) (1 << CGEN_INSN_a)
01215 #endif
01216 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
01217 #define OPERAND(op) FR30_OPERAND_##op
01218 #else
01219 #define OPERAND(op) FR30_OPERAND_op
01220 #endif
01221 #define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
01222 #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
01223 
01224 /* The macro instruction table.  */
01225 
01226 static const CGEN_IBASE fr30_cgen_macro_insn_table[] =
01227 {
01228 /* ldi8 $i8,$Ri */
01229   {
01230     -1, "ldi8m", "ldi8", 16,
01231     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } }
01232   },
01233 /* ldi20 $i20,$Ri */
01234   {
01235     -1, "ldi20m", "ldi20", 32,
01236     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } }
01237   },
01238 /* ldi32 $i32,$Ri */
01239   {
01240     -1, "ldi32m", "ldi32", 48,
01241     { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } } } }
01242   },
01243 };
01244 
01245 /* The macro instruction opcode table.  */
01246 
01247 static const CGEN_OPCODE fr30_cgen_macro_insn_opcode_table[] =
01248 {
01249 /* ldi8 $i8,$Ri */
01250   {
01251     { 0, 0, 0, 0 },
01252     { { MNEM, ' ', OP (I8), ',', OP (RI), 0 } },
01253     & ifmt_ldi8m, { 0xc000 }
01254   },
01255 /* ldi20 $i20,$Ri */
01256   {
01257     { 0, 0, 0, 0 },
01258     { { MNEM, ' ', OP (I20), ',', OP (RI), 0 } },
01259     & ifmt_ldi20m, { 0x9b00 }
01260   },
01261 /* ldi32 $i32,$Ri */
01262   {
01263     { 0, 0, 0, 0 },
01264     { { MNEM, ' ', OP (I32), ',', OP (RI), 0 } },
01265     & ifmt_ldi32m, { 0x9f80 }
01266   },
01267 };
01268 
01269 #undef A
01270 #undef OPERAND
01271 #undef MNEM
01272 #undef OP
01273 
01274 #ifndef CGEN_ASM_HASH_P
01275 #define CGEN_ASM_HASH_P(insn) 1
01276 #endif
01277 
01278 #ifndef CGEN_DIS_HASH_P
01279 #define CGEN_DIS_HASH_P(insn) 1
01280 #endif
01281 
01282 /* Return non-zero if INSN is to be added to the hash table.
01283    Targets are free to override CGEN_{ASM,DIS}_HASH_P in the .opc file.  */
01284 
01285 static int
01286 asm_hash_insn_p (insn)
01287      const CGEN_INSN *insn ATTRIBUTE_UNUSED;
01288 {
01289   return CGEN_ASM_HASH_P (insn);
01290 }
01291 
01292 static int
01293 dis_hash_insn_p (insn)
01294      const CGEN_INSN *insn;
01295 {
01296   /* If building the hash table and the NO-DIS attribute is present,
01297      ignore.  */
01298   if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_NO_DIS))
01299     return 0;
01300   return CGEN_DIS_HASH_P (insn);
01301 }
01302 
01303 #ifndef CGEN_ASM_HASH
01304 #define CGEN_ASM_HASH_SIZE 127
01305 #ifdef CGEN_MNEMONIC_OPERANDS
01306 #define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE)
01307 #else
01308 #define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE) /*FIXME*/
01309 #endif
01310 #endif
01311 
01312 /* It doesn't make much sense to provide a default here,
01313    but while this is under development we do.
01314    BUFFER is a pointer to the bytes of the insn, target order.
01315    VALUE is the first base_insn_bitsize bits as an int in host order.  */
01316 
01317 #ifndef CGEN_DIS_HASH
01318 #define CGEN_DIS_HASH_SIZE 256
01319 #define CGEN_DIS_HASH(buf, value) (*(unsigned char *) (buf))
01320 #endif
01321 
01322 /* The result is the hash value of the insn.
01323    Targets are free to override CGEN_{ASM,DIS}_HASH in the .opc file.  */
01324 
01325 static unsigned int
01326 asm_hash_insn (mnem)
01327      const char * mnem;
01328 {
01329   return CGEN_ASM_HASH (mnem);
01330 }
01331 
01332 /* BUF is a pointer to the bytes of the insn, target order.
01333    VALUE is the first base_insn_bitsize bits as an int in host order.  */
01334 
01335 static unsigned int
01336 dis_hash_insn (buf, value)
01337      const char * buf ATTRIBUTE_UNUSED;
01338      CGEN_INSN_INT value ATTRIBUTE_UNUSED;
01339 {
01340   return CGEN_DIS_HASH (buf, value);
01341 }
01342 
01343 /* Set the recorded length of the insn in the CGEN_FIELDS struct.  */
01344 
01345 static void
01346 set_fields_bitsize (CGEN_FIELDS *fields, int size)
01347 {
01348   CGEN_FIELDS_BITSIZE (fields) = size;
01349 }
01350 
01351 /* Function to call before using the operand instance table.
01352    This plugs the opcode entries and macro instructions into the cpu table.  */
01353 
01354 void
01355 fr30_cgen_init_opcode_table (CGEN_CPU_DESC cd)
01356 {
01357   int i;
01358   int num_macros = (sizeof (fr30_cgen_macro_insn_table) /
01359                   sizeof (fr30_cgen_macro_insn_table[0]));
01360   const CGEN_IBASE *ib = & fr30_cgen_macro_insn_table[0];
01361   const CGEN_OPCODE *oc = & fr30_cgen_macro_insn_opcode_table[0];
01362   CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
01363 
01364   memset (insns, 0, num_macros * sizeof (CGEN_INSN));
01365   for (i = 0; i < num_macros; ++i)
01366     {
01367       insns[i].base = &ib[i];
01368       insns[i].opcode = &oc[i];
01369       fr30_cgen_build_insn_regex (& insns[i]);
01370     }
01371   cd->macro_insn_table.init_entries = insns;
01372   cd->macro_insn_table.entry_size = sizeof (CGEN_IBASE);
01373   cd->macro_insn_table.num_init_entries = num_macros;
01374 
01375   oc = & fr30_cgen_insn_opcode_table[0];
01376   insns = (CGEN_INSN *) cd->insn_table.init_entries;
01377   for (i = 0; i < MAX_INSNS; ++i)
01378     {
01379       insns[i].opcode = &oc[i];
01380       fr30_cgen_build_insn_regex (& insns[i]);
01381     }
01382 
01383   cd->sizeof_fields = sizeof (CGEN_FIELDS);
01384   cd->set_fields_bitsize = set_fields_bitsize;
01385 
01386   cd->asm_hash_p = asm_hash_insn_p;
01387   cd->asm_hash = asm_hash_insn;
01388   cd->asm_hash_size = CGEN_ASM_HASH_SIZE;
01389 
01390   cd->dis_hash_p = dis_hash_insn_p;
01391   cd->dis_hash = dis_hash_insn;
01392   cd->dis_hash_size = CGEN_DIS_HASH_SIZE;
01393 }