This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v3 5/5] [ARC]: Add -mcpu=nps400 command line option


From: Andrew Burgess <andrew.burgess@embecosm.com>

The NPS400 is the name of an ARC700 variant with a specific extension
set.  This commit adds the command line option -mcpu=nps400 which can be
used as an alternative to '-mcpu=arc700 -mnps400'.

gas/ChangeLog:

        * config/tc-arc.c (md_show_usage): Add help on -mcpu=nps400.
        * config/tc-arc.c (cpu_types): Add entry for nps400 as arc700 plus
        nps400 extension set.
        * doc/c-arc.texi: Document -mcpu=nps400.
        * testsuite/gas/arc/nps-400-0.d: Test using NPS-400 using -mcpu=nps400
        as an alternative to -mcpu=arc700 -mnps400.
        flags
---
 gas/ChangeLog                    | 12 ++++++++++++
 gas/config/tc-arc.c              |  3 +++
 gas/doc/c-arc.texi               |  4 ++++
 gas/testsuite/gas/arc/nps400-0.d |  2 +-
 4 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index f7e84d7..b192117 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -428,6 +428,8 @@ static const struct cpu_type
     E_ARC_MACH_ARC600,  0x00},
   { "arc700", ARC_OPCODE_ARC700,  bfd_mach_arc_arc700,
     E_ARC_MACH_ARC700,  0x00},
+  { "nps400", ARC_OPCODE_ARC700 , bfd_mach_arc_arc700,
+    E_ARC_MACH_ARC700,  ARC_NPS400},
   { "arcem",  ARC_OPCODE_ARCv2EM, bfd_mach_arc_arcv2,
     EF_ARC_CPU_ARCV2EM, 0x00},
   { "archs",  ARC_OPCODE_ARCv2HS, bfd_mach_arc_arcv2,
@@ -3399,6 +3401,7 @@ md_show_usage (FILE *stream)
   fprintf (stream, _("ARC-specific assembler options:\n"));
 
   fprintf (stream, "  -mcpu=<cpu name>\t  assemble for CPU <cpu name>\n");
+  fprintf (stream, "  -mcpu=nps400\t\t  same as -mcpu=arc700 -mnps400\n");
   fprintf (stream, "  -mA6/-mARC600/-mARC601  same as -mcpu=arc600\n");
   fprintf (stream, "  -mA7/-mARC700\t\t  same as -mcpu=arc700\n");
   fprintf (stream, "  -mEM\t\t\t  same as -mcpu=arcem\n");
diff --git a/gas/doc/c-arc.texi b/gas/doc/c-arc.texi
index 4969795..64522db 100644
--- a/gas/doc/c-arc.texi
+++ b/gas/doc/c-arc.texi
@@ -64,6 +64,10 @@ Assemble for ARC EM.  Aliases: @code{-mEM}
 @cindex @code{mHS} command line option, ARC
 Assemble for ARC HS.  Aliases: @code{-mHS}, @code{-mav2hs}.
 
+@item nps400
+@cindex @code{mnps400} command line option, ARC
+Assemble for ARC 700 with NPS-400 extended instructions.
+
 @end table
 
 Note: the @code{.cpu} directive (@pxref{ARC Directives}) can
diff --git a/gas/testsuite/gas/arc/nps400-0.d b/gas/testsuite/gas/arc/nps400-0.d
index 720a338..e5920c8 100644
--- a/gas/testsuite/gas/arc/nps400-0.d
+++ b/gas/testsuite/gas/arc/nps400-0.d
@@ -1,4 +1,4 @@
-#as: -mcpu=arc700 -mnps400
+#as: -mcpu=nps400
 #readelf: -h
 
 #...
-- 
2.5.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]