X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=opcodes%2Fopenrisc-opc.c;h=ff9d52c37d87c07d2545b5e843e8e85e5a8ec70b;hb=004314cccdac93ac8d2d7c63776b52f0c202f050;hp=86ee35b7bf367dd470107b18cd62a999f78361b3;hpb=87e6d782173c2d21d5f7ee1510a3b4f27a1fe68e;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/openrisc-opc.c b/opcodes/openrisc-opc.c index 86ee35b7bf..ff9d52c37d 100644 --- a/opcodes/openrisc-opc.c +++ b/opcodes/openrisc-opc.c @@ -2,7 +2,7 @@ THIS FILE IS MACHINE GENERATED WITH CGEN. -Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +Copyright 1996-2005 Free Software Foundation, Inc. This file is part of the GNU Binutils and/or GDB, the GNU debugger. @@ -18,7 +18,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., -59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -35,10 +35,10 @@ with this program; if not, write to the Free Software Foundation, Inc., /* The hash functions are recorded here to help keep assembler code out of the disassembler and vice versa. */ -static int asm_hash_insn_p PARAMS ((const CGEN_INSN *)); -static unsigned int asm_hash_insn PARAMS ((const char *)); -static int dis_hash_insn_p PARAMS ((const CGEN_INSN *)); -static unsigned int dis_hash_insn PARAMS ((const char *, CGEN_INSN_INT)); +static int asm_hash_insn_p (const CGEN_INSN *); +static unsigned int asm_hash_insn (const char *); +static int dis_hash_insn_p (const CGEN_INSN *); +static unsigned int dis_hash_insn (const char *, CGEN_INSN_INT); /* Instruction formats. */ @@ -47,67 +47,67 @@ static unsigned int dis_hash_insn PARAMS ((const char *, CGEN_INSN_INT)); #else #define F(f) & openrisc_cgen_ifld_table[OPENRISC_/**/f] #endif -static const CGEN_IFMT ifmt_empty = { +static const CGEN_IFMT ifmt_empty ATTRIBUTE_UNUSED = { 0, 0, 0x0, { { 0 } } }; -static const CGEN_IFMT ifmt_l_j = { +static const CGEN_IFMT ifmt_l_j ATTRIBUTE_UNUSED = { 32, 32, 0xfc000000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_ABS26) }, { 0 } } }; -static const CGEN_IFMT ifmt_l_jr = { +static const CGEN_IFMT ifmt_l_jr ATTRIBUTE_UNUSED = { 32, 32, 0xffe00000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_OP3) }, { F (F_OP4) }, { F (F_R2) }, { F (F_UIMM16) }, { 0 } } }; -static const CGEN_IFMT ifmt_l_bal = { +static const CGEN_IFMT ifmt_l_bal ATTRIBUTE_UNUSED = { 32, 32, 0xfc000000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_DISP26) }, { 0 } } }; -static const CGEN_IFMT ifmt_l_movhi = { +static const CGEN_IFMT ifmt_l_movhi ATTRIBUTE_UNUSED = { 32, 32, 0xfc000000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } } }; -static const CGEN_IFMT ifmt_l_mfsr = { +static const CGEN_IFMT ifmt_l_mfsr ATTRIBUTE_UNUSED = { 32, 32, 0xfc000000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_UIMM16) }, { 0 } } }; -static const CGEN_IFMT ifmt_l_mtsr = { +static const CGEN_IFMT ifmt_l_mtsr ATTRIBUTE_UNUSED = { 32, 32, 0xfc0007ff, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_I16_1) }, { 0 } } }; -static const CGEN_IFMT ifmt_l_lw = { +static const CGEN_IFMT ifmt_l_lw ATTRIBUTE_UNUSED = { 32, 32, 0xfc000000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } } }; -static const CGEN_IFMT ifmt_l_sw = { +static const CGEN_IFMT ifmt_l_sw ATTRIBUTE_UNUSED = { 32, 32, 0xfc000000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R3) }, { F (F_I16NC) }, { 0 } } }; -static const CGEN_IFMT ifmt_l_sll = { +static const CGEN_IFMT ifmt_l_sll ATTRIBUTE_UNUSED = { 32, 32, 0xfc0007ff, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_F_10_3) }, { F (F_OP6) }, { F (F_F_4_1) }, { F (F_OP7) }, { 0 } } }; -static const CGEN_IFMT ifmt_l_slli = { +static const CGEN_IFMT ifmt_l_slli ATTRIBUTE_UNUSED = { 32, 32, 0xfc00ffe0, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_F_15_8) }, { F (F_OP6) }, { F (F_UIMM5) }, { 0 } } }; -static const CGEN_IFMT ifmt_l_add = { +static const CGEN_IFMT ifmt_l_add ATTRIBUTE_UNUSED = { 32, 32, 0xfc0007ff, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_R3) }, { F (F_F_10_7) }, { F (F_OP7) }, { 0 } } }; -static const CGEN_IFMT ifmt_l_addi = { +static const CGEN_IFMT ifmt_l_addi ATTRIBUTE_UNUSED = { 32, 32, 0xfc000000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_R1) }, { F (F_R2) }, { F (F_LO16) }, { 0 } } }; -static const CGEN_IFMT ifmt_l_sfgts = { +static const CGEN_IFMT ifmt_l_sfgts ATTRIBUTE_UNUSED = { 32, 32, 0xffe007ff, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_OP5) }, { F (F_R2) }, { F (F_R3) }, { F (F_F_10_11) }, { 0 } } }; -static const CGEN_IFMT ifmt_l_sfgtsi = { +static const CGEN_IFMT ifmt_l_sfgtsi ATTRIBUTE_UNUSED = { 32, 32, 0xffe00000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_OP5) }, { F (F_R2) }, { F (F_SIMM16) }, { 0 } } }; -static const CGEN_IFMT ifmt_l_sfgtui = { +static const CGEN_IFMT ifmt_l_sfgtui ATTRIBUTE_UNUSED = { 32, 32, 0xffe00000, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_OP5) }, { F (F_R2) }, { F (F_UIMM16) }, { 0 } } }; @@ -532,7 +532,7 @@ static const CGEN_OPCODE openrisc_cgen_insn_opcode_table[MAX_INSNS] = #else #define F(f) & openrisc_cgen_ifld_table[OPENRISC_/**/f] #endif -static const CGEN_IFMT ifmt_l_ret = { +static const CGEN_IFMT ifmt_l_ret ATTRIBUTE_UNUSED = { 32, 32, 0xffffffff, { { F (F_CLASS) }, { F (F_SUB) }, { F (F_OP3) }, { F (F_OP4) }, { F (F_R2) }, { F (F_UIMM16) }, { 0 } } }; @@ -560,7 +560,7 @@ static const CGEN_IBASE openrisc_cgen_macro_insn_table[] = /* l.ret */ { -1, "l-ret", "l.ret", 32, - { 0|A(ALIAS), { (1<macro_insn_table.init_entries = insns; cd->macro_insn_table.entry_size = sizeof (CGEN_IBASE); @@ -686,7 +685,10 @@ openrisc_cgen_init_opcode_table (cd) oc = & openrisc_cgen_insn_opcode_table[0]; insns = (CGEN_INSN *) cd->insn_table.init_entries; for (i = 0; i < MAX_INSNS; ++i) - insns[i].opcode = &oc[i]; + { + insns[i].opcode = &oc[i]; + openrisc_cgen_build_insn_regex (& insns[i]); + } cd->sizeof_fields = sizeof (CGEN_FIELDS); cd->set_fields_bitsize = set_fields_bitsize;