diff mbox series

[V2] RISC-V: Specify mtune and march for PR113742

Message ID 20240220220313.1211441-1-ewlu@rivosinc.com
State New
Headers show
Series [V2] RISC-V: Specify mtune and march for PR113742 | expand

Commit Message

Edwin Lu Feb. 20, 2024, 10:03 p.m. UTC
The testcase pr113742.c is failing for 32 bit targets due to the following cc1
error:
cc1: error: ABI requries '-march=rv64'

Specify '-march=rv64gc' with '-mtune=sifive-p600-series'

V1: https://gcc.gnu.org/pipermail/gcc-patches/2024-February/645609.html

	PR target/113742

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/pr113742.c: change mcpu to mtune and add march

Signed-off-by: Edwin Lu <ewlu@rivosinc.com>
---
V1: use require-effective-target
V2: switch to specifying march and mtune
---
 gcc/testsuite/gcc.target/riscv/pr113742.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Kito Cheng Feb. 21, 2024, 1:36 a.m. UTC | #1
LGTM, thanks for fixing that issue :)

On Wed, Feb 21, 2024 at 6:03 AM Edwin Lu <ewlu@rivosinc.com> wrote:
>
> The testcase pr113742.c is failing for 32 bit targets due to the following cc1
> error:
> cc1: error: ABI requries '-march=rv64'
>
> Specify '-march=rv64gc' with '-mtune=sifive-p600-series'
>
> V1: https://gcc.gnu.org/pipermail/gcc-patches/2024-February/645609.html
>
>         PR target/113742
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.target/riscv/pr113742.c: change mcpu to mtune and add march
>
> Signed-off-by: Edwin Lu <ewlu@rivosinc.com>
> ---
> V1: use require-effective-target
> V2: switch to specifying march and mtune
> ---
>  gcc/testsuite/gcc.target/riscv/pr113742.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/riscv/pr113742.c b/gcc/testsuite/gcc.target/riscv/pr113742.c
> index ab8934c2a8a..573afd6f0ad 100644
> --- a/gcc/testsuite/gcc.target/riscv/pr113742.c
> +++ b/gcc/testsuite/gcc.target/riscv/pr113742.c
> @@ -1,4 +1,4 @@
> -//* { dg-do compile } */
> -/* { dg-options "-O2 -finstrument-functions -mabi=lp64d -mcpu=sifive-p670" } */
> +/* { dg-do compile } */
> +/* { dg-options "-O2 -finstrument-functions -march=rv64gc -mabi=lp64d -mtune=sifive-p600-series" } */
>
>  void foo(void) {}
> --
> 2.34.1
>
Edwin Lu Feb. 21, 2024, 5:41 p.m. UTC | #2
Committed

Edwin

On 2/20/2024 5:36 PM, Kito Cheng wrote:
> LGTM, thanks for fixing that issue :)
>
> On Wed, Feb 21, 2024 at 6:03 AM Edwin Lu <ewlu@rivosinc.com> wrote:
>> The testcase pr113742.c is failing for 32 bit targets due to the following cc1
>> error:
>> cc1: error: ABI requries '-march=rv64'
>>
>> Specify '-march=rv64gc' with '-mtune=sifive-p600-series'
>>
>> V1: https://gcc.gnu.org/pipermail/gcc-patches/2024-February/645609.html
>>
>>          PR target/113742
>>
>> gcc/testsuite/ChangeLog:
>>
>>          * gcc.target/riscv/pr113742.c: change mcpu to mtune and add march
>>
>> Signed-off-by: Edwin Lu <ewlu@rivosinc.com>
>> ---
>> V1: use require-effective-target
>> V2: switch to specifying march and mtune
>> ---
>>   gcc/testsuite/gcc.target/riscv/pr113742.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/gcc/testsuite/gcc.target/riscv/pr113742.c b/gcc/testsuite/gcc.target/riscv/pr113742.c
>> index ab8934c2a8a..573afd6f0ad 100644
>> --- a/gcc/testsuite/gcc.target/riscv/pr113742.c
>> +++ b/gcc/testsuite/gcc.target/riscv/pr113742.c
>> @@ -1,4 +1,4 @@
>> -//* { dg-do compile } */
>> -/* { dg-options "-O2 -finstrument-functions -mabi=lp64d -mcpu=sifive-p670" } */
>> +/* { dg-do compile } */
>> +/* { dg-options "-O2 -finstrument-functions -march=rv64gc -mabi=lp64d -mtune=sifive-p600-series" } */
>>
>>   void foo(void) {}
>> --
>> 2.34.1
>>
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/riscv/pr113742.c b/gcc/testsuite/gcc.target/riscv/pr113742.c
index ab8934c2a8a..573afd6f0ad 100644
--- a/gcc/testsuite/gcc.target/riscv/pr113742.c
+++ b/gcc/testsuite/gcc.target/riscv/pr113742.c
@@ -1,4 +1,4 @@ 
-//* { dg-do compile } */
-/* { dg-options "-O2 -finstrument-functions -mabi=lp64d -mcpu=sifive-p670" } */
+/* { dg-do compile } */
+/* { dg-options "-O2 -finstrument-functions -march=rv64gc -mabi=lp64d -mtune=sifive-p600-series" } */
 
 void foo(void) {}