public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kito Cheng <kito.cheng@gmail.com>
To: Simon Cook <simon.cook@embecosm.com>
Cc: GCC Patches <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 22:00:11 +0800	[thread overview]
Message-ID: <CA+yXCZC=QoYZfD_Uj9W6qmxy0aghdOx8S+4jeeDhfMrKsAs7rw@mail.gmail.com> (raw)
In-Reply-To: <6210fc0f-caaf-7bf8-4ab1-ec08760914d7@embecosm.com>

Committed, Thanks for fixing my stupid bug :P


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 14:00 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 ` Kito Cheng [this message]
2022-05-25 21:32   ` [PATCH] RISC-V: Don't unconditionally add m, a, f, d " Palmer Dabbelt
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='CA+yXCZC=QoYZfD_Uj9W6qmxy0aghdOx8S+4jeeDhfMrKsAs7rw@mail.gmail.com' \
    --to=kito.cheng@gmail.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).