Back to index

cell-binutils  2.17cvs20070401
mt-opc.h
Go to the documentation of this file.
00001 /* Instruction opcode header for mt.
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 #ifndef MT_OPC_H
00026 #define MT_OPC_H
00027 
00028 /* -- opc.h */
00029 
00030 /* Check applicability of instructions against machines.  */
00031 #define CGEN_VALIDATE_INSN_SUPPORTED
00032 
00033 /* Allows reason codes to be output when assembler errors occur.  */
00034 #define CGEN_VERBOSE_ASSEMBLER_ERRORS
00035 
00036 /* Override disassembly hashing - there are variable bits in the top
00037    byte of these instructions.  */
00038 #define CGEN_DIS_HASH_SIZE 8
00039 #define CGEN_DIS_HASH(buf, value) (((* (unsigned char *) (buf)) >> 5) % CGEN_DIS_HASH_SIZE)
00040 
00041 #define CGEN_ASM_HASH_SIZE 127
00042 #define CGEN_ASM_HASH(insn) mt_asm_hash (insn)
00043 
00044 extern unsigned int mt_asm_hash (const char *);
00045 
00046 extern int mt_cgen_insn_supported (CGEN_CPU_DESC, const CGEN_INSN *);
00047 
00048 
00049 /* -- opc.c */
00050 /* Enum declaration for mt instruction types.  */
00051 typedef enum cgen_insn_type {
00052   MT_INSN_INVALID, MT_INSN_ADD, MT_INSN_ADDU, MT_INSN_ADDI
00053  , MT_INSN_ADDUI, MT_INSN_SUB, MT_INSN_SUBU, MT_INSN_SUBI
00054  , MT_INSN_SUBUI, MT_INSN_MUL, MT_INSN_MULI, MT_INSN_AND
00055  , MT_INSN_ANDI, MT_INSN_OR, MT_INSN_NOP, MT_INSN_ORI
00056  , MT_INSN_XOR, MT_INSN_XORI, MT_INSN_NAND, MT_INSN_NANDI
00057  , MT_INSN_NOR, MT_INSN_NORI, MT_INSN_XNOR, MT_INSN_XNORI
00058  , MT_INSN_LDUI, MT_INSN_LSL, MT_INSN_LSLI, MT_INSN_LSR
00059  , MT_INSN_LSRI, MT_INSN_ASR, MT_INSN_ASRI, MT_INSN_BRLT
00060  , MT_INSN_BRLE, MT_INSN_BREQ, MT_INSN_BRNE, MT_INSN_JMP
00061  , MT_INSN_JAL, MT_INSN_DBNZ, MT_INSN_EI, MT_INSN_DI
00062  , MT_INSN_SI, MT_INSN_RETI, MT_INSN_LDW, MT_INSN_STW
00063  , MT_INSN_BREAK, MT_INSN_IFLUSH, MT_INSN_LDCTXT, MT_INSN_LDFB
00064  , MT_INSN_STFB, MT_INSN_FBCB, MT_INSN_MFBCB, MT_INSN_FBCCI
00065  , MT_INSN_FBRCI, MT_INSN_FBCRI, MT_INSN_FBRRI, MT_INSN_MFBCCI
00066  , MT_INSN_MFBRCI, MT_INSN_MFBCRI, MT_INSN_MFBRRI, MT_INSN_FBCBDR
00067  , MT_INSN_RCFBCB, MT_INSN_MRCFBCB, MT_INSN_CBCAST, MT_INSN_DUPCBCAST
00068  , MT_INSN_WFBI, MT_INSN_WFB, MT_INSN_RCRISC, MT_INSN_FBCBINC
00069  , MT_INSN_RCXMODE, MT_INSN_INTERLEAVER, MT_INSN_WFBINC, MT_INSN_MWFBINC
00070  , MT_INSN_WFBINCR, MT_INSN_MWFBINCR, MT_INSN_FBCBINCS, MT_INSN_MFBCBINCS
00071  , MT_INSN_FBCBINCRS, MT_INSN_MFBCBINCRS, MT_INSN_LOOP, MT_INSN_LOOPI
00072  , MT_INSN_DFBC, MT_INSN_DWFB, MT_INSN_FBWFB, MT_INSN_DFBR
00073 } CGEN_INSN_TYPE;
00074 
00075 /* Index of `invalid' insn place holder.  */
00076 #define CGEN_INSN_INVALID MT_INSN_INVALID
00077 
00078 /* Total number of insns in table.  */
00079 #define MAX_INSNS ((int) MT_INSN_DFBR + 1)
00080 
00081 /* This struct records data prior to insertion or after extraction.  */
00082 struct cgen_fields
00083 {
00084   int length;
00085   long f_nil;
00086   long f_anyof;
00087   long f_msys;
00088   long f_opc;
00089   long f_imm;
00090   long f_uu24;
00091   long f_sr1;
00092   long f_sr2;
00093   long f_dr;
00094   long f_drrr;
00095   long f_imm16u;
00096   long f_imm16s;
00097   long f_imm16a;
00098   long f_uu4a;
00099   long f_uu4b;
00100   long f_uu12;
00101   long f_uu8;
00102   long f_uu16;
00103   long f_uu1;
00104   long f_msopc;
00105   long f_uu_26_25;
00106   long f_mask;
00107   long f_bankaddr;
00108   long f_rda;
00109   long f_uu_2_25;
00110   long f_rbbc;
00111   long f_perm;
00112   long f_mode;
00113   long f_uu_1_24;
00114   long f_wr;
00115   long f_fbincr;
00116   long f_uu_2_23;
00117   long f_xmode;
00118   long f_a23;
00119   long f_mask1;
00120   long f_cr;
00121   long f_type;
00122   long f_incamt;
00123   long f_cbs;
00124   long f_uu_1_19;
00125   long f_ball;
00126   long f_colnum;
00127   long f_brc;
00128   long f_incr;
00129   long f_fbdisp;
00130   long f_uu_4_15;
00131   long f_length;
00132   long f_uu_1_15;
00133   long f_rc;
00134   long f_rcnum;
00135   long f_rownum;
00136   long f_cbx;
00137   long f_id;
00138   long f_size;
00139   long f_rownum1;
00140   long f_uu_3_11;
00141   long f_rc1;
00142   long f_ccb;
00143   long f_cbrb;
00144   long f_cdb;
00145   long f_rownum2;
00146   long f_cell;
00147   long f_uu_3_9;
00148   long f_contnum;
00149   long f_uu_1_6;
00150   long f_dup;
00151   long f_rc2;
00152   long f_ctxdisp;
00153   long f_imm16l;
00154   long f_loopo;
00155   long f_cb1sel;
00156   long f_cb2sel;
00157   long f_cb1incr;
00158   long f_cb2incr;
00159   long f_rc3;
00160   long f_msysfrsr2;
00161   long f_brc2;
00162   long f_ball2;
00163 };
00164 
00165 #define CGEN_INIT_PARSE(od) \
00166 {\
00167 }
00168 #define CGEN_INIT_INSERT(od) \
00169 {\
00170 }
00171 #define CGEN_INIT_EXTRACT(od) \
00172 {\
00173 }
00174 #define CGEN_INIT_PRINT(od) \
00175 {\
00176 }
00177 
00178 
00179 #endif /* MT_OPC_H */