public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@rivosinc.com>
To: Kito Cheng <kito.cheng@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] RISC-V: Update multilib-generator to handle V
Date: Mon, 17 Apr 2023 08:24:44 -0700 (PDT)	[thread overview]
Message-ID: <mhng-98bc1cb4-b1ff-49ac-afb3-cf254063f1f1@palmer-ri-x1c9a> (raw)
In-Reply-To: <CA+yXCZDBi1vQ4Yu9tYQKSLs+uDEYTEXbEBYFk=4OmxQp3_BL+Q@mail.gmail.com>

On Fri, 14 Apr 2023 00:15:07 PDT (-0700), Kito Cheng wrote:
> Wait, take second round review:
>
>> * All extensions were being prefixed with an underscore, which leads to
>>   some odd combinations like "rv32gc_v", this just adds underscores to
>>   the multi-letter extensions.
>> * The input base ISAs were being canonicalized, which resulted in some
>>   odd multilib default search paths.  I'm not sure if anything breaks
>>   due to this, but it seems safer to just leave them alone.
>
>>* All extensions were being prefixed with an underscore, which leads to
>>  some odd combinations like "rv32gc_v", this just adds underscores to
>>  the multi-letter extensions.
>
> I think that weirdness can be removed arch-canonicalize I think?
>
> And currently all -march will be canonicalized before query multi lib
>
>> @@ -163,14 +168,13 @@ for cmodel in cmodels:
>>      if cmodel == "compact" and arch.startswith("rv32"):
>>        continue
>>
>> -    arch = arch_canonicalize (arch, args.misa_spec)
>>      arches[arch] = 1
>>      abis[abi] = 1
>>      extra = list(filter(None, extra.split(',')))
>>      ext_combs = expand_combination(ext)
>>      alts = sum([[x] + [x + y for y in ext_combs] for x in [arch] + extra], [])
>>      alts = filter(lambda x: len(x) != 0, alts)
>> -    alts = list(map(lambda a : arch_canonicalize(a, args.misa_spec), alts))
>> +    alts = alts + list(map(lambda a : arch_canonicalize(a, args.misa_spec), alts))
>
> So we don't really need to append non-canonical one to the list?

IIUC the multilib processing happens before the canonicialization, so 
we'd need the non-canonicial strings in there too (as those are what 
most users will provide, and what we have now).  I haven't actually 
tested that, though...

  reply	other threads:[~2023-04-17 15:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13 20:52 Palmer Dabbelt
2023-04-14  1:53 ` Kito Cheng
2023-04-14  7:15 ` Kito Cheng
2023-04-17 15:24   ` Palmer Dabbelt [this message]
2023-04-17 17:57     ` Palmer Dabbelt
2023-04-18 15:44       ` Kito Cheng
2023-04-18 20:01         ` Palmer Dabbelt
2023-04-19  0:47           ` Kito Cheng
2023-04-19  0:51             ` Palmer Dabbelt
2023-04-19  1:26               ` Kito Cheng
2023-04-19  1:29                 ` Palmer Dabbelt
2023-04-19  1:38                   ` Kito Cheng
2023-04-19  3:57                     ` 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-98bc1cb4-b1ff-49ac-afb3-cf254063f1f1@palmer-ri-x1c9a \
    --to=palmer@rivosinc.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kito.cheng@gmail.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).