public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V/testsuite: Fix pr105666.c under rv32
@ 2022-06-08  9:35 jiawei
  2022-06-15 17:35 ` Vineet Gupta
  2022-06-16  4:24 ` Kito Cheng
  0 siblings, 2 replies; 4+ messages in thread
From: jiawei @ 2022-06-08  9:35 UTC (permalink / raw)
  To: gcc-patches
  Cc: vineetg, palmer, kito.cheng, jim.wilson.gcc, wuwei2016, Jia-wei Chen

From: Jia-wei Chen <jiawei@iscas.ac.cn>

In rv32 regression test, this cases will report an error:

"cc1: error: ABI requires '-march=rv32'"

Add '-mabi' option will fix this.

gcc/testsuite/ChangeLog:

        * gcc.target/riscv/pr105666.c: New options.

---
 gcc/testsuite/gcc.target/riscv/pr105666.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/riscv/pr105666.c b/gcc/testsuite/gcc.target/riscv/pr105666.c
index dd996eec8ef..752bbf1c017 100644
--- a/gcc/testsuite/gcc.target/riscv/pr105666.c
+++ b/gcc/testsuite/gcc.target/riscv/pr105666.c
@@ -7,7 +7,7 @@
 
 /* { dg-do compile } */
 /* { dg-require-effective-target hard_float } */
-/* { dg-options "-march=rv64g -ffast-math" } */
+/* { dg-options "-march=rv64g -mabi=lp64d -ffast-math" } */
 
 #define NITER 4
 #define NVARS 20
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V/testsuite: Fix pr105666.c under rv32
  2022-06-08  9:35 [PATCH] RISC-V/testsuite: Fix pr105666.c under rv32 jiawei
@ 2022-06-15 17:35 ` Vineet Gupta
  2022-06-15 23:01   ` Palmer Dabbelt
  2022-06-16  4:24 ` Kito Cheng
  1 sibling, 1 reply; 4+ messages in thread
From: Vineet Gupta @ 2022-06-15 17:35 UTC (permalink / raw)
  To: jiawei, gcc-patches
  Cc: palmer, kito.cheng, jim.wilson.gcc, wuwei2016, Christoph Muellner

Hi Wei,

On 6/8/22 02:35, jiawei wrote:
> From: Jia-wei Chen <jiawei@iscas.ac.cn>
>
> In rv32 regression test, this cases will report an error:
>
> "cc1: error: ABI requires '-march=rv32'"
>
> Add '-mabi' option will fix this.
>
> gcc/testsuite/ChangeLog:
>
>          * gcc.target/riscv/pr105666.c: New options.
>
> ---
>   gcc/testsuite/gcc.target/riscv/pr105666.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.target/riscv/pr105666.c b/gcc/testsuite/gcc.target/riscv/pr105666.c
> index dd996eec8ef..752bbf1c017 100644
> --- a/gcc/testsuite/gcc.target/riscv/pr105666.c
> +++ b/gcc/testsuite/gcc.target/riscv/pr105666.c
> @@ -7,7 +7,7 @@
>   
>   /* { dg-do compile } */
>   /* { dg-require-effective-target hard_float } */
> -/* { dg-options "-march=rv64g -ffast-math" } */
> +/* { dg-options "-march=rv64g -mabi=lp64d -ffast-math" } */
>   
>   #define NITER 4
>   #define NVARS 20

Thx for the fix.
I'm curious, doesn't -march imply a default ABI ? Or is there a default 
ABI across both rv32 and rv64 which needs to be overridden ?

-Vineet

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V/testsuite: Fix pr105666.c under rv32
  2022-06-15 17:35 ` Vineet Gupta
@ 2022-06-15 23:01   ` Palmer Dabbelt
  0 siblings, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2022-06-15 23:01 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: jiawei, gcc-patches, wuwei2016, Kito Cheng

On Wed, 15 Jun 2022 10:35:36 PDT (-0700), Vineet Gupta wrote:
> Hi Wei,
>
> On 6/8/22 02:35, jiawei wrote:
>> From: Jia-wei Chen <jiawei@iscas.ac.cn>
>>
>> In rv32 regression test, this cases will report an error:
>>
>> "cc1: error: ABI requires '-march=rv32'"
>>
>> Add '-mabi' option will fix this.
>>
>> gcc/testsuite/ChangeLog:
>>
>>          * gcc.target/riscv/pr105666.c: New options.
>>
>> ---
>>   gcc/testsuite/gcc.target/riscv/pr105666.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gcc/testsuite/gcc.target/riscv/pr105666.c b/gcc/testsuite/gcc.target/riscv/pr105666.c
>> index dd996eec8ef..752bbf1c017 100644
>> --- a/gcc/testsuite/gcc.target/riscv/pr105666.c
>> +++ b/gcc/testsuite/gcc.target/riscv/pr105666.c
>> @@ -7,7 +7,7 @@
>>
>>   /* { dg-do compile } */
>>   /* { dg-require-effective-target hard_float } */
>> -/* { dg-options "-march=rv64g -ffast-math" } */
>> +/* { dg-options "-march=rv64g -mabi=lp64d -ffast-math" } */
>>
>>   #define NITER 4
>>   #define NVARS 20
>
> Thx for the fix.
> I'm curious, doesn't -march imply a default ABI ? Or is there a default
> ABI across both rv32 and rv64 which needs to be overridden ?

In GCC we don't change -mabi from -march, that's an LLVM-ism.  There was 
just a patch posted, but the reviews look pretty negative so far.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V/testsuite: Fix pr105666.c under rv32
  2022-06-08  9:35 [PATCH] RISC-V/testsuite: Fix pr105666.c under rv32 jiawei
  2022-06-15 17:35 ` Vineet Gupta
@ 2022-06-16  4:24 ` Kito Cheng
  1 sibling, 0 replies; 4+ messages in thread
From: Kito Cheng @ 2022-06-16  4:24 UTC (permalink / raw)
  To: jiawei; +Cc: GCC Patches, Vineet Gupta, wuwei2016

Committed with a minor commit log fix, thanks!

>
> In rv32 regression test, this cases will report an error:
>
> "cc1: error: ABI requires '-march=rv32'"
>
> Add '-mabi' option will fix this.
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.target/riscv/pr105666.c: New options.
^^^ here should be a tab rather than spaces

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-16  4:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08  9:35 [PATCH] RISC-V/testsuite: Fix pr105666.c under rv32 jiawei
2022-06-15 17:35 ` Vineet Gupta
2022-06-15 23:01   ` Palmer Dabbelt
2022-06-16  4:24 ` Kito Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).