public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: gcc-patches@gcc.gnu.org
Cc: simon.cook@embecosm.com, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] RISC-V: Don't unconditionally add m, a, f, d in arch-canonicalize
Date: Wed, 25 May 2022 14:32:52 -0700 (PDT)	[thread overview]
Message-ID: <mhng-37776b34-1b09-485d-ad47-1f4aff615fa2@palmer-ri-x1c9> (raw)
In-Reply-To: <CA+yXCZC=QoYZfD_Uj9W6qmxy0aghdOx8S+4jeeDhfMrKsAs7rw@mail.gmail.com>

On Wed, 25 May 2022 07:00:11 PDT (-0700), gcc-patches@gcc.gnu.org wrote:
> Committed, Thanks for fixing my stupid bug :P

IMO this is a good candidate for a backport.

> On Wed, May 25, 2022 at 9:26 PM Simon Cook <simon.cook@embecosm.com> wrote:
>>
>> This solves an issue where rv32i, etc. are canonicalized to rv32imafd
>> since the g->i addition of 'm', 'a', 'f', 'd' is not actually gated by
>> whether the input was rv32g/rv64g.
>>
>> gcc/ChangeLog:
>>
>>         * config/riscv/arch-canonicalize: Only add mafd extension if
>>         base was rv32/rv64g.
>> ---
>>  gcc/config/riscv/arch-canonicalize | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gcc/config/riscv/arch-canonicalize
>> b/gcc/config/riscv/arch-canonicalize
>> index 71b2232b29e..fd7651ac491 100755
>> --- a/gcc/config/riscv/arch-canonicalize
>> +++ b/gcc/config/riscv/arch-canonicalize
>> @@ -73,8 +73,8 @@ def arch_canonicalize(arch, isa_spec):
>>    std_exts = []
>>    if arch[:5] in ['rv32e', 'rv32i', 'rv32g', 'rv64i', 'rv64g']:
>>      new_arch = arch[:5].replace("g", "i")
>> -    std_exts = ['m', 'a', 'f', 'd']
>>      if arch[:5] in ['rv32g', 'rv64g']:
>> +      std_exts = ['m', 'a', 'f', 'd']
>>        if not is_isa_spec_2p2:
>>          extra_long_ext = ['zicsr', 'zifencei']
>>    else:
>> --
>> 2.32.1

  reply	other threads:[~2022-05-25 21:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 13:25 [PATCH] RISC-V: Don't unconditionally add m,a,f,d " Simon Cook
2022-05-25 14:00 ` [PATCH] RISC-V: Don't unconditionally add m, a, f, d " Kito Cheng
2022-05-25 21:32   ` Palmer Dabbelt [this message]
2022-05-26  6:51     ` Kito Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mhng-37776b34-1b09-485d-ad47-1f4aff615fa2@palmer-ri-x1c9 \
    --to=palmer@dabbelt.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=simon.cook@embecosm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).