[PATCH] [ARC] Fix ".cpu NPS400"
Graham Markall
graham.markall@embecosm.com
Mon Oct 31 09:57:00 GMT 2016
An entry for NPS400 was not present in the arch_info_struct, which
prevents "NPS400" from being considered a valid argument to the
.cpu directive.
This commit adds an entry for NPS400 and a suitable test.
Tested with ARC big- and little-endian targets on an x86_64 host.
bfd/ChangeLog:
* cpu-arc.c: Add NPS400 to arch_info_struct.
gas/ChangeLog:
* testsuite/gas/arc/nps400-cpu.d: Added.
* testsuite/gas/arc/nps400-cpu.s: Added.
---
bfd/ChangeLog | 4 ++++
bfd/cpu-arc.c | 5 +++--
gas/ChangeLog | 5 +++++
gas/testsuite/gas/arc/nps400-cpu.d | 9 +++++++++
gas/testsuite/gas/arc/nps400-cpu.s | 5 +++++
5 files changed, 26 insertions(+), 2 deletions(-)
create mode 100644 gas/testsuite/gas/arc/nps400-cpu.d
create mode 100644 gas/testsuite/gas/arc/nps400-cpu.s
diff --git a/bfd/cpu-arc.c b/bfd/cpu-arc.c
index e63f3c1..1805a7b 100644
--- a/bfd/cpu-arc.c
+++ b/bfd/cpu-arc.c
@@ -47,8 +47,9 @@ static const bfd_arch_info_type arch_info_struct[] =
ARC (bfd_mach_arc_arc601, "ARC601", FALSE, &arch_info_struct[3]),
ARC (bfd_mach_arc_arc700, "ARC700", FALSE, &arch_info_struct[4]),
ARC (bfd_mach_arc_arc700, "A7", FALSE, &arch_info_struct[5]),
- ARC (bfd_mach_arc_arcv2, "ARCv2", FALSE, &arch_info_struct[6]),
- ARC (bfd_mach_arc_arcv2, "EM", FALSE, &arch_info_struct[7]),
+ ARC (bfd_mach_arc_arc700, "NPS400", FALSE, &arch_info_struct[6]),
+ ARC (bfd_mach_arc_arcv2, "ARCv2", FALSE, &arch_info_struct[7]),
+ ARC (bfd_mach_arc_arcv2, "EM", FALSE, &arch_info_struct[8]),
ARC (bfd_mach_arc_arcv2, "HS", FALSE, NULL),
};
diff --git a/gas/testsuite/gas/arc/nps400-cpu.d b/gas/testsuite/gas/arc/nps400-cpu.d
new file mode 100644
index 0000000..1c9e9f8
--- /dev/null
+++ b/gas/testsuite/gas/arc/nps400-cpu.d
@@ -0,0 +1,9 @@
+#as:
+#objdump: -dr
+
+.*: +file format .*arc.*
+
+Disassembly of section .text:
+
+[0-9a-f]+ <.*>:
+ 0: 3c2e 150a rflt r10,r12,r20
diff --git a/gas/testsuite/gas/arc/nps400-cpu.s b/gas/testsuite/gas/arc/nps400-cpu.s
new file mode 100644
index 0000000..a0ea5e3
--- /dev/null
+++ b/gas/testsuite/gas/arc/nps400-cpu.s
@@ -0,0 +1,5 @@
+ .cpu NPS400
+
+ .text
+ rflt r10,r12,r20
+
--
2.7.4
More information about the Binutils
mailing list