X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=opcodes%2Fm32r-opc.c;h=2ae8c40421351a6acff206cf4f4650d105c72e7d;hb=50d036364fb2a71b3ac9a0b0cdbe58296832a1b2;hp=670f7247834e1917bfd6e6b9f5be4e4c1e951df8;hpb=f4321104139af96b8cc3d4946b4e5233d9fa1eab;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/m32r-opc.c b/opcodes/m32r-opc.c index 670f724783..2ae8c40421 100644 --- a/opcodes/m32r-opc.c +++ b/opcodes/m32r-opc.c @@ -1,24 +1,25 @@ +/* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */ /* Instruction opcode table for m32r. THIS FILE IS MACHINE GENERATED WITH CGEN. -Copyright 1996-2005 Free Software Foundation, Inc. +Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU Binutils and/or GDB, the GNU debugger. -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + It is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the 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., -51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + 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., + 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -32,44 +33,38 @@ with this program; if not, write to the Free Software Foundation, Inc., /* -- opc.c */ unsigned int -m32r_cgen_dis_hash (buf, value) - const char * buf ATTRIBUTE_UNUSED; - CGEN_INSN_INT value; +m32r_cgen_dis_hash (const char * buf ATTRIBUTE_UNUSED, CGEN_INSN_INT value) { unsigned int x; - - if (value & 0xffff0000) /* 32bit instructions */ + + if (value & 0xffff0000) /* 32bit instructions. */ value = (value >> 16) & 0xffff; - - x = (value>>8) & 0xf0; + + x = (value >> 8) & 0xf0; if (x == 0x40 || x == 0xe0 || x == 0x60 || x == 0x50) return x; - + if (x == 0x70 || x == 0xf0) - return x | ((value>>8) & 0x0f); - + return x | ((value >> 8) & 0x0f); + if (x == 0x30) return x | ((value & 0x70) >> 4); else return x | ((value & 0xf0) >> 4); } - + /* -- */ /* 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. */ -#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) #define F(f) & m32r_cgen_ifld_table[M32R_##f] -#else -#define F(f) & m32r_cgen_ifld_table[M32R_/**/f] -#endif static const CGEN_IFMT ifmt_empty ATTRIBUTE_UNUSED = { 0, 0, 0x0, { { 0 } } }; @@ -212,16 +207,8 @@ static const CGEN_IFMT ifmt_btst ATTRIBUTE_UNUSED = { #undef F -#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) #define A(a) (1 << CGEN_INSN_##a) -#else -#define A(a) (1 << CGEN_INSN_/**/a) -#endif -#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) #define OPERAND(op) M32R_OPERAND_##op -#else -#define OPERAND(op) M32R_OPERAND_/**/op -#endif #define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */ #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field)) @@ -1130,11 +1117,7 @@ static const CGEN_OPCODE m32r_cgen_insn_opcode_table[MAX_INSNS] = /* Formats for ALIAS macro-insns. */ -#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) #define F(f) & m32r_cgen_ifld_table[M32R_##f] -#else -#define F(f) & m32r_cgen_ifld_table[M32R_/**/f] -#endif static const CGEN_IFMT ifmt_bc8r ATTRIBUTE_UNUSED = { 16, 16, 0xff00, { { F (F_OP1) }, { F (F_R1) }, { F (F_DISP8) }, { 0 } } }; @@ -1283,16 +1266,8 @@ static const CGEN_IFMT ifmt_push ATTRIBUTE_UNUSED = { /* Each non-simple macro entry points to an array of expansion possibilities. */ -#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) #define A(a) (1 << CGEN_INSN_##a) -#else -#define A(a) (1 << CGEN_INSN_/**/a) -#endif -#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) #define OPERAND(op) M32R_OPERAND_##op -#else -#define OPERAND(op) M32R_OPERAND_/**/op -#endif #define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */ #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field)) @@ -1303,182 +1278,182 @@ static const CGEN_IBASE m32r_cgen_macro_insn_table[] = /* bc $disp8 */ { -1, "bc8r", "bc", 16, - { 0|A(RELAXABLE)|A(COND_CTI)|A(ALIAS), { (1<= 1) + memset (insns, 0, num_macros * sizeof (CGEN_INSN)); for (i = 0; i < num_macros; ++i) { insns[i].base = &ib[i];