aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-arc.c
diff options
context:
space:
mode:
authorClaudiu Zissulescu <claziss@synopsys.com>2016-05-03 13:44:13 +0200
committerClaudiu Zissulescu <claziss@synopsys.com>2016-05-04 16:18:32 +0200
commit945e0f82dad31db89a107b496532886fe215c011 (patch)
tree2d9fda4f448c3e7347ffb9cad26bb9a831e70bd8 /gas/config/tc-arc.c
parentedf689f02787121a49ea0e36cfaa051b06852c8b (diff)
downloadgdb-945e0f82dad31db89a107b496532886fe215c011.zip
gdb-945e0f82dad31db89a107b496532886fe215c011.tar.gz
gdb-945e0f82dad31db89a107b496532886fe215c011.tar.bz2
[ARC] Add SYNTAX_NOP and SYNTAX_1OP for extension instructions
gas/ 2016-05-03 Claudiu Zissulescu <claziss@synopsys.com> * config/tc-arc.c (syntaxclass): Add SYNTAX_NOP and SYNTAX_1OP. (arc_extinsn): Handle new introduced syntax. * testsuite/gas/arc/textinsn1op.d: New file. * testsuite/gas/arc/textinsn1op.s: Likewise. * doc/c-arc.texi: Document SYNTAX_NOP and SYNTAX_1OP. opcodes/ 2016-05-03 Claudiu Zissulescu <claziss@synopsys.com> * arc-ext.c (dump_ARC_extmap): Handle SYNATX_NOP and SYNTAX_1OP. (arcExtMap_genOpcode): Likewise. * arc-opc.c (arg_32bit_rc): Define new variable. (arg_32bit_u6): Likewise. (arg_32bit_limm): Likewise. include/ 2016-05-03 Claudiu Zissulescu <claziss@synopsys.com> * opcode/arc.h (ARC_SYNTAX_1OP): Declare (ARC_SYNTAX_NOP): Likewsie. (ARC_OP1_MUST_BE_IMM): Update defined value. (ARC_OP1_IMM_IMPLIED): Likewise. (arg_32bit_rc, arg_32bit_u6, arg_32bit_limm): Declare.
Diffstat (limited to 'gas/config/tc-arc.c')
-rw-r--r--gas/config/tc-arc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index 169b05c..b64174f 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -337,7 +337,9 @@ static const attributes_t suffixclass[] =
static const attributes_t syntaxclass[] =
{
{ "SYNTAX_3OP", 10, ARC_SYNTAX_3OP },
- { "SYNTAX_2OP", 10, ARC_SYNTAX_2OP }
+ { "SYNTAX_2OP", 10, ARC_SYNTAX_2OP },
+ { "SYNTAX_1OP", 10, ARC_SYNTAX_1OP },
+ { "SYNTAX_NOP", 10, ARC_SYNTAX_NOP }
};
/* Extension instruction syntax classes modifiers. */
@@ -4233,13 +4235,15 @@ arc_extinsn (int ignore ATTRIBUTE_UNUSED)
&& (einsn.major != 5) && (einsn.major != 9))
as_fatal (_("minor opcode not in range [0x00 - 0x3f]"));
- switch (einsn.syntax & (ARC_SYNTAX_3OP | ARC_SYNTAX_2OP))
+ switch (einsn.syntax & ARC_SYNTAX_MASK)
{
case ARC_SYNTAX_3OP:
if (einsn.modsyn & ARC_OP1_IMM_IMPLIED)
as_fatal (_("Improper use of OP1_IMM_IMPLIED"));
break;
case ARC_SYNTAX_2OP:
+ case ARC_SYNTAX_1OP:
+ case ARC_SYNTAX_NOP:
if (einsn.modsyn & ARC_OP1_MUST_BE_IMM)
as_fatal (_("Improper use of OP1_MUST_BE_IMM"));
break;