From: Nelson Chu Date: Fri, 21 May 2021 07:40:33 +0000 (+0800) Subject: RISC-V: PR25212, Report errors for invalid march and mabi combinations. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d0ed830d362fb8bb200a4f52bf973ba30920802;p=binutils-gdb.git RISC-V: PR25212, Report errors for invalid march and mabi combinations. 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. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index cf135d98d51..bc7a00fb223 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,19 @@ +2021-05-24 Nelson Chu + + 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 PR 25599 diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index 3fff33e9a11..a76e53d51c3 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -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 index 178f798cc99..00000000000 --- a/gas/testsuite/gas/riscv/mabi-attr-01.s +++ /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 index 667d1a65ae7..00000000000 --- a/gas/testsuite/gas/riscv/mabi-attr-02.s +++ /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 index 6be03e76f5e..00000000000 --- a/gas/testsuite/gas/riscv/mabi-attr-03.s +++ /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 index 00000000000..846c0236bcb --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-attr-rv32e.s @@ -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 index 00000000000..178f798cc99 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-attr-rv32i.s @@ -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 index 00000000000..667d1a65ae7 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-attr-rv32id.s @@ -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 index 00000000000..6be03e76f5e --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-attr-rv64iq.s @@ -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 index 78049349330..00000000000 --- a/gas/testsuite/gas/riscv/mabi-fail-01.d +++ /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 index 65bf0ac9b84..00000000000 --- a/gas/testsuite/gas/riscv/mabi-fail-01.l +++ /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 index 2d6cfb02465..00000000000 --- a/gas/testsuite/gas/riscv/mabi-fail-02.d +++ /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 index 8d45a07fd36..00000000000 --- a/gas/testsuite/gas/riscv/mabi-fail-02.l +++ /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 index 00000000000..04d402aa976 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64d.d @@ -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 index 00000000000..f7306cb24d2 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64d.l @@ -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 index 00000000000..b7a346465c7 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64f.d @@ -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 index 00000000000..706690ac9c6 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64f.l @@ -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 index 00000000000..e5d3c4e5d15 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64q.d @@ -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 index 00000000000..ab64b1546f6 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-fail-rv32e-lp64q.l @@ -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 index 00000000000..469a53611fb --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-fail-rv32i-lp64.d @@ -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 index 00000000000..65bf0ac9b84 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-fail-rv32i-lp64.l @@ -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 index 00000000000..e3155f48956 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.d @@ -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 index 00000000000..8d45a07fd36 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-fail-rv64iq-ilp32.l @@ -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 index 11d3ed91617..00000000000 --- a/gas/testsuite/gas/riscv/mabi-noabi-attr-01a.d +++ /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 index b50ac3c240a..00000000000 --- a/gas/testsuite/gas/riscv/mabi-noabi-attr-01b.d +++ /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 : -#... -[ ]+[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 index 9668066aadd..00000000000 --- a/gas/testsuite/gas/riscv/mabi-noabi-attr-02a.d +++ /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 index a69d0bc8db4..00000000000 --- a/gas/testsuite/gas/riscv/mabi-noabi-attr-02b.d +++ /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 : -#... -[ ]+[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 index 4392b5cf088..00000000000 --- a/gas/testsuite/gas/riscv/mabi-noabi-attr-03a.d +++ /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 index 917ab8c131d..00000000000 --- a/gas/testsuite/gas/riscv/mabi-noabi-attr-03b.d +++ /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 : -#... -[ ]+[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 index 00000000000..b58b9043729 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-noabi-attr-rv32i-01.d @@ -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 index 00000000000..56dcd0ff31a --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-noabi-attr-rv32i-02.d @@ -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 : +#... +[ ]+[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 index 00000000000..425e5d15e32 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-noabi-attr-rv32id-01.d @@ -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 index 00000000000..8b7ee68c12d --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-noabi-attr-rv32id-02.d @@ -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 : +#... +[ ]+[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 index 00000000000..0251a009c84 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-noabi-attr-rv64iq-01.d @@ -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 index 00000000000..6a33ba0f15e --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-noabi-attr-rv64iq-02.d @@ -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 : +#... +[ ]+[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 index 8ca280ef17b..00000000000 --- a/gas/testsuite/gas/riscv/mabi-noabi-march-01.d +++ /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 index 453fe7b07e2..00000000000 --- a/gas/testsuite/gas/riscv/mabi-noabi-march-02.d +++ /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 index ab2ffc351a0..00000000000 --- a/gas/testsuite/gas/riscv/mabi-noabi-march-03.d +++ /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 index 00000000000..8ca280ef17b --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-noabi-march-rv32i.d @@ -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 index 00000000000..9ef28abade2 --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-noabi-march-rv32id.d @@ -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 index 00000000000..3de0eb7743b --- /dev/null +++ b/gas/testsuite/gas/riscv/mabi-noabi-march-rv64iq.d @@ -0,0 +1,10 @@ +#as: -march=rv64iq +#readelf: -h +#source: empty.s + +ELF Header: +#... +[ ]+Class:[ ]+ELF64 +#... +[ ]+Flags:[ ]+0x6, quad-float ABI +#...