This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 1/4] [ARC] Add NPS400 instruction subclass and flag
- From: Graham Markall <graham dot markall at embecosm dot com>
- To: binutils at sourceware dot org
- Cc: Claudiu dot Zissulescu at synopsys dot com, Graham Markall <graham dot markall at embecosm dot com>
- Date: Fri, 17 Jun 2016 10:17:21 +0100
- Subject: [PATCH 1/4] [ARC] Add NPS400 instruction subclass and flag
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1466085017 dot git dot graham dot markall at embecosm dot com>
- References: <cover dot 1466085017 dot git dot graham dot markall at embecosm dot com>
gas/ChangeLog:
* config/tc-arc.c (check_cpu_feature, md_parse_option):
Add nps400 option and feature. Add check for nps400
feature.
include/ChangeLog:
* opcode/arc.h: Add nps400 extension and instruction
subclass.
---
gas/ChangeLog | 5 +++++
gas/config/tc-arc.c | 10 ++++++++++
include/ChangeLog | 4 ++++
include/opcode/arc.h | 4 +++-
4 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index 966b18d..7d03bcd 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -100,6 +100,7 @@ enum arc_rlx_types
#define is_fpuda_p(op) (((sc) == DPA))
#define is_br_jmp_insn_p(op) (((op)->insn_class == BRANCH || (op)->insn_class == JUMP))
#define is_kernel_insn_p(op) (((op)->insn_class == KERNEL))
+#define is_nps400_p(op) (((sc) == NPS400))
/* Generic assembler global variables which must be defined by all
targets. */
@@ -179,6 +180,7 @@ enum options
OPTION_MCPU,
OPTION_CD,
OPTION_RELAX,
+ OPTION_NPS400,
/* The following options are deprecated and provided here only for
compatibility reasons. */
@@ -221,6 +223,7 @@ struct option md_longopts[] =
{ "mHS", no_argument, NULL, OPTION_ARCHS },
{ "mcode-density", no_argument, NULL, OPTION_CD },
{ "mrelax", no_argument, NULL, OPTION_RELAX },
+ { "mnps400", no_argument, NULL, OPTION_NPS400 },
/* The following options are deprecated and provided here only for
compatibility reasons. */
@@ -1545,6 +1548,10 @@ check_cpu_feature (insn_subclass_t sc)
&& is_fpuda_p (sc))
return FALSE;
+ if (!(arc_features & ARC_NPS400)
+ && is_nps400_p (sc))
+ return FALSE;
+
return TRUE;
}
@@ -3341,6 +3348,9 @@ md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
relaxation_state = 1;
break;
+ case OPTION_NPS400:
+ arc_features |= ARC_NPS400;
+
case OPTION_USER_MODE:
case OPTION_LD_EXT_MASK:
case OPTION_SWAP:
diff --git a/include/opcode/arc.h b/include/opcode/arc.h
index adbae74..bd5d168 100644
--- a/include/opcode/arc.h
+++ b/include/opcode/arc.h
@@ -75,7 +75,8 @@ typedef enum
SHFT2,
SWAP,
SP,
- SPX
+ SPX,
+ NPS400
} insn_subclass_t;
/* Flags class. */
@@ -186,6 +187,7 @@ extern const struct arc_opcode arc_opcodes[];
#define ARC_ATOMIC 0x0002 /* Mutual exclusive with LLOCK. */
#define ARC_MPY 0x0004
#define ARC_MULT 0x0004
+#define ARC_NPS400 0x0008
/* Floating point support. */
#define ARC_DPFP 0x0010
--
2.5.5