1999-05-03 15:29:11 +08:00
|
|
|
/* Opcode table for the ARC.
|
2016-01-01 19:25:12 +08:00
|
|
|
Copyright (C) 1994-2016 Free Software Foundation, Inc.
|
2015-10-07 21:20:19 +08:00
|
|
|
|
|
|
|
Contributed by Claudiu Zissulescu (claziss@synopsys.com)
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2001-01-12 05:20:20 +08:00
|
|
|
This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
|
|
|
|
the GNU Binutils.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2001-01-12 05:20:20 +08:00
|
|
|
GAS/GDB is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2010-04-15 18:26:09 +08:00
|
|
|
the Free Software Foundation; either version 3, or (at your option)
|
2001-01-12 05:20:20 +08:00
|
|
|
any later version.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2001-01-12 05:20:20 +08:00
|
|
|
GAS/GDB is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2015-10-07 21:20:19 +08:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2001-01-12 05:20:20 +08:00
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2010-04-15 18:26:09 +08:00
|
|
|
along with GAS or GDB; see the file COPYING3. If not, write to
|
2005-05-10 18:21:13 +08:00
|
|
|
the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
|
|
|
|
MA 02110-1301, USA. */
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
#ifndef OPCODE_ARC_H
|
|
|
|
#define OPCODE_ARC_H
|
|
|
|
|
Add support for ARC instruction relaxation in the assembler.
gas/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>
* config/tc-arc.h (TC_FRAG_TYPE, TC_PCREL_ADJUST, MAX_INSN_ARGS)
(MAX_INSN_FLGS, MAX_FLAG_NAME_LENGHT, TC_GENERIC_RELAX_TABLE):
Define.
(arc_flags, arc_relax_type): New structure.
* config/tc-arc.c (FRAG_MAX_GROWTH, RELAX_TABLE_ENTRY)
(RELAX_TABLE_ENTRY_MAX): New define.
(relaxation_state, md_relax_table, arc_relaxable_insns)
(arc_num_relaxable_ins): New variable.
(rlx_operand_type, arc_rlx_types): New enums.
(arc_relaxable_ins): New structure.
(OPTION_RELAX): New option.
(arc_insn): New relax member.
(arc_flags): Remove.
(relax_insn_p): New function.
(apply_fixups): Likewise.
(relaxable_operand): Likewise.
(may_relax_expr): Likewise.
(relaxable_flag): Likewise.
(arc_pcrel_adjust): Likewise.
(md_estimate_size_before_relax): Implement.
(md_convert_frag): Likewise.
(md_parse_option): Handle new mrelax option.
(md_show_usage): Likewise.
(assemble_insn): Set relax member.
(emit_insn0): New function.
(emit_insn1): Likewise.
(emit_insn): Handle relaxation case.
* NEWS: Mention the new relaxation option.
* doc/c-arc.texi (ARC Options): Document new mrelax option.
gas/testsuite
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
* gas/arc/relax-avoid1.d: New file.
* gas/arc/relax-avoid1.s: Likewise.
* gas/arc/relax-avoid2.d: Likewise.
* gas/arc/relax-avoid2.s: Likewise.
* gas/arc/relax-avoid3.d: Likewise.
* gas/arc/relax-avoid3.s: Likewise.
* gas/arc/relax-b.d: Likewise.
* gas/arc/relax-b.s: Likewise.
include/opcode/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>
* arc.h (arc_opcode arc_relax_opcodes, arc_num_relax_opcodes):
Declare.
opcodes/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>
* arc-opc.c (arc_relax_opcodes, arc_num_relax_opcodes): New
variable.
2016-02-10 20:09:01 +08:00
|
|
|
#ifndef MAX_INSN_ARGS
|
opcodes/arc: Add yet more nps instructions
Add some more arc/nps400 instructions and the associated operands.
There's also a test added into the assembler.
gas/ChangeLog:
* testsuite/gas/arc/nps400-6.d: New file.
* testsuite/gas/arc/nps400-6.s: New file.
include/ChangeLog:
* opcode/arc.h (MAX_INSN_ARGS): Increase 6 to 8.
opcodes/ChangeLog:
* arc-nps400-tbl.h: Add addb, subb, adcb, sbcb, andb, xorb, orb,
fxorb, wxorb, shlb, shrb, notb, cntbb, div, mod, divm, and qcmp
instructions.
* arc-opc.c (insert_nps_bitop_size): Delete.
(extract_nps_bitop_size): Delete.
(MAKE_SRC_POS_INSERT_EXTRACT_FUNCS): Define, and use.
(extract_nps_qcmp_m3): Define.
(extract_nps_qcmp_m2): Define.
(extract_nps_qcmp_m1): Define.
(arc_flag_operands): Add F_NPS_SX, F_NPS_AR, F_NPS_AL.
(arc_flag_classes): Add C_NPS_SX, C_NPS_AR_AL
(arc_operands): Add NPS_SRC2_POS, NPS_SRC1_POS, NPS_ADDB_SIZE,
NPS_ANDB_SIZE, NPS_FXORB_SIZ, NPS_WXORB_SIZ, NPS_R_XLDST,
NPS_DIV_UIMM4, NPS_QCMP_SIZE, NPS_QCMP_M1, NPS_QCMP_M2, and
NPS_QCMP_M3.
2016-04-02 02:51:50 +08:00
|
|
|
#define MAX_INSN_ARGS 8
|
Add support for ARC instruction relaxation in the assembler.
gas/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>
* config/tc-arc.h (TC_FRAG_TYPE, TC_PCREL_ADJUST, MAX_INSN_ARGS)
(MAX_INSN_FLGS, MAX_FLAG_NAME_LENGHT, TC_GENERIC_RELAX_TABLE):
Define.
(arc_flags, arc_relax_type): New structure.
* config/tc-arc.c (FRAG_MAX_GROWTH, RELAX_TABLE_ENTRY)
(RELAX_TABLE_ENTRY_MAX): New define.
(relaxation_state, md_relax_table, arc_relaxable_insns)
(arc_num_relaxable_ins): New variable.
(rlx_operand_type, arc_rlx_types): New enums.
(arc_relaxable_ins): New structure.
(OPTION_RELAX): New option.
(arc_insn): New relax member.
(arc_flags): Remove.
(relax_insn_p): New function.
(apply_fixups): Likewise.
(relaxable_operand): Likewise.
(may_relax_expr): Likewise.
(relaxable_flag): Likewise.
(arc_pcrel_adjust): Likewise.
(md_estimate_size_before_relax): Implement.
(md_convert_frag): Likewise.
(md_parse_option): Handle new mrelax option.
(md_show_usage): Likewise.
(assemble_insn): Set relax member.
(emit_insn0): New function.
(emit_insn1): Likewise.
(emit_insn): Handle relaxation case.
* NEWS: Mention the new relaxation option.
* doc/c-arc.texi (ARC Options): Document new mrelax option.
gas/testsuite
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
* gas/arc/relax-avoid1.d: New file.
* gas/arc/relax-avoid1.s: Likewise.
* gas/arc/relax-avoid2.d: Likewise.
* gas/arc/relax-avoid2.s: Likewise.
* gas/arc/relax-avoid3.d: Likewise.
* gas/arc/relax-avoid3.s: Likewise.
* gas/arc/relax-b.d: Likewise.
* gas/arc/relax-b.s: Likewise.
include/opcode/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>
* arc.h (arc_opcode arc_relax_opcodes, arc_num_relax_opcodes):
Declare.
opcodes/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>
* arc-opc.c (arc_relax_opcodes, arc_num_relax_opcodes): New
variable.
2016-02-10 20:09:01 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MAX_INSN_FLGS
|
2015-10-07 21:20:19 +08:00
|
|
|
#define MAX_INSN_FLGS 3
|
Add support for ARC instruction relaxation in the assembler.
gas/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>
* config/tc-arc.h (TC_FRAG_TYPE, TC_PCREL_ADJUST, MAX_INSN_ARGS)
(MAX_INSN_FLGS, MAX_FLAG_NAME_LENGHT, TC_GENERIC_RELAX_TABLE):
Define.
(arc_flags, arc_relax_type): New structure.
* config/tc-arc.c (FRAG_MAX_GROWTH, RELAX_TABLE_ENTRY)
(RELAX_TABLE_ENTRY_MAX): New define.
(relaxation_state, md_relax_table, arc_relaxable_insns)
(arc_num_relaxable_ins): New variable.
(rlx_operand_type, arc_rlx_types): New enums.
(arc_relaxable_ins): New structure.
(OPTION_RELAX): New option.
(arc_insn): New relax member.
(arc_flags): Remove.
(relax_insn_p): New function.
(apply_fixups): Likewise.
(relaxable_operand): Likewise.
(may_relax_expr): Likewise.
(relaxable_flag): Likewise.
(arc_pcrel_adjust): Likewise.
(md_estimate_size_before_relax): Implement.
(md_convert_frag): Likewise.
(md_parse_option): Handle new mrelax option.
(md_show_usage): Likewise.
(assemble_insn): Set relax member.
(emit_insn0): New function.
(emit_insn1): Likewise.
(emit_insn): Handle relaxation case.
* NEWS: Mention the new relaxation option.
* doc/c-arc.texi (ARC Options): Document new mrelax option.
gas/testsuite
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
* gas/arc/relax-avoid1.d: New file.
* gas/arc/relax-avoid1.s: Likewise.
* gas/arc/relax-avoid2.d: Likewise.
* gas/arc/relax-avoid2.s: Likewise.
* gas/arc/relax-avoid3.d: Likewise.
* gas/arc/relax-avoid3.s: Likewise.
* gas/arc/relax-b.d: Likewise.
* gas/arc/relax-b.s: Likewise.
include/opcode/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>
* arc.h (arc_opcode arc_relax_opcodes, arc_num_relax_opcodes):
Declare.
opcodes/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>
* arc-opc.c (arc_relax_opcodes, arc_num_relax_opcodes): New
variable.
2016-02-10 20:09:01 +08:00
|
|
|
#endif
|
2015-10-07 21:20:19 +08:00
|
|
|
|
|
|
|
/* Instruction Class. */
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
ARITH,
|
|
|
|
AUXREG,
|
|
|
|
BRANCH,
|
|
|
|
CONTROL,
|
|
|
|
DSP,
|
|
|
|
FLOAT,
|
|
|
|
INVALID,
|
|
|
|
JUMP,
|
|
|
|
KERNEL,
|
|
|
|
LOGICAL,
|
|
|
|
MEMORY,
|
2016-03-16 06:01:34 +08:00
|
|
|
BITOP,
|
2016-04-01 02:51:14 +08:00
|
|
|
NET,
|
|
|
|
ACL,
|
2015-10-07 21:20:19 +08:00
|
|
|
} insn_class_t;
|
|
|
|
|
|
|
|
/* Instruction Subclass. */
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
NONE,
|
|
|
|
CVT,
|
|
|
|
BTSCN,
|
|
|
|
CD1,
|
|
|
|
CD2,
|
|
|
|
DIV,
|
|
|
|
DP,
|
2016-04-05 23:37:29 +08:00
|
|
|
DPA,
|
|
|
|
DPX,
|
2015-10-07 21:20:19 +08:00
|
|
|
MPY1E,
|
|
|
|
MPY6E,
|
|
|
|
MPY7E,
|
|
|
|
MPY8E,
|
|
|
|
MPY9E,
|
[ARC] Add support for Quarkse opcodes.
gas/
2016-03-29 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/arc/ext2op.d: New file.
* testsuite/gas/arc/ext2op.s: Likewise.
* testsuite/gas/arc/ext3op.d: Likewise.
* testsuite/gas/arc/ext3op.s: Likewise.
opcodes/
2016-03-29 Claudiu Zissulescu <claziss@synopsys.com>
* arc-tbl.h (invld07): Remove.
* arc-ext-tbl.h: New file.
* arc-dis.c (FIELDA, FIELDB, FIELDC): Remove.
* arc-opc.c (arc_opcodes): Add ext-tbl include.
include/
2016-03-29 Claudiu Zissulescu <claziss@synopsys.com>
* opcode/arc.h (insn_subclass_t): Add QUARKSE subclass.
(FIELDA, FIELDB, FIELDC, FIELDF, FIELDQ, INSN3OP, INSN2OP)
(INSN2OP, INSN3OP_ABC, INSN3OP_ALC, INSN3OP_ABL, INSN3OP_ALL)
(INSN3OP_0BC, INSN3OP_0LC, INSN3OP_0BL, INSN3OP_0LL, INSN3OP_ABU)
(INSN3OP_ALU, INSN3OP_0BU, INSN3OP_0LU, INSN3OP_BBS, INSN3OP_0LS)
(INSN3OP_CBBC, INSN3OP_CBBL, INSN3OP_C0LC, INSN3OP_C0LL)
(INSN3OP_CBBU, INSN3OP_C0LU, MINSN3OP_ABC, MINSN3OP_ALC)
(MINSN3OP_ABL, MINSN3OP_ALL, MINSN3OP_0BC, MINSN3OP_0LC)
(MINSN3OP_0BL, MINSN3OP_0LL, MINSN3OP_ABU, MINSN3OP_ALU)
(MINSN3OP_0BU, MINSN3OP_0LU, MINSN3OP_BBS, MINSN3OP_0LS)
(MINSN3OP_CBBC, MINSN3OP_CBBL, MINSN3OP_C0LC, MINSN3OP_C0LL)
(MINSN3OP_CBBU, MINSN3OP_C0LU, INSN2OP_BC, INSN2OP_BL, INSN2OP_0C)
(INSN2OP_0L INSN2OP_BU, INSN2OP_0U, MINSN2OP_BC, MINSN2OP_BL)
(MINSN2OP_0C, MINSN2OP_0L, MINSN2OP_BU, MINSN2OP_0U): Define.
2016-03-29 20:49:22 +08:00
|
|
|
QUARKSE,
|
2015-10-07 21:20:19 +08:00
|
|
|
SHFT1,
|
|
|
|
SHFT2,
|
|
|
|
SWAP,
|
2016-04-05 23:37:29 +08:00
|
|
|
SP,
|
|
|
|
SPX
|
2015-10-07 21:20:19 +08:00
|
|
|
} insn_subclass_t;
|
|
|
|
|
|
|
|
/* Flags class. */
|
|
|
|
typedef enum
|
|
|
|
{
|
2016-04-06 22:08:04 +08:00
|
|
|
F_CLASS_NONE = 0,
|
arc/opcodes: Use flag operand class to handle multiple flag matches
When parsing the operand instruction flags we don't currently detect the
case where multiple flags are provided from the same class set, these
will be accepted and the bit values merged together, resulting in the
wrong instruction being assembled. For example:
adc.n.eq r0,r0,r2
Will assemble without error, yet, upon disassembly, the instruction will
actually be:
adc.c r0,r0,r2
In a later commit the concept of required flags will be introduced.
Required flags are just like normal instruction flags, except that they
must be present for the instruction to match. Adding this will allow
for simpler instructions in the instruction table, and allow for more
sharing of operand extraction and insertion functions.
To solve both of the above issues (multiple flags being invalid, and
required flags), this commit reworks the flag class mechanism.
Currently the flag class is never used. Each instruction can reference
multiple flag classes, each flag class has a class type and a set of
flags. However, at present, the class type is never used. The current
values identify the type of instruction that the flag will be used in,
but this is not required information.
Instead, this commit discards the old flag classes, and introduces 3 new
classes. The first F_CLASS_NONE, is just a NULL marker value, and is
only used in the NULL marker flag class. The other two flag classes are
F_FLAG_OPTIONAL, and F_FLAG_REQUIRED.
The class F_FLAG_OPTIONAL has the property that at most one of the flags
in the flag set for that class must be present in the instruction. The
"at most" one means that no flags being present is fine.
The class F_FLAG_REQUIRED is not currently used, but will be soon. With
this class, exactly one of the flags from this class must be present in
the instruction. If the flag class contains a single flag, then of
course that flag must be present. However, if the flag class contained
two or more, then one, and only one of them must be present.
gas/ChangeLog:
* config/tc-arc.c (find_opcode_match): Move lnflg, and i
declarations to start of block. Reset code on all flags before
attempting to match them. Handle multiple hits on the same flag.
Handle flag class.
* testsuite/gas/arc/asm-errors.d: New file.
* testsuite/gas/arc/asm-errors.err: New file.
* testsuite/gas/arc/asm-errors.s: New file.
include/ChangeLog:
* opcode/arc.h (flag_class_t): Remove all old flag classes, add 3
new classes instead.
opcodes/ChangeLog:
* arc-opc.c (arc_flag_classes): Convert all flag classes to use
the new class enum values.
2016-03-15 06:17:47 +08:00
|
|
|
|
|
|
|
/* At most one flag from the set of flags can appear in the
|
|
|
|
instruction. */
|
2016-04-06 22:08:04 +08:00
|
|
|
F_CLASS_OPTIONAL = (1 << 0),
|
arc/opcodes: Use flag operand class to handle multiple flag matches
When parsing the operand instruction flags we don't currently detect the
case where multiple flags are provided from the same class set, these
will be accepted and the bit values merged together, resulting in the
wrong instruction being assembled. For example:
adc.n.eq r0,r0,r2
Will assemble without error, yet, upon disassembly, the instruction will
actually be:
adc.c r0,r0,r2
In a later commit the concept of required flags will be introduced.
Required flags are just like normal instruction flags, except that they
must be present for the instruction to match. Adding this will allow
for simpler instructions in the instruction table, and allow for more
sharing of operand extraction and insertion functions.
To solve both of the above issues (multiple flags being invalid, and
required flags), this commit reworks the flag class mechanism.
Currently the flag class is never used. Each instruction can reference
multiple flag classes, each flag class has a class type and a set of
flags. However, at present, the class type is never used. The current
values identify the type of instruction that the flag will be used in,
but this is not required information.
Instead, this commit discards the old flag classes, and introduces 3 new
classes. The first F_CLASS_NONE, is just a NULL marker value, and is
only used in the NULL marker flag class. The other two flag classes are
F_FLAG_OPTIONAL, and F_FLAG_REQUIRED.
The class F_FLAG_OPTIONAL has the property that at most one of the flags
in the flag set for that class must be present in the instruction. The
"at most" one means that no flags being present is fine.
The class F_FLAG_REQUIRED is not currently used, but will be soon. With
this class, exactly one of the flags from this class must be present in
the instruction. If the flag class contains a single flag, then of
course that flag must be present. However, if the flag class contained
two or more, then one, and only one of them must be present.
gas/ChangeLog:
* config/tc-arc.c (find_opcode_match): Move lnflg, and i
declarations to start of block. Reset code on all flags before
attempting to match them. Handle multiple hits on the same flag.
Handle flag class.
* testsuite/gas/arc/asm-errors.d: New file.
* testsuite/gas/arc/asm-errors.err: New file.
* testsuite/gas/arc/asm-errors.s: New file.
include/ChangeLog:
* opcode/arc.h (flag_class_t): Remove all old flag classes, add 3
new classes instead.
opcodes/ChangeLog:
* arc-opc.c (arc_flag_classes): Convert all flag classes to use
the new class enum values.
2016-03-15 06:17:47 +08:00
|
|
|
|
|
|
|
/* Exactly one from from the set of flags must appear in the
|
|
|
|
instruction. */
|
2016-04-06 22:08:04 +08:00
|
|
|
F_CLASS_REQUIRED = (1 << 1),
|
|
|
|
|
|
|
|
/* The conditional code can be extended over the standard variants
|
|
|
|
via .extCondCode pseudo-op. */
|
|
|
|
F_CLASS_EXTEND = (1 << 2)
|
2015-10-07 21:20:19 +08:00
|
|
|
} flag_class_t;
|
|
|
|
|
|
|
|
/* The opcode table is an array of struct arc_opcode. */
|
|
|
|
struct arc_opcode
|
|
|
|
{
|
|
|
|
/* The opcode name. */
|
|
|
|
const char *name;
|
|
|
|
|
|
|
|
/* The opcode itself. Those bits which will be filled in with
|
|
|
|
operands are zeroes. */
|
|
|
|
unsigned opcode;
|
|
|
|
|
|
|
|
/* The opcode mask. This is used by the disassembler. This is a
|
|
|
|
mask containing ones indicating those bits which must match the
|
|
|
|
opcode field, and zeroes indicating those bits which need not
|
|
|
|
match (and are presumably filled in by operands). */
|
|
|
|
unsigned mask;
|
|
|
|
|
|
|
|
/* One bit flags for the opcode. These are primarily used to
|
|
|
|
indicate specific processors and environments support the
|
|
|
|
instructions. The defined values are listed below. */
|
|
|
|
unsigned cpu;
|
|
|
|
|
|
|
|
/* The instruction class. This is used by gdb. */
|
2016-05-23 23:25:46 +08:00
|
|
|
insn_class_t insn_class;
|
2015-10-07 21:20:19 +08:00
|
|
|
|
|
|
|
/* The instruction subclass. */
|
|
|
|
insn_subclass_t subclass;
|
|
|
|
|
|
|
|
/* An array of operand codes. Each code is an index into the
|
|
|
|
operand table. They appear in the order which the operands must
|
|
|
|
appear in assembly code, and are terminated by a zero. */
|
|
|
|
unsigned char operands[MAX_INSN_ARGS + 1];
|
|
|
|
|
|
|
|
/* An array of flag codes. Each code is an index into the flag
|
|
|
|
table. They appear in the order which the flags must appear in
|
|
|
|
assembly code, and are terminated by a zero. */
|
|
|
|
unsigned char flags[MAX_INSN_FLGS + 1];
|
|
|
|
};
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* The table itself is sorted by major opcode number, and is otherwise
|
|
|
|
in the order in which the disassembler should consider
|
|
|
|
instructions. */
|
|
|
|
extern const struct arc_opcode arc_opcodes[];
|
|
|
|
|
|
|
|
/* CPU Availability. */
|
2016-04-06 22:08:04 +08:00
|
|
|
#define ARC_OPCODE_NONE 0x0000
|
2015-10-07 21:20:19 +08:00
|
|
|
#define ARC_OPCODE_ARC600 0x0001 /* ARC 600 specific insns. */
|
|
|
|
#define ARC_OPCODE_ARC700 0x0002 /* ARC 700 specific insns. */
|
|
|
|
#define ARC_OPCODE_ARCv2EM 0x0004 /* ARCv2 EM specific insns. */
|
|
|
|
#define ARC_OPCODE_ARCv2HS 0x0008 /* ARCv2 HS specific insns. */
|
2016-03-16 05:51:50 +08:00
|
|
|
#define ARC_OPCODE_NPS400 0x0010 /* NPS400 specific insns. */
|
2015-10-07 21:20:19 +08:00
|
|
|
|
2016-04-06 22:08:04 +08:00
|
|
|
/* CPU combi. */
|
|
|
|
#define ARC_OPCODE_ARCALL (ARC_OPCODE_ARC600 | ARC_OPCODE_ARC700 \
|
|
|
|
| ARC_OPCODE_ARCv2EM | ARC_OPCODE_ARCv2HS)
|
|
|
|
#define ARC_OPCODE_ARCFPX (ARC_OPCODE_ARC700 | ARC_OPCODE_ARCv2EM)
|
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* CPU extensions. */
|
|
|
|
#define ARC_EA 0x0001
|
|
|
|
#define ARC_CD 0x0001 /* Mutual exclusive with EA. */
|
|
|
|
#define ARC_LLOCK 0x0002
|
|
|
|
#define ARC_ATOMIC 0x0002 /* Mutual exclusive with LLOCK. */
|
|
|
|
#define ARC_MPY 0x0004
|
|
|
|
#define ARC_MULT 0x0004
|
|
|
|
|
|
|
|
/* Floating point support. */
|
|
|
|
#define ARC_DPFP 0x0010
|
|
|
|
#define ARC_SPFP 0x0020
|
|
|
|
#define ARC_FPU 0x0030
|
2016-04-05 23:37:29 +08:00
|
|
|
#define ARC_FPUDA 0x0040
|
2015-10-07 21:20:19 +08:00
|
|
|
|
|
|
|
/* NORM & SWAP. */
|
|
|
|
#define ARC_SWAP 0x0100
|
|
|
|
#define ARC_NORM 0x0200
|
|
|
|
#define ARC_BSCAN 0x0200
|
|
|
|
|
|
|
|
/* A7 specific. */
|
|
|
|
#define ARC_UIX 0x1000
|
|
|
|
#define ARC_TSTAMP 0x1000
|
|
|
|
|
|
|
|
/* A6 specific. */
|
|
|
|
#define ARC_VBFDW 0x1000
|
|
|
|
#define ARC_BARREL 0x1000
|
|
|
|
#define ARC_DSPA 0x1000
|
|
|
|
|
|
|
|
/* EM specific. */
|
|
|
|
#define ARC_SHIFT 0x1000
|
|
|
|
|
|
|
|
/* V2 specific. */
|
|
|
|
#define ARC_INTR 0x1000
|
|
|
|
#define ARC_DIV 0x1000
|
|
|
|
|
|
|
|
/* V1 specific. */
|
|
|
|
#define ARC_XMAC 0x1000
|
|
|
|
#define ARC_CRC 0x1000
|
|
|
|
|
|
|
|
/* A macro to check for short instructions. */
|
|
|
|
#define ARC_SHORT(mask) \
|
|
|
|
(((mask) & 0xFFFF0000) ? 0 : 1)
|
|
|
|
|
|
|
|
/* The operands table is an array of struct arc_operand. */
|
|
|
|
struct arc_operand
|
|
|
|
{
|
|
|
|
/* The number of bits in the operand. */
|
|
|
|
unsigned int bits;
|
|
|
|
|
|
|
|
/* How far the operand is left shifted in the instruction. */
|
|
|
|
unsigned int shift;
|
|
|
|
|
|
|
|
/* The default relocation type for this operand. */
|
|
|
|
signed int default_reloc;
|
|
|
|
|
|
|
|
/* One bit syntax flags. */
|
|
|
|
unsigned int flags;
|
|
|
|
|
|
|
|
/* Insertion function. This is used by the assembler. To insert an
|
|
|
|
operand value into an instruction, check this field.
|
|
|
|
|
|
|
|
If it is NULL, execute
|
|
|
|
i |= (op & ((1 << o->bits) - 1)) << o->shift;
|
|
|
|
(i is the instruction which we are filling in, o is a pointer to
|
|
|
|
this structure, and op is the opcode value; this assumes twos
|
|
|
|
complement arithmetic).
|
|
|
|
|
|
|
|
If this field is not NULL, then simply call it with the
|
|
|
|
instruction and the operand value. It will return the new value
|
|
|
|
of the instruction. If the ERRMSG argument is not NULL, then if
|
|
|
|
the operand value is illegal, *ERRMSG will be set to a warning
|
|
|
|
string (the operand will be inserted in any case). If the
|
|
|
|
operand value is legal, *ERRMSG will be unchanged (most operands
|
|
|
|
can accept any value). */
|
|
|
|
unsigned (*insert) (unsigned instruction, int op, const char **errmsg);
|
|
|
|
|
|
|
|
/* Extraction function. This is used by the disassembler. To
|
|
|
|
extract this operand type from an instruction, check this field.
|
|
|
|
|
|
|
|
If it is NULL, compute
|
|
|
|
op = ((i) >> o->shift) & ((1 << o->bits) - 1);
|
|
|
|
if ((o->flags & ARC_OPERAND_SIGNED) != 0
|
|
|
|
&& (op & (1 << (o->bits - 1))) != 0)
|
|
|
|
op -= 1 << o->bits;
|
|
|
|
(i is the instruction, o is a pointer to this structure, and op
|
|
|
|
is the result; this assumes twos complement arithmetic).
|
|
|
|
|
|
|
|
If this field is not NULL, then simply call it with the
|
|
|
|
instruction value. It will return the value of the operand. If
|
|
|
|
the INVALID argument is not NULL, *INVALID will be set to
|
|
|
|
TRUE if this operand type can not actually be extracted from
|
|
|
|
this operand (i.e., the instruction does not match). If the
|
|
|
|
operand is valid, *INVALID will not be changed. */
|
|
|
|
int (*extract) (unsigned instruction, bfd_boolean *invalid);
|
|
|
|
};
|
2001-01-12 05:20:20 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Elements in the table are retrieved by indexing with values from
|
|
|
|
the operands field of the arc_opcodes table. */
|
|
|
|
extern const struct arc_operand arc_operands[];
|
|
|
|
extern const unsigned arc_num_operands;
|
|
|
|
extern const unsigned arc_Toperand;
|
|
|
|
extern const unsigned arc_NToperand;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Values defined for the flags field of a struct arc_operand. */
|
2001-01-12 05:20:20 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* This operand does not actually exist in the assembler input. This
|
|
|
|
is used to support extended mnemonics, for which two operands fields
|
|
|
|
are identical. The assembler should call the insert function with
|
|
|
|
any op value. The disassembler should call the extract function,
|
|
|
|
ignore the return value, and check the value placed in the invalid
|
|
|
|
argument. */
|
|
|
|
#define ARC_OPERAND_FAKE 0x0001
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* This operand names an integer register. */
|
|
|
|
#define ARC_OPERAND_IR 0x0002
|
2001-01-12 05:20:20 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* This operand takes signed values. */
|
|
|
|
#define ARC_OPERAND_SIGNED 0x0004
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* This operand takes unsigned values. This exists primarily so that
|
|
|
|
a flags value of 0 can be treated as end-of-arguments. */
|
|
|
|
#define ARC_OPERAND_UNSIGNED 0x0008
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* This operand takes long immediate values. */
|
|
|
|
#define ARC_OPERAND_LIMM 0x0010
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* This operand is identical like the previous one. */
|
|
|
|
#define ARC_OPERAND_DUPLICATE 0x0020
|
2001-01-12 05:20:20 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* This operand is PC relative. Used for internal relocs. */
|
|
|
|
#define ARC_OPERAND_PCREL 0x0040
|
2001-01-12 05:20:20 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* This operand is truncated. The truncation is done accordingly to
|
|
|
|
operand alignment attribute. */
|
|
|
|
#define ARC_OPERAND_TRUNCATE 0x0080
|
2001-01-12 05:20:20 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* This operand is 16bit aligned. */
|
|
|
|
#define ARC_OPERAND_ALIGNED16 0x0100
|
2001-01-12 05:20:20 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* This operand is 32bit aligned. */
|
|
|
|
#define ARC_OPERAND_ALIGNED32 0x0200
|
2001-01-12 05:20:20 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* This operand can be ignored by matching process if it is not
|
|
|
|
present. */
|
|
|
|
#define ARC_OPERAND_IGNORE 0x0400
|
2001-01-12 05:20:20 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Don't check the range when matching. */
|
|
|
|
#define ARC_OPERAND_NCHK 0x0800
|
2001-01-12 05:20:20 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Mark the braket possition. */
|
|
|
|
#define ARC_OPERAND_BRAKET 0x1000
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Mask for selecting the type for typecheck purposes. */
|
|
|
|
#define ARC_OPERAND_TYPECHECK_MASK \
|
|
|
|
(ARC_OPERAND_IR | \
|
|
|
|
ARC_OPERAND_LIMM | ARC_OPERAND_SIGNED | \
|
|
|
|
ARC_OPERAND_UNSIGNED | ARC_OPERAND_BRAKET)
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* The flags structure. */
|
|
|
|
struct arc_flag_operand
|
|
|
|
{
|
|
|
|
/* The flag name. */
|
|
|
|
const char *name;
|
2001-01-12 05:20:20 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* The flag code. */
|
|
|
|
unsigned code;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* The number of bits in the operand. */
|
|
|
|
unsigned int bits;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* How far the operand is left shifted in the instruction. */
|
|
|
|
unsigned int shift;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Available for disassembler. */
|
|
|
|
unsigned char favail;
|
2002-11-19 00:50:05 +08:00
|
|
|
};
|
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* The flag operands table. */
|
|
|
|
extern const struct arc_flag_operand arc_flag_operands[];
|
|
|
|
extern const unsigned arc_num_flag_operands;
|
2001-01-12 05:20:20 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* The flag's class structure. */
|
|
|
|
struct arc_flag_class
|
|
|
|
{
|
|
|
|
/* Flag class. */
|
2016-05-23 23:25:46 +08:00
|
|
|
flag_class_t flag_class;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* List of valid flags (codes). */
|
|
|
|
unsigned flags[256];
|
|
|
|
};
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
extern const struct arc_flag_class arc_flag_classes[];
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Structure for special cases. */
|
|
|
|
struct arc_flag_special
|
|
|
|
{
|
|
|
|
/* Name of special case instruction. */
|
|
|
|
const char *name;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* List of flags applicable for special case instruction. */
|
|
|
|
unsigned flags[32];
|
|
|
|
};
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
extern const struct arc_flag_special arc_flag_special_cases[];
|
|
|
|
extern const unsigned arc_num_flag_special;
|
|
|
|
|
|
|
|
/* Relocation equivalence structure. */
|
|
|
|
struct arc_reloc_equiv_tab
|
|
|
|
{
|
|
|
|
const char * name; /* String to lookup. */
|
|
|
|
const char * mnemonic; /* Extra matching condition. */
|
2015-12-04 18:49:57 +08:00
|
|
|
unsigned flags[32]; /* Extra matching condition. */
|
2015-10-07 21:20:19 +08:00
|
|
|
signed int oldreloc; /* Old relocation. */
|
|
|
|
signed int newreloc; /* New relocation. */
|
|
|
|
};
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
extern const struct arc_reloc_equiv_tab arc_reloc_equiv[];
|
|
|
|
extern const unsigned arc_num_equiv_tab;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Structure for operand operations for pseudo/alias instructions. */
|
|
|
|
struct arc_operand_operation
|
|
|
|
{
|
|
|
|
/* The index for operand from operand array. */
|
|
|
|
unsigned operand_idx;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Defines if it needs the operand inserted by the assembler or
|
|
|
|
whether this operand comes from the pseudo instruction's
|
|
|
|
operands. */
|
|
|
|
unsigned char needs_insert;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Count we have to add to the operand. Use negative number to
|
|
|
|
subtract from the operand. Also use this number to add to 0 if
|
|
|
|
the operand needs to be inserted (i.e. needs_insert == 1). */
|
|
|
|
int count;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Index of the operand to swap with. To be done AFTER applying
|
|
|
|
inc_count. */
|
|
|
|
unsigned swap_operand_idx;
|
1999-05-03 15:29:11 +08:00
|
|
|
};
|
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Structure for pseudo/alias instructions. */
|
|
|
|
struct arc_pseudo_insn
|
|
|
|
{
|
|
|
|
/* Mnemonic for pseudo/alias insn. */
|
|
|
|
const char *mnemonic_p;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Mnemonic for real instruction. */
|
|
|
|
const char *mnemonic_r;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Flag that will have to be added (if any). */
|
|
|
|
const char *flag_r;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Amount of operands. */
|
|
|
|
unsigned operand_cnt;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Array of operand operations. */
|
|
|
|
struct arc_operand_operation operand[6];
|
|
|
|
};
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
extern const struct arc_pseudo_insn arc_pseudo_insns[];
|
|
|
|
extern const unsigned arc_num_pseudo_insn;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
/* Structure for AUXILIARY registers. */
|
|
|
|
struct arc_aux_reg
|
|
|
|
{
|
|
|
|
/* Register address. */
|
|
|
|
int address;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2016-04-06 22:08:04 +08:00
|
|
|
/* One bit flags for the opcode. These are primarily used to
|
|
|
|
indicate specific processors and environments support the
|
|
|
|
instructions. */
|
|
|
|
unsigned cpu;
|
|
|
|
|
2016-04-05 23:37:29 +08:00
|
|
|
/* AUX register subclass. */
|
|
|
|
insn_subclass_t subclass;
|
|
|
|
|
|
|
|
/* Register name. */
|
2015-10-07 21:20:19 +08:00
|
|
|
const char *name;
|
|
|
|
|
|
|
|
/* Size of the string. */
|
|
|
|
size_t length;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern const struct arc_aux_reg arc_aux_regs[];
|
|
|
|
extern const unsigned arc_num_aux_regs;
|
|
|
|
|
Add support for ARC instruction relaxation in the assembler.
gas/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>
* config/tc-arc.h (TC_FRAG_TYPE, TC_PCREL_ADJUST, MAX_INSN_ARGS)
(MAX_INSN_FLGS, MAX_FLAG_NAME_LENGHT, TC_GENERIC_RELAX_TABLE):
Define.
(arc_flags, arc_relax_type): New structure.
* config/tc-arc.c (FRAG_MAX_GROWTH, RELAX_TABLE_ENTRY)
(RELAX_TABLE_ENTRY_MAX): New define.
(relaxation_state, md_relax_table, arc_relaxable_insns)
(arc_num_relaxable_ins): New variable.
(rlx_operand_type, arc_rlx_types): New enums.
(arc_relaxable_ins): New structure.
(OPTION_RELAX): New option.
(arc_insn): New relax member.
(arc_flags): Remove.
(relax_insn_p): New function.
(apply_fixups): Likewise.
(relaxable_operand): Likewise.
(may_relax_expr): Likewise.
(relaxable_flag): Likewise.
(arc_pcrel_adjust): Likewise.
(md_estimate_size_before_relax): Implement.
(md_convert_frag): Likewise.
(md_parse_option): Handle new mrelax option.
(md_show_usage): Likewise.
(assemble_insn): Set relax member.
(emit_insn0): New function.
(emit_insn1): Likewise.
(emit_insn): Handle relaxation case.
* NEWS: Mention the new relaxation option.
* doc/c-arc.texi (ARC Options): Document new mrelax option.
gas/testsuite
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
* gas/arc/relax-avoid1.d: New file.
* gas/arc/relax-avoid1.s: Likewise.
* gas/arc/relax-avoid2.d: Likewise.
* gas/arc/relax-avoid2.s: Likewise.
* gas/arc/relax-avoid3.d: Likewise.
* gas/arc/relax-avoid3.s: Likewise.
* gas/arc/relax-b.d: Likewise.
* gas/arc/relax-b.s: Likewise.
include/opcode/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>
* arc.h (arc_opcode arc_relax_opcodes, arc_num_relax_opcodes):
Declare.
opcodes/
2016-01-26 Claudiu Zissulescu <claziss@synopsys.com>
Janek van Oirschot <jvanoirs@synopsys.com>
* arc-opc.c (arc_relax_opcodes, arc_num_relax_opcodes): New
variable.
2016-02-10 20:09:01 +08:00
|
|
|
extern const struct arc_opcode arc_relax_opcodes[];
|
|
|
|
extern const unsigned arc_num_relax_opcodes;
|
|
|
|
|
arc/nps400 : New cmem instructions and associated relocation
Add support for arc/nps400 cmem instructions, these load and store
instructions are hard-wired to access "0x57f00000 + 16-bit-offset".
Supporting this relocation required some additions to the arc relocation
handling in the bfd library, as well as the standard changes required to
add a new relocation type.
There's a test of the new instructions in the assembler, and a test of
the relocation in the linker.
bfd/ChangeLog:
* reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
* elf32-arc.c: Add 'opcode/arc.h' include.
(struct arc_relocation_data): Add symbol_name.
(arc_special_overflow_checks): New function.
(arc_do_relocation): Use arc_special_overflow_checks, reindent as
required, add an extra comment.
(elf_arc_relocate_section): Setup symbol_name in reloc_data.
gas/ChangeLog:
* testsuite/gas/arc/nps400-3.d: New file.
* testsuite/gas/arc/nps400-3.s: New file.
include/ChangeLog:
* elf/arc-reloc.def: Add ARC_NPS_CMEM16 reloc.
* opcode/arc.h (NPS_CMEM_HIGH_VALUE): Define.
ld/ChangeLog:
* testsuite/ld-arc/arc.exp: New file.
* testsuite/ld-arc/nps-1.s: New file.
* testsuite/ld-arc/nps-1a.d: New file.
* testsuite/ld-arc/nps-1b.d: New file.
* testsuite/ld-arc/nps-1b.err: New file.
opcodes/ChangeLog:
* arc-nps400-tbl.h: Add xldb, xldw, xld, xstb, xstw, and xst
instructions.
* arc-opc.c (insert_nps_cmem_uimm16): New function.
(extract_nps_cmem_uimm16): New function.
(arc_operands): Add NPS_XLDST_UIMM16 operand.
2016-03-30 07:02:19 +08:00
|
|
|
/* Macro used for generating one class of NPS instructions. */
|
|
|
|
#define NPS_CMEM_HIGH_VALUE 0x57f0
|
|
|
|
|
[ARC] Add support for Quarkse opcodes.
gas/
2016-03-29 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/arc/ext2op.d: New file.
* testsuite/gas/arc/ext2op.s: Likewise.
* testsuite/gas/arc/ext3op.d: Likewise.
* testsuite/gas/arc/ext3op.s: Likewise.
opcodes/
2016-03-29 Claudiu Zissulescu <claziss@synopsys.com>
* arc-tbl.h (invld07): Remove.
* arc-ext-tbl.h: New file.
* arc-dis.c (FIELDA, FIELDB, FIELDC): Remove.
* arc-opc.c (arc_opcodes): Add ext-tbl include.
include/
2016-03-29 Claudiu Zissulescu <claziss@synopsys.com>
* opcode/arc.h (insn_subclass_t): Add QUARKSE subclass.
(FIELDA, FIELDB, FIELDC, FIELDF, FIELDQ, INSN3OP, INSN2OP)
(INSN2OP, INSN3OP_ABC, INSN3OP_ALC, INSN3OP_ABL, INSN3OP_ALL)
(INSN3OP_0BC, INSN3OP_0LC, INSN3OP_0BL, INSN3OP_0LL, INSN3OP_ABU)
(INSN3OP_ALU, INSN3OP_0BU, INSN3OP_0LU, INSN3OP_BBS, INSN3OP_0LS)
(INSN3OP_CBBC, INSN3OP_CBBL, INSN3OP_C0LC, INSN3OP_C0LL)
(INSN3OP_CBBU, INSN3OP_C0LU, MINSN3OP_ABC, MINSN3OP_ALC)
(MINSN3OP_ABL, MINSN3OP_ALL, MINSN3OP_0BC, MINSN3OP_0LC)
(MINSN3OP_0BL, MINSN3OP_0LL, MINSN3OP_ABU, MINSN3OP_ALU)
(MINSN3OP_0BU, MINSN3OP_0LU, MINSN3OP_BBS, MINSN3OP_0LS)
(MINSN3OP_CBBC, MINSN3OP_CBBL, MINSN3OP_C0LC, MINSN3OP_C0LL)
(MINSN3OP_CBBU, MINSN3OP_C0LU, INSN2OP_BC, INSN2OP_BL, INSN2OP_0C)
(INSN2OP_0L INSN2OP_BU, INSN2OP_0U, MINSN2OP_BC, MINSN2OP_BL)
(MINSN2OP_0C, MINSN2OP_0L, MINSN2OP_BU, MINSN2OP_0U): Define.
2016-03-29 20:49:22 +08:00
|
|
|
/* Macros to help generating regular pattern instructions. */
|
|
|
|
#define FIELDA(word) (word & 0x3F)
|
|
|
|
#define FIELDB(word) (((word & 0x07) << 24) | (((word >> 3) & 0x07) << 12))
|
|
|
|
#define FIELDC(word) ((word & 0x3F) << 6)
|
|
|
|
#define FIELDF (0x01 << 15)
|
|
|
|
#define FIELDQ (0x1F)
|
|
|
|
|
|
|
|
#define INSN3OP(MOP,SOP) (((MOP & 0x1F) << 27) | ((SOP & 0x3F) << 16))
|
|
|
|
#define INSN2OPX(MOP,SOP1,SOP2) (INSN3OP (MOP,SOP1) | (SOP2 & 0x3F))
|
|
|
|
#define INSN2OP(MOP,SOP) (INSN2OPX (MOP,0x2F,SOP))
|
|
|
|
|
|
|
|
#define INSN3OP_ABC(MOP,SOP) (INSN3OP (MOP,SOP))
|
|
|
|
#define INSN3OP_ALC(MOP,SOP) (INSN3OP (MOP,SOP) | FIELDB (62))
|
|
|
|
#define INSN3OP_ABL(MOP,SOP) (INSN3OP (MOP,SOP) | FIELDC (62))
|
|
|
|
#define INSN3OP_ALL(MOP,SOP) (INSN3OP (MOP,SOP) | FIELDB (62) | FIELDC (62))
|
|
|
|
#define INSN3OP_0BC(MOP,SOP) (INSN3OP (MOP,SOP) | FIELDA (62))
|
|
|
|
#define INSN3OP_0LC(MOP,SOP) (INSN3OP (MOP,SOP) | FIELDA (62) | FIELDB (62))
|
|
|
|
#define INSN3OP_0BL(MOP,SOP) (INSN3OP (MOP,SOP) | FIELDA (62) | FIELDC (62))
|
|
|
|
#define INSN3OP_0LL(MOP,SOP) \
|
|
|
|
(INSN3OP (MOP,SOP) | FIELDA (62) | FIELDB (62) | FIELDC (62))
|
|
|
|
#define INSN3OP_ABU(MOP,SOP) (INSN3OP (MOP,SOP) | (0x01 << 22))
|
|
|
|
#define INSN3OP_ALU(MOP,SOP) (INSN3OP (MOP,SOP) | (0x01 << 22) | FIELDB (62))
|
|
|
|
#define INSN3OP_0BU(MOP,SOP) (INSN3OP (MOP,SOP) | FIELDA (62) | (0x01 << 22))
|
|
|
|
#define INSN3OP_0LU(MOP,SOP) \
|
|
|
|
(INSN3OP (MOP,SOP) | FIELDA (62) | (0x01 << 22) | FIELDB (62))
|
|
|
|
#define INSN3OP_BBS(MOP,SOP) (INSN3OP (MOP,SOP) | (0x02 << 22))
|
|
|
|
#define INSN3OP_0LS(MOP,SOP) (INSN3OP (MOP,SOP) | (0x02 << 22) | FIELDB (62))
|
|
|
|
#define INSN3OP_CBBC(MOP,SOP) (INSN3OP (MOP,SOP) | (0x03 << 22))
|
|
|
|
#define INSN3OP_CBBL(MOP,SOP) (INSN3OP (MOP,SOP) | (0x03 << 22) | FIELDC (62))
|
|
|
|
#define INSN3OP_C0LC(MOP,SOP) (INSN3OP (MOP,SOP) | (0x03 << 22) | FIELDB (62))
|
|
|
|
#define INSN3OP_C0LL(MOP,SOP) \
|
|
|
|
(INSN3OP (MOP,SOP) | (0x03 << 22) | FIELDC (62) | FIELDB (62))
|
|
|
|
#define INSN3OP_CBBU(MOP,SOP) (INSN3OP (MOP,SOP) | (0x03 << 22) | (0x01 << 5))
|
|
|
|
#define INSN3OP_C0LU(MOP,SOP) \
|
|
|
|
(INSN3OP (MOP,SOP) | (0x03 << 22) | (0x01 << 5) | FIELDB (62))
|
|
|
|
|
|
|
|
#define MINSN3OP_ABC (~(FIELDF | FIELDA (63) | FIELDB (63) | FIELDC (63)))
|
|
|
|
#define MINSN3OP_ALC (~(FIELDF | FIELDA (63) | FIELDC (63)))
|
|
|
|
#define MINSN3OP_ABL (~(FIELDF | FIELDA (63) | FIELDB (63)))
|
|
|
|
#define MINSN3OP_ALL (~(FIELDF | FIELDA (63)))
|
|
|
|
#define MINSN3OP_0BC (~(FIELDF | FIELDB (63) | FIELDC (63)))
|
|
|
|
#define MINSN3OP_0LC (~(FIELDF | FIELDC (63)))
|
|
|
|
#define MINSN3OP_0BL (~(FIELDF | FIELDB (63)))
|
|
|
|
#define MINSN3OP_0LL (~(FIELDF))
|
|
|
|
#define MINSN3OP_ABU (~(FIELDF | FIELDA (63) | FIELDB (63) | FIELDC (63)))
|
|
|
|
#define MINSN3OP_ALU (~(FIELDF | FIELDA (63) | FIELDC (63)))
|
|
|
|
#define MINSN3OP_0BU (~(FIELDF | FIELDB (63) | FIELDC (63)))
|
|
|
|
#define MINSN3OP_0LU (~(FIELDF | FIELDC (63)))
|
|
|
|
#define MINSN3OP_BBS (~(FIELDF | FIELDA (63) | FIELDB (63) | FIELDC (63)))
|
|
|
|
#define MINSN3OP_0LS (~(FIELDF | FIELDA (63) | FIELDC (63)))
|
|
|
|
#define MINSN3OP_CBBC (~(FIELDF | FIELDQ | FIELDB (63) | FIELDC (63)))
|
|
|
|
#define MINSN3OP_CBBL (~(FIELDF | FIELDQ | FIELDB (63)))
|
|
|
|
#define MINSN3OP_C0LC (~(FIELDF | FIELDQ | FIELDC (63)))
|
|
|
|
#define MINSN3OP_C0LL (~(FIELDF | FIELDQ))
|
|
|
|
#define MINSN3OP_CBBU (~(FIELDF | FIELDQ | FIELDB (63) | FIELDC (63)))
|
|
|
|
#define MINSN3OP_C0LU (~(FIELDF | FIELDQ | FIELDC (63)))
|
|
|
|
|
|
|
|
#define INSN2OP_BC(MOP,SOP) (INSN2OP (MOP,SOP))
|
|
|
|
#define INSN2OP_BL(MOP,SOP) (INSN2OP (MOP,SOP) | FIELDC (62))
|
|
|
|
#define INSN2OP_0C(MOP,SOP) (INSN2OP (MOP,SOP) | FIELDB (62))
|
|
|
|
#define INSN2OP_0L(MOP,SOP) (INSN2OP (MOP,SOP) | FIELDB (62) | FIELDC (62))
|
|
|
|
#define INSN2OP_BU(MOP,SOP) (INSN2OP (MOP,SOP) | (0x01 << 22))
|
|
|
|
#define INSN2OP_0U(MOP,SOP) (INSN2OP (MOP,SOP) | (0x01 << 22) | FIELDB (62))
|
|
|
|
|
|
|
|
#define MINSN2OP_BC (~(FIELDF | FIELDB (63) | FIELDC (63)))
|
|
|
|
#define MINSN2OP_BL (~(FIELDF | FIELDB (63)))
|
|
|
|
#define MINSN2OP_0C (~(FIELDF | FIELDC (63)))
|
|
|
|
#define MINSN2OP_0L (~(FIELDF))
|
|
|
|
#define MINSN2OP_BU (~(FIELDF | FIELDB (63) | FIELDC (63)))
|
|
|
|
#define MINSN2OP_0U (~(FIELDF | FIELDC (63)))
|
|
|
|
|
Add support for .extInstruction pseudo-op.
gas/
2016-04-04 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/arc/textinsn-errors.d: New File.
* testsuite/gas/arc/textinsn-errors.err: Likewise.
* testsuite/gas/arc/textinsn-errors.s: Likewise.
* testsuite/gas/arc/textinsn2op.d: Likewise.
* testsuite/gas/arc/textinsn2op.s: Likewise.
* testsuite/gas/arc/textinsn2op01.d: Likewise.
* testsuite/gas/arc/textinsn2op01.s: Likewise.
* testsuite/gas/arc/textinsn3op.d: Likewise.
* testsuite/gas/arc/textinsn3op.s: Likewise.
* doc/c-arc.texi (ARC Directives): Add .extInstruction
documentation.
* config/tc-arc.c (arcext_section): New variable.
(arc_extinsn): New function.
(md_pseudo_table): Add .extInstruction pseudo op.
(attributes_t): New type.
(suffixclass, syntaxclass, syntaxclassmod): New constant
structures.
(find_opcode_match): Remove arc_num_opcodes.
(md_begin): Likewise.
(tokenize_extinsn): New function.
(arc_set_ext_seg): Likewise.
(create_extinst_section): Likewise.
include/
2016-04-04 Claudiu Zissulescu <claziss@synopsys.com>
* opcode/arc.h (arc_num_opcodes): Remove.
(ARC_SYNTAX_3OP, ARC_SYNTAX_2OP, ARC_OP1_MUST_BE_IMM)
(ARC_OP1_IMM_IMPLIED, ARC_SUFFIX_NONE, ARC_SUFFIX_COND)
(ARC_SUFFIX_FLAG): Define.
(flags_none, flags_f, flags_cc, flags_ccf): Declare.
(arg_none, arg_32bit_rarbrc, arg_32bit_zarbrc, arg_32bit_rbrbrc)
(arg_32bit_rarbu6, arg_32bit_zarbu6, arg_32bit_rbrbu6)
(arg_32bit_rbrbs12, arg_32bit_ralimmrc, arg_32bit_rarblimm)
(arg_32bit_zalimmrc, arg_32bit_zarblimm, arg_32bit_rbrblimm)
(arg_32bit_ralimmu6, arg_32bit_zalimmu6, arg_32bit_zalimms12)
(arg_32bit_ralimmlimm, arg_32bit_zalimmlimm, arg_32bit_rbrc)
(arg_32bit_zarc, arg_32bit_rbu6, arg_32bit_zau6, arg_32bit_rblimm)
(arg_32bit_zalimm, arg_32bit_limmrc, arg_32bit_limmu6)
(arg_32bit_limms12, arg_32bit_limmlimm): Likewise.
opcodes/
2016-04-04 Claudiu Zissulescu <claziss@synopsys.com>
* arc-opc.c (flags_none, flags_f, flags_cc, flags_ccf):
Initialize.
(arg_none, arg_32bit_rarbrc, arg_32bit_zarbrc, arg_32bit_rbrbrc)
(arg_32bit_rarbu6, arg_32bit_zarbu6, arg_32bit_rbrbu6)
(arg_32bit_rbrbs12, arg_32bit_ralimmrc, arg_32bit_rarblimm)
(arg_32bit_zalimmrc, arg_32bit_zarblimm, arg_32bit_rbrblimm)
(arg_32bit_ralimmu6, arg_32bit_zalimmu6, arg_32bit_zalimms12)
(arg_32bit_ralimmlimm, arg_32bit_zalimmlimm, arg_32bit_rbrc)
(arg_32bit_zarc, arg_32bit_rbu6, arg_32bit_zau6, arg_32bit_rblimm)
(arg_32bit_zalimm, arg_32bit_limmrc, arg_32bit_limmu6)
(arg_32bit_limms12, arg_32bit_limmlimm): Likewise.
(arc_opcode arc_opcodes): Null terminate the array.
(arc_num_opcodes): Remove.
* arc-ext.h (INSERT_XOP): Define.
(extInstruction_t): Likewise.
(arcExtMap_instName): Delete.
(arcExtMap_insn): New function.
(arcExtMap_genOpcode): Likewise.
* arc-ext.c (ExtInstruction): Remove.
(create_map): Zero initialize instruction fields.
(arcExtMap_instName): Remove.
(arcExtMap_insn): New function.
(dump_ARC_extmap): More info while debuging.
(arcExtMap_genOpcode): New function.
* arc-dis.c (find_format): New function.
(print_insn_arc): Use find_format.
(arc_get_disassembler): Enable dump_ARC_extmap only when
debugging.
Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
2016-04-04 22:03:53 +08:00
|
|
|
/* Various constants used when defining an extension instruction. */
|
|
|
|
#define ARC_SYNTAX_3OP (1 << 0)
|
|
|
|
#define ARC_SYNTAX_2OP (1 << 1)
|
2016-05-03 19:44:13 +08:00
|
|
|
#define ARC_SYNTAX_1OP (1 << 2)
|
|
|
|
#define ARC_SYNTAX_NOP (1 << 3)
|
|
|
|
#define ARC_SYNTAX_MASK (0x0F)
|
|
|
|
|
|
|
|
#define ARC_OP1_MUST_BE_IMM (1 << 0)
|
|
|
|
#define ARC_OP1_IMM_IMPLIED (1 << 1)
|
Add support for .extInstruction pseudo-op.
gas/
2016-04-04 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/arc/textinsn-errors.d: New File.
* testsuite/gas/arc/textinsn-errors.err: Likewise.
* testsuite/gas/arc/textinsn-errors.s: Likewise.
* testsuite/gas/arc/textinsn2op.d: Likewise.
* testsuite/gas/arc/textinsn2op.s: Likewise.
* testsuite/gas/arc/textinsn2op01.d: Likewise.
* testsuite/gas/arc/textinsn2op01.s: Likewise.
* testsuite/gas/arc/textinsn3op.d: Likewise.
* testsuite/gas/arc/textinsn3op.s: Likewise.
* doc/c-arc.texi (ARC Directives): Add .extInstruction
documentation.
* config/tc-arc.c (arcext_section): New variable.
(arc_extinsn): New function.
(md_pseudo_table): Add .extInstruction pseudo op.
(attributes_t): New type.
(suffixclass, syntaxclass, syntaxclassmod): New constant
structures.
(find_opcode_match): Remove arc_num_opcodes.
(md_begin): Likewise.
(tokenize_extinsn): New function.
(arc_set_ext_seg): Likewise.
(create_extinst_section): Likewise.
include/
2016-04-04 Claudiu Zissulescu <claziss@synopsys.com>
* opcode/arc.h (arc_num_opcodes): Remove.
(ARC_SYNTAX_3OP, ARC_SYNTAX_2OP, ARC_OP1_MUST_BE_IMM)
(ARC_OP1_IMM_IMPLIED, ARC_SUFFIX_NONE, ARC_SUFFIX_COND)
(ARC_SUFFIX_FLAG): Define.
(flags_none, flags_f, flags_cc, flags_ccf): Declare.
(arg_none, arg_32bit_rarbrc, arg_32bit_zarbrc, arg_32bit_rbrbrc)
(arg_32bit_rarbu6, arg_32bit_zarbu6, arg_32bit_rbrbu6)
(arg_32bit_rbrbs12, arg_32bit_ralimmrc, arg_32bit_rarblimm)
(arg_32bit_zalimmrc, arg_32bit_zarblimm, arg_32bit_rbrblimm)
(arg_32bit_ralimmu6, arg_32bit_zalimmu6, arg_32bit_zalimms12)
(arg_32bit_ralimmlimm, arg_32bit_zalimmlimm, arg_32bit_rbrc)
(arg_32bit_zarc, arg_32bit_rbu6, arg_32bit_zau6, arg_32bit_rblimm)
(arg_32bit_zalimm, arg_32bit_limmrc, arg_32bit_limmu6)
(arg_32bit_limms12, arg_32bit_limmlimm): Likewise.
opcodes/
2016-04-04 Claudiu Zissulescu <claziss@synopsys.com>
* arc-opc.c (flags_none, flags_f, flags_cc, flags_ccf):
Initialize.
(arg_none, arg_32bit_rarbrc, arg_32bit_zarbrc, arg_32bit_rbrbrc)
(arg_32bit_rarbu6, arg_32bit_zarbu6, arg_32bit_rbrbu6)
(arg_32bit_rbrbs12, arg_32bit_ralimmrc, arg_32bit_rarblimm)
(arg_32bit_zalimmrc, arg_32bit_zarblimm, arg_32bit_rbrblimm)
(arg_32bit_ralimmu6, arg_32bit_zalimmu6, arg_32bit_zalimms12)
(arg_32bit_ralimmlimm, arg_32bit_zalimmlimm, arg_32bit_rbrc)
(arg_32bit_zarc, arg_32bit_rbu6, arg_32bit_zau6, arg_32bit_rblimm)
(arg_32bit_zalimm, arg_32bit_limmrc, arg_32bit_limmu6)
(arg_32bit_limms12, arg_32bit_limmlimm): Likewise.
(arc_opcode arc_opcodes): Null terminate the array.
(arc_num_opcodes): Remove.
* arc-ext.h (INSERT_XOP): Define.
(extInstruction_t): Likewise.
(arcExtMap_instName): Delete.
(arcExtMap_insn): New function.
(arcExtMap_genOpcode): Likewise.
* arc-ext.c (ExtInstruction): Remove.
(create_map): Zero initialize instruction fields.
(arcExtMap_instName): Remove.
(arcExtMap_insn): New function.
(dump_ARC_extmap): More info while debuging.
(arcExtMap_genOpcode): New function.
* arc-dis.c (find_format): New function.
(print_insn_arc): Use find_format.
(arc_get_disassembler): Enable dump_ARC_extmap only when
debugging.
Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
2016-04-04 22:03:53 +08:00
|
|
|
|
|
|
|
#define ARC_SUFFIX_NONE (1 << 0)
|
|
|
|
#define ARC_SUFFIX_COND (1 << 1)
|
|
|
|
#define ARC_SUFFIX_FLAG (1 << 2)
|
|
|
|
|
2016-04-06 22:08:04 +08:00
|
|
|
#define ARC_REGISTER_READONLY (1 << 0)
|
|
|
|
#define ARC_REGISTER_WRITEONLY (1 << 1)
|
|
|
|
#define ARC_REGISTER_NOSHORT_CUT (1 << 2)
|
Add support for .extInstruction pseudo-op.
gas/
2016-04-04 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/arc/textinsn-errors.d: New File.
* testsuite/gas/arc/textinsn-errors.err: Likewise.
* testsuite/gas/arc/textinsn-errors.s: Likewise.
* testsuite/gas/arc/textinsn2op.d: Likewise.
* testsuite/gas/arc/textinsn2op.s: Likewise.
* testsuite/gas/arc/textinsn2op01.d: Likewise.
* testsuite/gas/arc/textinsn2op01.s: Likewise.
* testsuite/gas/arc/textinsn3op.d: Likewise.
* testsuite/gas/arc/textinsn3op.s: Likewise.
* doc/c-arc.texi (ARC Directives): Add .extInstruction
documentation.
* config/tc-arc.c (arcext_section): New variable.
(arc_extinsn): New function.
(md_pseudo_table): Add .extInstruction pseudo op.
(attributes_t): New type.
(suffixclass, syntaxclass, syntaxclassmod): New constant
structures.
(find_opcode_match): Remove arc_num_opcodes.
(md_begin): Likewise.
(tokenize_extinsn): New function.
(arc_set_ext_seg): Likewise.
(create_extinst_section): Likewise.
include/
2016-04-04 Claudiu Zissulescu <claziss@synopsys.com>
* opcode/arc.h (arc_num_opcodes): Remove.
(ARC_SYNTAX_3OP, ARC_SYNTAX_2OP, ARC_OP1_MUST_BE_IMM)
(ARC_OP1_IMM_IMPLIED, ARC_SUFFIX_NONE, ARC_SUFFIX_COND)
(ARC_SUFFIX_FLAG): Define.
(flags_none, flags_f, flags_cc, flags_ccf): Declare.
(arg_none, arg_32bit_rarbrc, arg_32bit_zarbrc, arg_32bit_rbrbrc)
(arg_32bit_rarbu6, arg_32bit_zarbu6, arg_32bit_rbrbu6)
(arg_32bit_rbrbs12, arg_32bit_ralimmrc, arg_32bit_rarblimm)
(arg_32bit_zalimmrc, arg_32bit_zarblimm, arg_32bit_rbrblimm)
(arg_32bit_ralimmu6, arg_32bit_zalimmu6, arg_32bit_zalimms12)
(arg_32bit_ralimmlimm, arg_32bit_zalimmlimm, arg_32bit_rbrc)
(arg_32bit_zarc, arg_32bit_rbu6, arg_32bit_zau6, arg_32bit_rblimm)
(arg_32bit_zalimm, arg_32bit_limmrc, arg_32bit_limmu6)
(arg_32bit_limms12, arg_32bit_limmlimm): Likewise.
opcodes/
2016-04-04 Claudiu Zissulescu <claziss@synopsys.com>
* arc-opc.c (flags_none, flags_f, flags_cc, flags_ccf):
Initialize.
(arg_none, arg_32bit_rarbrc, arg_32bit_zarbrc, arg_32bit_rbrbrc)
(arg_32bit_rarbu6, arg_32bit_zarbu6, arg_32bit_rbrbu6)
(arg_32bit_rbrbs12, arg_32bit_ralimmrc, arg_32bit_rarblimm)
(arg_32bit_zalimmrc, arg_32bit_zarblimm, arg_32bit_rbrblimm)
(arg_32bit_ralimmu6, arg_32bit_zalimmu6, arg_32bit_zalimms12)
(arg_32bit_ralimmlimm, arg_32bit_zalimmlimm, arg_32bit_rbrc)
(arg_32bit_zarc, arg_32bit_rbu6, arg_32bit_zau6, arg_32bit_rblimm)
(arg_32bit_zalimm, arg_32bit_limmrc, arg_32bit_limmu6)
(arg_32bit_limms12, arg_32bit_limmlimm): Likewise.
(arc_opcode arc_opcodes): Null terminate the array.
(arc_num_opcodes): Remove.
* arc-ext.h (INSERT_XOP): Define.
(extInstruction_t): Likewise.
(arcExtMap_instName): Delete.
(arcExtMap_insn): New function.
(arcExtMap_genOpcode): Likewise.
* arc-ext.c (ExtInstruction): Remove.
(create_map): Zero initialize instruction fields.
(arcExtMap_instName): Remove.
(arcExtMap_insn): New function.
(dump_ARC_extmap): More info while debuging.
(arcExtMap_genOpcode): New function.
* arc-dis.c (find_format): New function.
(print_insn_arc): Use find_format.
(arc_get_disassembler): Enable dump_ARC_extmap only when
debugging.
Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
2016-04-04 22:03:53 +08:00
|
|
|
|
|
|
|
/* Constants needed to initialize extension instructions. */
|
|
|
|
extern const unsigned char flags_none[MAX_INSN_FLGS + 1];
|
|
|
|
extern const unsigned char flags_f[MAX_INSN_FLGS + 1];
|
|
|
|
extern const unsigned char flags_cc[MAX_INSN_FLGS + 1];
|
|
|
|
extern const unsigned char flags_ccf[MAX_INSN_FLGS + 1];
|
|
|
|
|
|
|
|
extern const unsigned char arg_none[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_rarbrc[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_zarbrc[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_rbrbrc[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_rarbu6[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_zarbu6[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_rbrbu6[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_rbrbs12[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_ralimmrc[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_rarblimm[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_zalimmrc[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_zarblimm[MAX_INSN_ARGS + 1];
|
|
|
|
|
|
|
|
extern const unsigned char arg_32bit_rbrblimm[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_ralimmu6[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_zalimmu6[MAX_INSN_ARGS + 1];
|
|
|
|
|
|
|
|
extern const unsigned char arg_32bit_zalimms12[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_ralimmlimm[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_zalimmlimm[MAX_INSN_ARGS + 1];
|
|
|
|
|
|
|
|
extern const unsigned char arg_32bit_rbrc[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_zarc[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_rbu6[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_zau6[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_rblimm[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_zalimm[MAX_INSN_ARGS + 1];
|
|
|
|
|
|
|
|
extern const unsigned char arg_32bit_limmrc[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_limmu6[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_limms12[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_limmlimm[MAX_INSN_ARGS + 1];
|
|
|
|
|
2016-05-03 19:44:13 +08:00
|
|
|
extern const unsigned char arg_32bit_rc[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_u6[MAX_INSN_ARGS + 1];
|
|
|
|
extern const unsigned char arg_32bit_limm[MAX_INSN_ARGS + 1];
|
|
|
|
|
2015-10-07 21:20:19 +08:00
|
|
|
#endif /* OPCODE_ARC_H */
|