aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorMarcus Comstedt <marcus@mc.pp.se>2021-01-05 22:50:39 +0100
committerNelson Chu <nelson.chu@sifive.com>2021-01-06 18:01:41 +0800
commitf36ce378b46fd6a1451553e886502d39bec6edea (patch)
treed4af1f6edbf433bad6639c48a62fb981c00efb17 /gas
parentfbc09e7af715f19f6e5c700a9df6d13cdd05e1e5 (diff)
downloadgdb-f36ce378b46fd6a1451553e886502d39bec6edea.zip
gdb-f36ce378b46fd6a1451553e886502d39bec6edea.tar.gz
gdb-f36ce378b46fd6a1451553e886502d39bec6edea.tar.bz2
RISC-V: Fix riscv gas/ld testsuites failures for big endian.
Add riscv_choose_[ilp32|lp64]_emul, and use them to choose the correct linker script rather than set elf[32|64]lriscv directly. gas/ * testsuite/gas/riscv/li32.d: Accept bigriscv in addition to littleriscv. * testsuite/gas/riscv/li64.d: Likewise. * testsuite/gas/riscv/lla32.d: Likewise. * testsuite/gas/riscv/lla64.d: Likewise. * testsuite/gas/riscv/march-ok-g2.d: Likewise. * testsuite/gas/riscv/march-ok-g2_p1.d: Likewise. * testsuite/gas/riscv/march-ok-g2p0.d: Likewise. * testsuite/gas/riscv/march-ok-i2p0.d: Likewise. * testsuite/gas/riscv/march-ok-i2p0m2_a2f2.d: Likewise. * testsuite/gas/riscv/march-ok-nse-with-version.d: Likewise. * testsuite/gas/riscv/march-ok-two-nse.d: Likewise. ld/ * testsuite/ld-riscv-elf/ld-riscv-elf.exp: Added riscv_choose_[ilp32|lp64]_emul to choose the correct linker script. * testsuite/ld-riscv-elf/attr-merge-arch-01.d: Call riscv_choose_[ilp32|lp64]_emul instead of hardcoding elf[32|64]lriscv. * testsuite/ld-riscv-elf/attr-merge-arch-02.d: Likewise. * testsuite/ld-riscv-elf/attr-merge-arch-03.d: Likewise. * testsuite/ld-riscv-elf/attr-merge-arch-failed-01.d: Likewise. * testsuite/ld-riscv-elf/attr-merge-arch-failed-02.d: Likewise. * testsuite/ld-riscv-elf/c-lui-2.d: Likewise. * testsuite/ld-riscv-elf/c-lui.d: Likewise. * testsuite/ld-riscv-elf/call-relax.d: Likewise. * testsuite/ld-riscv-elf/pcrel-lo-addend-2.d: Likewise. * testsuite/ld-riscv-elf/pcrel-lo-addend.d: Likewise. * testsuite/ld-riscv-elf/weakref32.d: Accept bigriscv in addition to littleriscv. * testsuite/ld-riscv-elf/weakref64.d: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog15
-rw-r--r--gas/testsuite/gas/riscv/li32.d2
-rw-r--r--gas/testsuite/gas/riscv/li64.d2
-rw-r--r--gas/testsuite/gas/riscv/lla32.d2
-rw-r--r--gas/testsuite/gas/riscv/lla64.d2
-rw-r--r--gas/testsuite/gas/riscv/march-ok-g2.d2
-rw-r--r--gas/testsuite/gas/riscv/march-ok-g2_p1.d2
-rw-r--r--gas/testsuite/gas/riscv/march-ok-g2p0.d2
-rw-r--r--gas/testsuite/gas/riscv/march-ok-i2p0.d2
-rw-r--r--gas/testsuite/gas/riscv/march-ok-i2p0m2_a2f2.d2
-rw-r--r--gas/testsuite/gas/riscv/march-ok-nse-with-version.d2
-rw-r--r--gas/testsuite/gas/riscv/march-ok-two-nse.d2
12 files changed, 26 insertions, 11 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 57bc038..4c500ed 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,20 @@
2021-01-06 Marcus Comstedt <marcus@mc.pp.se>
+ * testsuite/gas/riscv/li32.d: Accept bigriscv in addition
+ to littleriscv.
+ * testsuite/gas/riscv/li64.d: Likewise.
+ * testsuite/gas/riscv/lla32.d: Likewise.
+ * testsuite/gas/riscv/lla64.d: Likewise.
+ * testsuite/gas/riscv/march-ok-g2.d: Likewise.
+ * testsuite/gas/riscv/march-ok-g2_p1.d: Likewise.
+ * testsuite/gas/riscv/march-ok-g2p0.d: Likewise.
+ * testsuite/gas/riscv/march-ok-i2p0.d: Likewise.
+ * testsuite/gas/riscv/march-ok-i2p0m2_a2f2.d: Likewise.
+ * testsuite/gas/riscv/march-ok-nse-with-version.d: Likewise.
+ * testsuite/gas/riscv/march-ok-two-nse.d: Likewise.
+
+2021-01-06 Marcus Comstedt <marcus@mc.pp.se>
+
* config/tc-riscv.c (riscv_target_format): Add elf64-bigriscv and
elf32-bigriscv.
(install_insn): Always write instructions as little endian.
diff --git a/gas/testsuite/gas/riscv/li32.d b/gas/testsuite/gas/riscv/li32.d
index ff0827d..947ea4f 100644
--- a/gas/testsuite/gas/riscv/li32.d
+++ b/gas/testsuite/gas/riscv/li32.d
@@ -1,7 +1,7 @@
#as: -march=rv32ic -mabi=ilp32
#objdump: -dr
-.*: file format elf32-littleriscv
+.*: file format elf32-(little|big)riscv
Disassembly of section .text:
diff --git a/gas/testsuite/gas/riscv/li64.d b/gas/testsuite/gas/riscv/li64.d
index 5421303..498b2e5 100644
--- a/gas/testsuite/gas/riscv/li64.d
+++ b/gas/testsuite/gas/riscv/li64.d
@@ -1,7 +1,7 @@
#as: -march=rv64ic -mabi=lp64
#objdump: -dr
-.*: file format elf64-littleriscv
+.*: file format elf64-(little|big)riscv
Disassembly of section .text:
diff --git a/gas/testsuite/gas/riscv/lla32.d b/gas/testsuite/gas/riscv/lla32.d
index ab766b4..9d87562 100644
--- a/gas/testsuite/gas/riscv/lla32.d
+++ b/gas/testsuite/gas/riscv/lla32.d
@@ -1,7 +1,7 @@
#as: -march=rv32i -mabi=ilp32
#objdump: -dr
-.*: file format elf32-littleriscv
+.*: file format elf32-(little|big)riscv
Disassembly of section .text:
diff --git a/gas/testsuite/gas/riscv/lla64.d b/gas/testsuite/gas/riscv/lla64.d
index 7848eec..c3b9581 100644
--- a/gas/testsuite/gas/riscv/lla64.d
+++ b/gas/testsuite/gas/riscv/lla64.d
@@ -1,7 +1,7 @@
#as: -march=rv64i -mabi=lp64
#objdump: -dr
-.*: file format elf64-littleriscv
+.*: file format elf64-(little|big)riscv
Disassembly of section .text:
diff --git a/gas/testsuite/gas/riscv/march-ok-g2.d b/gas/testsuite/gas/riscv/march-ok-g2.d
index 38541ad..7c92bc8 100644
--- a/gas/testsuite/gas/riscv/march-ok-g2.d
+++ b/gas/testsuite/gas/riscv/march-ok-g2.d
@@ -2,4 +2,4 @@
#objdump: -dr
#source: empty.s
-.*: file format elf32-littleriscv
+.*: file format elf32-(little|big)riscv
diff --git a/gas/testsuite/gas/riscv/march-ok-g2_p1.d b/gas/testsuite/gas/riscv/march-ok-g2_p1.d
index cd9e127..da2247c 100644
--- a/gas/testsuite/gas/riscv/march-ok-g2_p1.d
+++ b/gas/testsuite/gas/riscv/march-ok-g2_p1.d
@@ -2,4 +2,4 @@
#objdump: -dr
#source: empty.s
-.*: file format elf32-littleriscv
+.*: file format elf32-(little|big)riscv
diff --git a/gas/testsuite/gas/riscv/march-ok-g2p0.d b/gas/testsuite/gas/riscv/march-ok-g2p0.d
index b439314..a11d55e 100644
--- a/gas/testsuite/gas/riscv/march-ok-g2p0.d
+++ b/gas/testsuite/gas/riscv/march-ok-g2p0.d
@@ -2,4 +2,4 @@
#objdump: -dr
#source: empty.s
-.*: file format elf32-littleriscv
+.*: file format elf32-(little|big)riscv
diff --git a/gas/testsuite/gas/riscv/march-ok-i2p0.d b/gas/testsuite/gas/riscv/march-ok-i2p0.d
index eb8309c..e413e09 100644
--- a/gas/testsuite/gas/riscv/march-ok-i2p0.d
+++ b/gas/testsuite/gas/riscv/march-ok-i2p0.d
@@ -2,4 +2,4 @@
#objdump: -dr
#source: empty.s
-.*: file format elf32-littleriscv
+.*: file format elf32-(little|big)riscv
diff --git a/gas/testsuite/gas/riscv/march-ok-i2p0m2_a2f2.d b/gas/testsuite/gas/riscv/march-ok-i2p0m2_a2f2.d
index 6658417..11960ba 100644
--- a/gas/testsuite/gas/riscv/march-ok-i2p0m2_a2f2.d
+++ b/gas/testsuite/gas/riscv/march-ok-i2p0m2_a2f2.d
@@ -2,4 +2,4 @@
#objdump: -dr
#source: empty.s
-.*: file format elf32-littleriscv
+.*: file format elf32-(little|big)riscv
diff --git a/gas/testsuite/gas/riscv/march-ok-nse-with-version.d b/gas/testsuite/gas/riscv/march-ok-nse-with-version.d
index bdca7fb..8e2110c 100644
--- a/gas/testsuite/gas/riscv/march-ok-nse-with-version.d
+++ b/gas/testsuite/gas/riscv/march-ok-nse-with-version.d
@@ -2,4 +2,4 @@
#objdump: -dr
#source: empty.s
-.*: file format elf32-littleriscv
+.*: file format elf32-(little|big)riscv
diff --git a/gas/testsuite/gas/riscv/march-ok-two-nse.d b/gas/testsuite/gas/riscv/march-ok-two-nse.d
index e78cf9d..8cdf316 100644
--- a/gas/testsuite/gas/riscv/march-ok-two-nse.d
+++ b/gas/testsuite/gas/riscv/march-ok-two-nse.d
@@ -2,4 +2,4 @@
#objdump: -dr
#source: empty.s
-.*: file format elf32-littleriscv
+.*: file format elf32-(little|big)riscv