X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=opcodes%2Fmep-opc.c;h=7498b5ec25ab3962538f7cd249ac135c62cf22c7;hb=bab6aec1255ba2ec8de3ae0363958e2ff26ce25d;hp=7bf92b62fab110d116704890e2cb3a45a8c565b0;hpb=eb9568003a5a95a7587b47fa7b9b5c2e3ff57b66;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/mep-opc.c b/opcodes/mep-opc.c index 7bf92b62fa..7498b5ec25 100644 --- a/opcodes/mep-opc.c +++ b/opcodes/mep-opc.c @@ -1,8 +1,9 @@ +/* DO NOT EDIT! -*- buffer-read-only: t -*- vi:set ro: */ /* Instruction opcode table for mep. THIS FILE IS MACHINE GENERATED WITH CGEN. -Copyright 1996-2007 Free Software Foundation, Inc. +Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU Binutils and/or GDB, the GNU debugger. @@ -92,7 +93,7 @@ mep_config_map_struct mep_config_map[] = { /* config-map-start */ /* Default entry: first module, with all options enabled. */ - { "", 0, EF_MEP_COP_IVC2 | EF_MEP_CPU_C5,1, 0, { 1, "\x20" }, { 1, "\x10" }, { 1, "\x8" }, { 1, "\x4" }, { 1, "\x3c" }, { 1, "\xc0" }, OPTION_MASK | (1 << CGEN_INSN_OPTIONAL_DSP_INSN) | (1 << CGEN_INSN_OPTIONAL_UCI_INSN) }, + { "", 0, EF_MEP_COP_IVC2 | EF_MEP_CPU_C5,0, 64, { 1, "\x20" }, { 1, "\x10" }, { 1, "\x8" }, { 1, "\x4" }, { 1, "\x3c" }, { 1, "\xc0" }, OPTION_MASK | (1 << CGEN_INSN_OPTIONAL_DSP_INSN) | (1 << CGEN_INSN_OPTIONAL_UCI_INSN) }, { "default", CONFIG_DEFAULT, EF_MEP_COP_IVC2 | EF_MEP_CPU_C5, 0, 64, { 1, "\x20" }, { 1, "\x10" }, { 1, "\x8" }, { 1, "\x4" }, { 1, "\x3c" }, { 1, "\xc0" }, 0 | (1 << CGEN_INSN_OPTIONAL_CP_INSN) @@ -148,7 +149,7 @@ mep_cgen_insn_supported (CGEN_CPU_DESC cd, const CGEN_INSN *insn) /* If the insn has an option bit set that we don't want, reject it. */ - if (CGEN_INSN_ATTRS (insn)->bool & OPTION_MASK & ~MEP_OMASK) + if (CGEN_INSN_ATTRS (insn)->bool_ & OPTION_MASK & ~MEP_OMASK) return 0; /* If attributes are absent, assume no restriction. */ @@ -163,6 +164,20 @@ mep_cgen_insn_supported (CGEN_CPU_DESC cd, const CGEN_INSN *insn) return (ok1 && ok2 && ok3); } + +int +mep_cgen_insn_supported_asm (CGEN_CPU_DESC cd, const CGEN_INSN *insn) +{ +#ifdef MEP_IVC2_SUPPORTED + /* If we're assembling VLIW packets, ignore the 12-bit BSR as we + can't relax that. The 24-bit BSR is matched instead. */ + if (insn->base->num == MEP_INSN_BSR12 + && cgen_bitset_contains (cd->isas, ISA_EXT_COP1_64)) + return 0; +#endif + + return mep_cgen_insn_supported (cd, insn); +} /* The hash functions are recorded here to help keep assembler code out of the disassembler and vice versa. */ @@ -173,11 +188,7 @@ 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) & mep_cgen_ifld_table[MEP_##f] -#else -#define F(f) & mep_cgen_ifld_table[MEP_/**/f] -#endif static const CGEN_IFMT ifmt_empty ATTRIBUTE_UNUSED = { 0, 0, 0x0, { { 0 } } }; @@ -439,7 +450,7 @@ static const CGEN_IFMT ifmt_cmov_crn_rm ATTRIBUTE_UNUSED = { }; static const CGEN_IFMT ifmt_cmovc_ccrn_rm ATTRIBUTE_UNUSED = { - 32, 32, 0xf00ffff3, { { F (F_MAJOR) }, { F (F_CCRN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_IVC2_4U16) }, { F (F_IVC2_4U20) }, { F (F_IVC2_4U24) }, { F (F_30) }, { F (F_31) }, { 0 } } + 32, 32, 0xf00ffff3, { { F (F_MAJOR) }, { F (F_IVC2_CCRN_C3) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_IVC2_4U16) }, { F (F_IVC2_4U20) }, { F (F_IVC2_4U24) }, { F (F_30) }, { F (F_31) }, { 0 } } }; static const CGEN_IFMT ifmt_cmov_crn_rm_p0 ATTRIBUTE_UNUSED = { @@ -558,6 +569,10 @@ static const CGEN_IFMT ifmt_cpmoviu_w_P0_P1 ATTRIBUTE_UNUSED = { 32, 32, 0xf8300f, { { F (F_IVC2_IMM16P0) }, { F (F_IVC2_5U8) }, { F (F_IVC2_5U13) }, { F (F_IVC2_2U18) }, { F (F_IVC2_4U28) }, { 0 } } }; +static const CGEN_IFMT ifmt_cpmovi_b_P0S_P1 ATTRIBUTE_UNUSED = { + 32, 32, 0xfff8300f, { { F (F_IVC2_8U0) }, { F (F_IVC2_5U8) }, { F (F_IVC2_5U13) }, { F (F_IVC2_2U18) }, { F (F_IVC2_8U20) }, { F (F_IVC2_4U28) }, { 0 } } +}; + static const CGEN_IFMT ifmt_cpfmulia1s0u_b_P1 ATTRIBUTE_UNUSED = { 32, 32, 0xf801ff, { { F (F_IVC2_8S0) }, { F (F_IVC2_5U8) }, { F (F_IVC2_5U13) }, { F (F_IVC2_5U18) }, { F (F_IVC2_5U23) }, { F (F_IVC2_4U28) }, { 0 } } }; @@ -568,16 +583,8 @@ static const CGEN_IFMT ifmt_cpfmulia1u_b_P1 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) MEP_OPERAND_##op -#else -#define OPERAND(op) MEP_OPERAND_/**/op -#endif #define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */ #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field)) @@ -1951,16 +1958,16 @@ static const CGEN_OPCODE mep_cgen_insn_opcode_table[MAX_INSNS] = { { MNEM, ' ', OP (RM), ',', OP (CRNX64), 0 } }, & ifmt_cmov_crn_rm, { 0xf007f001 } }, -/* cmovc $ccrn,$rm */ +/* cmovc $ivc2c3ccrn,$rm */ { { 0, 0, 0, 0 }, - { { MNEM, ' ', OP (CCRN), ',', OP (RM), 0 } }, + { { MNEM, ' ', OP (IVC2C3CCRN), ',', OP (RM), 0 } }, & ifmt_cmovc_ccrn_rm, { 0xf007f002 } }, -/* cmovc $rm,$ccrn */ +/* cmovc $rm,$ivc2c3ccrn */ { { 0, 0, 0, 0 }, - { { MNEM, ' ', OP (RM), ',', OP (CCRN), 0 } }, + { { MNEM, ' ', OP (RM), ',', OP (IVC2C3CCRN), 0 } }, & ifmt_cmovc_ccrn_rm, { 0xf007f003 } }, /* cmovh $crnx64,$rm */ @@ -5287,6 +5294,12 @@ static const CGEN_OPCODE mep_cgen_insn_opcode_table[MAX_INSNS] = { { MNEM, 0 } }, & ifmt_c0nop_P0_P0S, { 0x0 } }, +/* cpmovi.b $crqp,$simm8p20 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (CRQP), ',', OP (SIMM8P20), 0 } }, + & ifmt_cpmovi_b_P0S_P1, { 0xb00000 } + }, /* cpadda1u.b $crqp,$crpp */ { { 0, 0, 0, 0 }, @@ -6070,11 +6083,7 @@ static const CGEN_OPCODE mep_cgen_insn_opcode_table[MAX_INSNS] = /* Formats for ALIAS macro-insns. */ -#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) #define F(f) & mep_cgen_ifld_table[MEP_##f] -#else -#define F(f) & mep_cgen_ifld_table[MEP_/**/f] -#endif static const CGEN_IFMT ifmt_nop ATTRIBUTE_UNUSED = { 16, 16, 0xffff, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } } }; @@ -6131,16 +6140,8 @@ static const CGEN_IFMT ifmt_lmcp16_0 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) MEP_OPERAND_##op -#else -#define OPERAND(op) MEP_OPERAND_/**/op -#endif #define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */ #define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field)) @@ -6151,67 +6152,67 @@ static const CGEN_IBASE mep_cgen_macro_insn_table[] = /* nop */ { -1, "nop", "nop", 16, - { 0|A(ALIAS), { { { (1<