From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id EDB383858018 for ; Mon, 1 Feb 2021 09:36:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EDB383858018 Received: by mail-wm1-x32f.google.com with SMTP id i9so12558961wmq.1 for ; Mon, 01 Feb 2021 01:36:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yIIctrlV9nNKuImRYsyzRipgRnrrCuttlJpEh0XB24o=; b=bUwTBzHPV8gAfRmE6PV4AH67S2266tSiIiY8QVzVzYIZwJ88uOCJ9IICUP3EQyOtre 7nGU/BKyHFHbLdhyvxBNO9rR7X9H9w5zB3nTdkdZzCpOd6KdfMjVgDWlHn705t0/BExN mwL1a9O0cgL6qWUpgC9o6zsQtmwWZoS6gpR4EBvH7UPpjU0L4uPuAcYEEPxPPYl5oeFP ppQYwpuUvZi8yThCLjT15eNEbu8yE2HsUFxdoB3cyLyURMw0w76+qJcwWr31hAU2/iGv 6ehxfI1agkPm/bd/n2Ptjw9WZRMZLstyzWgVMgHqIkFtpF2MXGo+v2rc1kTYKg76nhoW QKEQ== X-Gm-Message-State: AOAM532PVLBdZY01RAQaxo7uoH/adP4fcQ4zM+imygos0GvxLor3RmUw gM0igJxwNMyLft4LrjPVvXS9j4h6N203DCUoZXo= X-Google-Smtp-Source: ABdhPJwQ9kE015mlX0geklZnI9q0AjN9DXwmN01qXl1p+nAmHdpn4V36NyDxinpUq/BPJpL03NV78CA7Au9rt+F9oGk= X-Received: by 2002:a1c:2d8a:: with SMTP id t132mr13740038wmt.119.1612172188846; Mon, 01 Feb 2021 01:36:28 -0800 (PST) MIME-Version: 1.0 References: <82D6E3CF-36C9-4D84-BFC1-A35FCEDED358@gmail.com> <87o8h59cjw.fsf@igel.home> In-Reply-To: From: Kito Cheng Date: Mon, 1 Feb 2021 17:36:17 +0800 Message-ID: Subject: Re: [PATCH] RISC-V: Fix -march option parsing when `p` extension exists. To: Xing GUO Cc: Andreas Schwab , Xing GUO via Gcc-patches , Kito Cheng Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2021 09:36:31 -0000 Pushed, thanks :) On Mon, Feb 1, 2021 at 4:58 PM Xing GUO wrote: > > Hi, > > I've reproduced the failure. It's because my gcc is configured as a > bare-metal toolchain and built with binutils that supports RISC-V > attribute. That is to say, my gcc emits RISC-V attributes by default. > Below is the patch that should fix the failure. Sorry for the > inconvenience. > > diff --git a/gcc/testsuite/gcc.target/riscv/attribute-18.c > b/gcc/testsuite/gcc.target/riscv/attribute-18.c > index 1fd80fed51b..492360cf7c1 100644 > --- a/gcc/testsuite/gcc.target/riscv/attribute-18.c > +++ b/gcc/testsuite/gcc.target/riscv/attribute-18.c > @@ -1,4 +1,4 @@ > /* { dg-do compile } */ > -/* { dg-options "-march=rv64imafdcp -mabi=lp64d -misa-spec=2.2" } */ > +/* { dg-options "-mriscv-attribute -march=rv64imafdcp -mabi=lp64d > -misa-spec=2.2" } */ > int foo() {} > /* { dg-final { scan-assembler ".attribute arch, > \"rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0_p\"" } } */ > > On 2/1/21, Xing GUO wrote: > > Hi Andreas and Kito, > > > > I haven't reproduced this failure, but it looks that I forget to > > append `-mriscv-attribute` to dg-options in attribute-18.c. I'll reply > > to this thread ASAP. > > > > Thanks, > > Xing > > > > On 2/1/21, Andreas Schwab wrote: > >> FAIL: gcc.target/riscv/attribute-18.c scan-assembler .attribute arch, > >> "rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0_p" > >> > >> $ grep -c 'attribute arch' attribute-18.s > >> 0 > >> > >> Andreas. > >> > >> -- > >> Andreas Schwab, schwab@linux-m68k.org > >> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > >> "And now for something completely different." > >> > > > > > > -- > > Cheers, > > Xing > > > > > -- > Cheers, > Xing