RISC-V: PR25212, Report errors for invalid march and mabi combinations.
authorNelson Chu <nelson.chu@sifive.com>
Fri, 21 May 2021 07:40:33 +0000 (15:40 +0800)
committerNelson Chu <nelson.chu@sifive.com>
Mon, 24 May 2021 03:47:18 +0000 (11:47 +0800)
This patch clarify the following invalid combinations of march and mabi,
* ilp32f/lp64f abi without f extension.
* ilp32d/lp64d abi without d extension.
* ilp32q/lp64q abi without q extension.
* e extension with any abi except ilp32e

GNU assembler reports errors when finding the above invalid combinations.
But LLVM-MC reports warnings and ignores these invalid cases.  It help to
set the correct ilp32/lp64/ilp32e abi according to rv32/rv64/rve.  This
looks good and convenient, so perhaps we can do the same things.  However,
if you don't set the mabi, GNU assembler also try to set the suitable
ABI according to march/elf-attribute.  Compared to LLVM-MC, we will choose
double/quad abi if d/f extension is set.

gas/
    PR 25212
    * config/tc-riscv.c (riscv_set_abi_by_arch): If -mabi isn't set, we
    will choose ilp32e abi for rv32e.  Besides, report errors for the
    invalid march and mabi combinations.
    * testsuite/gas/riscv/mabi-attr-rv32e.s: New testcase.  Only accept
    ilp32e abi for rve extension.
    * testsuite/gas/riscv/mabi-fail-rv32e-lp64f.d: Likewise.
    * testsuite/gas/riscv/mabi-fail-rv32e-lp64f.l: Likewise.
    * testsuite/gas/riscv/mabi-fail-rv32e-lp64d.d: Likewise.
    * testsuite/gas/riscv/mabi-fail-rv32e-lp64d.l: Likewise.
    * testsuite/gas/riscv/mabi-fail-rv32e-lp64d.q: Likewise.
    * testsuite/gas/riscv/mabi-fail-rv32e-lp64d.q: Likewise.
    Renamed all mabi testcases to their march-mabi settings.

41 files changed:
gas/ChangeLog
gas/config/tc-riscv.c
gas/testsuite/gas/riscv/mabi-attr-01.s [deleted file]
gas/testsuite/gas/riscv/mabi-attr-02.s [deleted file]
gas/testsuite/gas/riscv/mabi-attr-03.s [deleted file]
gas/testsuite/gas/riscv/mabi-attr-rv32e.s [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-attr-rv32i.s [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-attr-rv32id.s [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-attr-rv64iq.s [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-fail-01.d [deleted file]
gas/testsuite/gas/riscv/mabi-fail-01.l [deleted file]
gas/testsuite/gas/riscv/mabi-fail-02.d [deleted file]
gas/testsuite/gas/riscv/mabi-fail-02.l [deleted file]
gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64d.d [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64d.l [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64f.d [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64f.l [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64q.d [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64q.l [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-fail-rv32i-lp64.d [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-fail-rv32i-lp64.l [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.d [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.l [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-noabi-attr-01a.d [deleted file]
gas/testsuite/gas/riscv/mabi-noabi-attr-01b.d [deleted file]
gas/testsuite/gas/riscv/mabi-noabi-attr-02a.d [deleted file]
gas/testsuite/gas/riscv/mabi-noabi-attr-02b.d [deleted file]
gas/testsuite/gas/riscv/mabi-noabi-attr-03a.d [deleted file]
gas/testsuite/gas/riscv/mabi-noabi-attr-03b.d [deleted file]
gas/testsuite/gas/riscv/mabi-noabi-attr-rv32i-01.d [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-noabi-attr-rv32i-02.d [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-noabi-attr-rv32id-01.d [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-noabi-attr-rv32id-02.d [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-noabi-attr-rv64iq-01.d [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-noabi-attr-rv64iq-02.d [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-noabi-march-01.d [deleted file]
gas/testsuite/gas/riscv/mabi-noabi-march-02.d [deleted file]
gas/testsuite/gas/riscv/mabi-noabi-march-03.d [deleted file]
gas/testsuite/gas/riscv/mabi-noabi-march-rv32i.d [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-noabi-march-rv32id.d [new file with mode: 0644]
gas/testsuite/gas/riscv/mabi-noabi-march-rv64iq.d [new file with mode: 0644]

index cf135d98d518c25cc44a8409a3caccf063f5f912..bc7a00fb223e9964c5d81541dafe3965eec23549 100644 (file)
@@ -1,3 +1,19 @@
+2021-05-24  Nelson Chu  <nelson.chu@sifive.com>
+
+       PR 25212
+       * config/tc-riscv.c (riscv_set_abi_by_arch): If -mabi isn't set, we
+       will choose ilp32e abi for rv32e.  Besides, report errors for the
+       invalid march and mabi combinations.
+       * testsuite/gas/riscv/mabi-attr-rv32e.s: New testcase.  Only accept
+       ilp32e abi for rve extension.
+       * testsuite/gas/riscv/mabi-fail-rv32e-lp64f.d: Likewise.
+       * testsuite/gas/riscv/mabi-fail-rv32e-lp64f.l: Likewise.
+       * testsuite/gas/riscv/mabi-fail-rv32e-lp64d.d: Likewise.
+       * testsuite/gas/riscv/mabi-fail-rv32e-lp64d.l: Likewise.
+       * testsuite/gas/riscv/mabi-fail-rv32e-lp64d.q: Likewise.
+       * testsuite/gas/riscv/mabi-fail-rv32e-lp64d.q: Likewise.
+       Renamed all mabi testcases to their march-mabi settings.
+
 2021-05-22  Alan Modra  <amodra@gmail.com>
 
        PR 25599
index 3fff33e9a11cefc88cde74cd37212ae22c0bfd77..a76e53d51c305cd26f242e596e582e793a8bfd12 100644 (file)
@@ -441,6 +441,8 @@ riscv_set_abi_by_arch (void)
        riscv_set_abi (xlen, FLOAT_ABI_QUAD, false);
       else if (riscv_subset_supports ("d"))
        riscv_set_abi (xlen, FLOAT_ABI_DOUBLE, false);
+      else if (riscv_subset_supports ("e"))
+       riscv_set_abi (xlen, FLOAT_ABI_SOFT, true);
       else
        riscv_set_abi (xlen, FLOAT_ABI_SOFT, false);
     }
@@ -451,6 +453,22 @@ riscv_set_abi_by_arch (void)
        as_bad ("can't have %d-bit ABI on %d-bit ISA", abi_xlen, xlen);
       else if (abi_xlen < xlen)
        as_bad ("%d-bit ABI not yet supported on %d-bit ISA", abi_xlen, xlen);
+
+      if (riscv_subset_supports ("e") && !rve_abi)
+       as_bad ("only the ilp32e ABI is supported for e extension");
+
+      if (float_abi == FLOAT_ABI_SINGLE
+         && !riscv_subset_supports ("f"))
+       as_bad ("ilp32f/lp64f ABI can't be used when f extension "
+               "isn't supported");
+      else if (float_abi == FLOAT_ABI_DOUBLE
+              && !riscv_subset_supports ("d"))
+       as_bad ("ilp32d/lp64d ABI can't be used when d extension "
+               "isn't supported");
+      else if (float_abi == FLOAT_ABI_QUAD
+              && !riscv_subset_supports ("q"))
+       as_bad ("ilp32q/lp64q ABI can't be used when q extension "
+               "isn't supported");
     }
 
   /* Update the EF_RISCV_FLOAT_ABI field of elf_flags.  */
diff --git a/gas/testsuite/gas/riscv/mabi-attr-01.s b/gas/testsuite/gas/riscv/mabi-attr-01.s
deleted file mode 100644 (file)
index 178f798..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-       .attribute arch,"rv32i"
-       .option pic
-       .extern foo
-       .text
-foo:
-       la      a0, foo
diff --git a/gas/testsuite/gas/riscv/mabi-attr-02.s b/gas/testsuite/gas/riscv/mabi-attr-02.s
deleted file mode 100644 (file)
index 667d1a6..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-       .attribute arch,"rv32ifd"
-       .option pic
-       .extern foo
-       .text
-foo:
-       la      a0, foo
diff --git a/gas/testsuite/gas/riscv/mabi-attr-03.s b/gas/testsuite/gas/riscv/mabi-attr-03.s
deleted file mode 100644 (file)
index 6be03e7..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-       .attribute arch,"rv64ifdq"
-       .option pic
-       .extern foo
-       .text
-foo:
-       la      a0, foo
diff --git a/gas/testsuite/gas/riscv/mabi-attr-rv32e.s b/gas/testsuite/gas/riscv/mabi-attr-rv32e.s
new file mode 100644 (file)
index 0000000..846c023
--- /dev/null
@@ -0,0 +1 @@
+       .attribute arch,"rv32e"
diff --git a/gas/testsuite/gas/riscv/mabi-attr-rv32i.s b/gas/testsuite/gas/riscv/mabi-attr-rv32i.s
new file mode 100644 (file)
index 0000000..178f798
--- /dev/null
@@ -0,0 +1,6 @@
+       .attribute arch,"rv32i"
+       .option pic
+       .extern foo
+       .text
+foo:
+       la      a0, foo
diff --git a/gas/testsuite/gas/riscv/mabi-attr-rv32id.s b/gas/testsuite/gas/riscv/mabi-attr-rv32id.s
new file mode 100644 (file)
index 0000000..667d1a6
--- /dev/null
@@ -0,0 +1,6 @@
+       .attribute arch,"rv32ifd"
+       .option pic
+       .extern foo
+       .text
+foo:
+       la      a0, foo
diff --git a/gas/testsuite/gas/riscv/mabi-attr-rv64iq.s b/gas/testsuite/gas/riscv/mabi-attr-rv64iq.s
new file mode 100644 (file)
index 0000000..6be03e7
--- /dev/null
@@ -0,0 +1,6 @@
+       .attribute arch,"rv64ifdq"
+       .option pic
+       .extern foo
+       .text
+foo:
+       la      a0, foo
diff --git a/gas/testsuite/gas/riscv/mabi-fail-01.d b/gas/testsuite/gas/riscv/mabi-fail-01.d
deleted file mode 100644 (file)
index 7804934..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#as: -march-attr -mabi=lp64d
-#source: mabi-attr-01.s
-#error_output: mabi-fail-01.l
diff --git a/gas/testsuite/gas/riscv/mabi-fail-01.l b/gas/testsuite/gas/riscv/mabi-fail-01.l
deleted file mode 100644 (file)
index 65bf0ac..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-.*Assembler messages:
-.*Error: can't have 64-bit ABI on 32-bit ISA
diff --git a/gas/testsuite/gas/riscv/mabi-fail-02.d b/gas/testsuite/gas/riscv/mabi-fail-02.d
deleted file mode 100644 (file)
index 2d6cfb0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#as: -march-attr -mabi=ilp32
-#source: mabi-attr-03.s
-#error_output: mabi-fail-02.l
diff --git a/gas/testsuite/gas/riscv/mabi-fail-02.l b/gas/testsuite/gas/riscv/mabi-fail-02.l
deleted file mode 100644 (file)
index 8d45a07..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-.*Assembler messages:
-.*Error: 32-bit ABI not yet supported on 64-bit ISA
diff --git a/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64d.d b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64d.d
new file mode 100644 (file)
index 0000000..04d402a
--- /dev/null
@@ -0,0 +1,3 @@
+#as: -march-attr -mabi=lp64d
+#source: mabi-attr-rv32e.s
+#error_output: mabi-fail-rv32e-lp64d.l
diff --git a/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64d.l b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64d.l
new file mode 100644 (file)
index 0000000..f7306cb
--- /dev/null
@@ -0,0 +1,4 @@
+.*Assembler messages:
+.*Error: can't have 64-bit ABI on 32-bit ISA
+.*Error: only the ilp32e ABI is supported for e extension
+.*Error: ilp32d/lp64d ABI can't be used when d extension isn't supported
diff --git a/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64f.d b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64f.d
new file mode 100644 (file)
index 0000000..b7a3464
--- /dev/null
@@ -0,0 +1,3 @@
+#as: -march-attr -mabi=lp64f
+#source: mabi-attr-rv32e.s
+#error_output: mabi-fail-rv32e-lp64f.l
diff --git a/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64f.l b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64f.l
new file mode 100644 (file)
index 0000000..706690a
--- /dev/null
@@ -0,0 +1,4 @@
+.*Assembler messages:
+.*Error: can't have 64-bit ABI on 32-bit ISA
+.*Error: only the ilp32e ABI is supported for e extension
+.*Error: ilp32f/lp64f ABI can't be used when f extension isn't supported
diff --git a/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64q.d b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64q.d
new file mode 100644 (file)
index 0000000..e5d3c4e
--- /dev/null
@@ -0,0 +1,3 @@
+#as: -march-attr -mabi=lp64q
+#source: mabi-attr-rv32e.s
+#error_output: mabi-fail-rv32e-lp64q.l
diff --git a/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64q.l b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64q.l
new file mode 100644 (file)
index 0000000..ab64b15
--- /dev/null
@@ -0,0 +1,4 @@
+.*Assembler messages:
+.*Error: can't have 64-bit ABI on 32-bit ISA
+.*Error: only the ilp32e ABI is supported for e extension
+.*Error: ilp32q/lp64q ABI can't be used when q extension isn't supported
diff --git a/gas/testsuite/gas/riscv/mabi-fail-rv32i-lp64.d b/gas/testsuite/gas/riscv/mabi-fail-rv32i-lp64.d
new file mode 100644 (file)
index 0000000..469a536
--- /dev/null
@@ -0,0 +1,3 @@
+#as: -march-attr -mabi=lp64
+#source: mabi-attr-rv32i.s
+#error_output: mabi-fail-rv32i-lp64.l
diff --git a/gas/testsuite/gas/riscv/mabi-fail-rv32i-lp64.l b/gas/testsuite/gas/riscv/mabi-fail-rv32i-lp64.l
new file mode 100644 (file)
index 0000000..65bf0ac
--- /dev/null
@@ -0,0 +1,2 @@
+.*Assembler messages:
+.*Error: can't have 64-bit ABI on 32-bit ISA
diff --git a/gas/testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.d b/gas/testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.d
new file mode 100644 (file)
index 0000000..e3155f4
--- /dev/null
@@ -0,0 +1,3 @@
+#as: -march-attr -mabi=ilp32
+#source: mabi-attr-rv64iq.s
+#error_output: mabi-fail-rv64iq-ilp32.l
diff --git a/gas/testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.l b/gas/testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.l
new file mode 100644 (file)
index 0000000..8d45a07
--- /dev/null
@@ -0,0 +1,2 @@
+.*Assembler messages:
+.*Error: 32-bit ABI not yet supported on 64-bit ISA
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-attr-01a.d b/gas/testsuite/gas/riscv/mabi-noabi-attr-01a.d
deleted file mode 100644 (file)
index 11d3ed9..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#as: -march-attr -march=rv64ifd
-#readelf: -h
-#source: mabi-attr-01.s
-
-ELF Header:
-#...
-[      ]+Class:[       ]+ELF32
-#...
-[      ]+Flags:[       ]+0x0
-#...
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-attr-01b.d b/gas/testsuite/gas/riscv/mabi-noabi-attr-01b.d
deleted file mode 100644 (file)
index b50ac3c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#as: -march-attr -march=rv64ifd
-#objdump: -d
-#source: mabi-attr-01.s
-
-.*:[   ]+file format elf32.*
-
-
-Disassembly of section .text:
-
-0+000 <foo>:
-#...
-[      ]+[0-9a-f]+:[   ]+00052503[     ]+lw[   ]+a0,0\(a0\) # .*
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-attr-02a.d b/gas/testsuite/gas/riscv/mabi-noabi-attr-02a.d
deleted file mode 100644 (file)
index 9668066..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#as: -march-attr -march=rv64i
-#readelf: -h
-#source: mabi-attr-02.s
-
-ELF Header:
-#...
-[      ]+Class:[       ]+ELF32
-#...
-[      ]+Flags:[       ]+0x4, double-float ABI
-#...
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-attr-02b.d b/gas/testsuite/gas/riscv/mabi-noabi-attr-02b.d
deleted file mode 100644 (file)
index a69d0bc..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#as: -march-attr -march=rv64i
-#objdump: -d
-#source: mabi-attr-02.s
-
-.*:[   ]+file format elf32.*
-
-
-Disassembly of section .text:
-
-0+000 <foo>:
-#...
-[      ]+[0-9a-f]+:[   ]+00052503[     ]+lw[   ]+a0,0\(a0\) # .*
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-attr-03a.d b/gas/testsuite/gas/riscv/mabi-noabi-attr-03a.d
deleted file mode 100644 (file)
index 4392b5c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#as: -march-attr -march=rv32i
-#readelf: -h
-#source: mabi-attr-03.s
-
-ELF Header:
-#...
-[      ]+Class:[       ]+ELF64
-#...
-[      ]+Flags:[       ]+0x6, quad-float ABI
-#...
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-attr-03b.d b/gas/testsuite/gas/riscv/mabi-noabi-attr-03b.d
deleted file mode 100644 (file)
index 917ab8c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#as: -march-attr -march=rv32i
-#objdump: -d
-#source: mabi-attr-03.s
-
-.*:[   ]+file format elf64.*
-
-
-Disassembly of section .text:
-
-0+000 <foo>:
-#...
-[      ]+[0-9a-f]+:[   ]+00053503[     ]+ld[   ]+a0,0\(a0\) # .*
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-attr-rv32i-01.d b/gas/testsuite/gas/riscv/mabi-noabi-attr-rv32i-01.d
new file mode 100644 (file)
index 0000000..b58b904
--- /dev/null
@@ -0,0 +1,10 @@
+#as: -march-attr -march=rv64id
+#readelf: -h
+#source: mabi-attr-rv32i.s
+
+ELF Header:
+#...
+[      ]+Class:[       ]+ELF32
+#...
+[      ]+Flags:[       ]+0x0
+#...
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-attr-rv32i-02.d b/gas/testsuite/gas/riscv/mabi-noabi-attr-rv32i-02.d
new file mode 100644 (file)
index 0000000..56dcd0f
--- /dev/null
@@ -0,0 +1,12 @@
+#as: -march-attr -march=rv64id
+#objdump: -d
+#source: mabi-attr-rv32i.s
+
+.*:[   ]+file format elf32.*
+
+
+Disassembly of section .text:
+
+0+000 <foo>:
+#...
+[      ]+[0-9a-f]+:[   ]+00052503[     ]+lw[   ]+a0,0\(a0\) # .*
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-attr-rv32id-01.d b/gas/testsuite/gas/riscv/mabi-noabi-attr-rv32id-01.d
new file mode 100644 (file)
index 0000000..425e5d1
--- /dev/null
@@ -0,0 +1,10 @@
+#as: -march-attr -march=rv64i
+#readelf: -h
+#source: mabi-attr-rv32id.s
+
+ELF Header:
+#...
+[      ]+Class:[       ]+ELF32
+#...
+[      ]+Flags:[       ]+0x4, double-float ABI
+#...
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-attr-rv32id-02.d b/gas/testsuite/gas/riscv/mabi-noabi-attr-rv32id-02.d
new file mode 100644 (file)
index 0000000..8b7ee68
--- /dev/null
@@ -0,0 +1,12 @@
+#as: -march-attr -march=rv64i
+#objdump: -d
+#source: mabi-attr-rv32id.s
+
+.*:[   ]+file format elf32.*
+
+
+Disassembly of section .text:
+
+0+000 <foo>:
+#...
+[      ]+[0-9a-f]+:[   ]+00052503[     ]+lw[   ]+a0,0\(a0\) # .*
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-attr-rv64iq-01.d b/gas/testsuite/gas/riscv/mabi-noabi-attr-rv64iq-01.d
new file mode 100644 (file)
index 0000000..0251a00
--- /dev/null
@@ -0,0 +1,10 @@
+#as: -march-attr -march=rv32i
+#readelf: -h
+#source: mabi-attr-rv64iq.s
+
+ELF Header:
+#...
+[      ]+Class:[       ]+ELF64
+#...
+[      ]+Flags:[       ]+0x6, quad-float ABI
+#...
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-attr-rv64iq-02.d b/gas/testsuite/gas/riscv/mabi-noabi-attr-rv64iq-02.d
new file mode 100644 (file)
index 0000000..6a33ba0
--- /dev/null
@@ -0,0 +1,12 @@
+#as: -march-attr -march=rv32i
+#objdump: -d
+#source: mabi-attr-rv64iq.s
+
+.*:[   ]+file format elf64.*
+
+
+Disassembly of section .text:
+
+0+000 <foo>:
+#...
+[      ]+[0-9a-f]+:[   ]+00053503[     ]+ld[   ]+a0,0\(a0\) # .*
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-march-01.d b/gas/testsuite/gas/riscv/mabi-noabi-march-01.d
deleted file mode 100644 (file)
index 8ca280e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#as: -march=rv32i
-#readelf: -h
-#source: empty.s
-
-ELF Header:
-#...
-[      ]+Class:[       ]+ELF32
-#...
-[      ]+Flags:[       ]+0x0
-#...
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-march-02.d b/gas/testsuite/gas/riscv/mabi-noabi-march-02.d
deleted file mode 100644 (file)
index 453fe7b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#as: -march=rv32ifd
-#readelf: -h
-#source: empty.s
-
-ELF Header:
-#...
-[      ]+Class:[       ]+ELF32
-#...
-[      ]+Flags:[       ]+0x4, double-float ABI
-#...
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-march-03.d b/gas/testsuite/gas/riscv/mabi-noabi-march-03.d
deleted file mode 100644 (file)
index ab2ffc3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#as: -march=rv64ifdq
-#readelf: -h
-#source: empty.s
-
-ELF Header:
-#...
-[      ]+Class:[       ]+ELF64
-#...
-[      ]+Flags:[       ]+0x6, quad-float ABI
-#...
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-march-rv32i.d b/gas/testsuite/gas/riscv/mabi-noabi-march-rv32i.d
new file mode 100644 (file)
index 0000000..8ca280e
--- /dev/null
@@ -0,0 +1,10 @@
+#as: -march=rv32i
+#readelf: -h
+#source: empty.s
+
+ELF Header:
+#...
+[      ]+Class:[       ]+ELF32
+#...
+[      ]+Flags:[       ]+0x0
+#...
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-march-rv32id.d b/gas/testsuite/gas/riscv/mabi-noabi-march-rv32id.d
new file mode 100644 (file)
index 0000000..9ef28ab
--- /dev/null
@@ -0,0 +1,10 @@
+#as: -march=rv32id
+#readelf: -h
+#source: empty.s
+
+ELF Header:
+#...
+[      ]+Class:[       ]+ELF32
+#...
+[      ]+Flags:[       ]+0x4, double-float ABI
+#...
diff --git a/gas/testsuite/gas/riscv/mabi-noabi-march-rv64iq.d b/gas/testsuite/gas/riscv/mabi-noabi-march-rv64iq.d
new file mode 100644 (file)
index 0000000..3de0eb7
--- /dev/null
@@ -0,0 +1,10 @@
+#as: -march=rv64iq
+#readelf: -h
+#source: empty.s
+
+ELF Header:
+#...
+[      ]+Class:[       ]+ELF64
+#...
+[      ]+Flags:[       ]+0x6, quad-float ABI
+#...