unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Kito Cheng <kito.cheng@sifive.com>
To: "Christoph Müllner" <christoph.muellner@vrull.eu>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
	adhemerval.zanella@linaro.org,  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>, Vineet Gupta <vineetg@rivosinc.com>,
	jeffreyalaw@gmail.com
Subject: Re: [PATCH 2/7] RISC-V: Add Zbb optimized memchr as ifunc
Date: Mon, 6 May 2024 21:58:17 +0800	[thread overview]
Message-ID: <CALLt3TjoaoH=B03DKmWmo0MpG-tbNJZHunkkMhuyHNr2yrvWAA@mail.gmail.com> (raw)
In-Reply-To: <CAEg0e7h7fV-1HkWXVfrt1CiDK7O4aXcnfTbqFZpYFdgWniZM1A@mail.gmail.com>

> > `target` attribute is provided by GCC 14, and `-march=+ext` will at
> > least require GCC 15 (if we add),
> > also we relaxed the canonical order requirement for `-march=`, that
> > means we can relatively easy to manipulate the ISA
> > string by just concat that? so I don't really think we need  `-march=+ext`.
>
> Then we require the Makefile author to:
> 1) parse if the current compiler flags include march (repeat for all
> variables that may be used)
> 2a) if so, then amend to that
> 2b) if not, parse if there is a configured default ISA (via "gcc -v")
> 2ba) if so, then create -march accordingly
> 2bb) if not, then <fail to amend>
>
> Bonus problem:
> If there are multiple variables that might set -march=... this gets
> even trickier because
> the order how these variables are integrated in the compiler
> invocation command is unknown.
>
> Using "-march=+zfoo" seems simpler and cleaner.

I agree it will require the compiler to parse the gcc -v to obtain the
default -march, it might be a burden,
but AArch64 also does not allow -march=+ext only it requires
-march=arch{+[no]feature}*,
so I am wondering why do we need that to resolve/improve ifunc
implementation but not `target` attribute and `.option arch, +ext`?

  reply	other threads:[~2024-05-06 13:58 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
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 [this message]
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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to='CALLt3TjoaoH=B03DKmWmo0MpG-tbNJZHunkkMhuyHNr2yrvWAA@mail.gmail.com' \
    --to=kito.cheng@sifive.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=libc-alpha@sourceware.org \
    --cc=palmer@dabbelt.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=vineetg@rivosinc.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).