public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Vineet Gupta <vineetg@rivosinc.com>
To: Palmer Dabbelt <palmer@dabbelt.com>, adhemerval.zanella@linaro.org
Cc: christoph.muellner@vrull.eu, libc-alpha@sourceware.org,
	Darius Rad <darius@bluespec.com>,
	Andrew Waterman <andrew@sifive.com>,
	philipp.tomsich@vrull.eu, Evan Green <evan@rivosinc.com>,
	DJ Delorie <dj@redhat.com>,
	kito.cheng@sifive.com, jeffreyalaw@gmail.com
Subject: Re: [PATCH 2/7] RISC-V: Add Zbb optimized memchr as ifunc
Date: Tue, 30 Apr 2024 11:44:16 -0700	[thread overview]
Message-ID: <eadc76b5-3e20-4062-9d46-c6064d55cfad@rivosinc.com> (raw)
In-Reply-To: <mhng-8a9f786a-d496-4c10-be27-2bfd538cd415@palmer-ri-x1c9a>


On 4/30/24 10:54, Palmer Dabbelt wrote:
>>> That alone likely won't do it, there's a bunch of ordering rules in the ISA string handling so we might get tripped up on them.  We've got a fairly relaxed version of the rules in GCC to try and match the various older rules, though, so it might be possible to make something similar work.
>>>
>>> We should probably just add some sort of -march=+zbb type argument.  IIRC Kito was going to do it at some point, not sure if he got around to it?
>> I am just pointing this out because I think the way RISCV extension selection
>> is currently implemented makes it awkward to provide ifunc implementation in
>> a agnostic way (specially now that RISCV has dozens of extensions) without
>> knowing the current target compiler is generating.
>>
>> Some other ABI allows to either specify a ISA/chip reference (like powerpc
>> with -mcpu=powerX) or a ABI extension directly (like aarch64 with -march=+xxx).
> We have -mcpu, but for RISC-V that's even more fragmented than -march 
> (-mcpu essentially just rolls together -march and -mtune, and only 
> allows a curated list).  The `-march=+`-type stuff has been a pretty 
> common request, I think someone just needst oget around to actually 
> implementing it.

But the lack of this infra as of today, means downstream projects such
as glibc either need to wait for that to get merged and rely on a
specific gcc version or need to implement both ways of doing this.
Unfortunately that means as of today we have to use the non perfect
solutions.

-Vineet

  reply	other threads:[~2024-04-30 18:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22  7:43 [PATCH 0/7] Add ifunc support for existing Zbb optimizations Christoph Müllner
2024-04-22  7:43 ` [PATCH 1/7] RISC-V: Use .insn directive form for orc.b Christoph Müllner
2024-04-22  7:43 ` [PATCH 2/7] RISC-V: Add Zbb optimized memchr as ifunc Christoph Müllner
2024-04-24 12:53   ` Adhemerval Zanella Netto
2024-04-24 13:16     ` Christoph Müllner
2024-04-24 13:36       ` Adhemerval Zanella Netto
2024-04-26 11:40         ` Christoph Müllner
2024-04-30 15:13         ` Palmer Dabbelt
2024-04-30 17:45           ` Adhemerval Zanella Netto
2024-04-30 17:54             ` Palmer Dabbelt
2024-04-30 18:44               ` Vineet Gupta [this message]
2024-05-06 13:20               ` Christoph Müllner
2024-05-06 13:32                 ` Kito Cheng
2024-05-06 13:46                   ` Christoph Müllner
2024-05-06 13:58                     ` Kito Cheng
2024-04-22  7:43 ` [PATCH 3/7] RISC-V: Add Zbb optimized memrchr " Christoph Müllner
2024-04-22  7:44 ` [PATCH 4/7] RISC-V: Add Zbb optimized strchrnul " Christoph Müllner
2024-04-22  7:44 ` [PATCH 5/7] RISC-V: Add Zbb optimized strcmp " Christoph Müllner
2024-04-22  7:44 ` [PATCH 6/7] RISC-V: Add Zbb optimized strlen " Christoph Müllner
2024-04-22  7:44 ` [PATCH 7/7] RISC-V: Add Zbb optimized strncmp " Christoph Müllner

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=eadc76b5-3e20-4062-9d46-c6064d55cfad@rivosinc.com \
    --to=vineetg@rivosinc.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=andrew@sifive.com \
    --cc=christoph.muellner@vrull.eu \
    --cc=darius@bluespec.com \
    --cc=dj@redhat.com \
    --cc=evan@rivosinc.com \
    --cc=jeffreyalaw@gmail.com \
    --cc=kito.cheng@sifive.com \
    --cc=libc-alpha@sourceware.org \
    --cc=palmer@dabbelt.com \
    --cc=philipp.tomsich@vrull.eu \
    /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).