public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Philipp Tomsich <philipp.tomsich@vrull.eu>
To: Florian Weimer <fweimer@redhat.com>
Cc: "Christoph Müllner via Binutils" <binutils@sourceware.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Christoph Müllner" <cmuellner@gcc.gnu.org>,
	"GNU C Library" <libc-alpha@sourceware.org>,
	"GCC Patches" <gcc-patches@gcc.gnu.org>,
	gdb-patches@sourceware.org
Subject: Re: Supporting RISC-V Vendor Extensions in the GNU Toolchain
Date: Fri, 13 May 2022 13:24:49 +0200	[thread overview]
Message-ID: <CAAeLtUBfN+qhterQMKn7hCOdwxM-Ou+SA08M1DozgxHPoYTUvw@mail.gmail.com> (raw)
In-Reply-To: <87y1z5d7i9.fsf@oldenburg.str.redhat.com>

On Fri, 13 May 2022 at 12:58, Florian Weimer <fweimer@redhat.com> wrote:
>
> * Christoph Müllner via Binutils:
>
> > I'd like to add two points to this topic and raise two questions.
> >
> > 1) Accepting vendor extensions = avoidance of fragmentation
> >
> > RISC-V implementors are actively encouraged to implement their
> > own ISA extensions. To avoid fragmentation in the SW ecosystem
> > (every vendor maintains a fork of tools, distros and binaries) there
> > needs to be a principle acceptance to get vendor extension support
> > upstream.
>
> If you eventually want portable binaries, it's necessary to converge on
> a small set of widely implemented extensions.  x86 didn't have this, and
> adoption was poor outside specialized libraries (and JIT, of course).
> Yet everything was as upstream as possible (ISA manuals, assemblers,
> compiler intrinsics, even automated adoption by optimizers).  So
> upstreaming is only the first step.

Some of the earlier discussion seems to have mixed two different goals:
1. making the vendor-defined features available to the developer and
ensuring that no unintended consequences (e.g., "accidental"
interlinking) happen, so developers can choose to adopt them (e.g.
through dynamic detection) where appropriate;
2. having widespread adoption for features across
libraries/applications that take advantage of all implemented features

As this is cross-posted to projects that provide the infrastructure,
tools, and plumbing, we should IMO focus on goal #1.
Coming from the RISC-V ISA philosophy, this also makes excellent
sense: after all, RISC-V is (in its purest form) an "ISA construction
kit": one can add extensions or leave extensions off.

For the essential development tools, this flexibility is reflected in
the myriad of combinations that "-march" can have (just consider that
there are 4 distinct Zb[abcs] extensions that add addressing, basic
bit-manipulation, carryless multiplication, and single-bit
operations…).  If individual downstream users see benefits from any of
these (e.g., Zbb for strlen; Zbc for GHASH, …), they will contribute
optimized code-paths under ifunc (or whatever other mechanism a given
library/application uses); however: we first need to have our tools
support these extensions (both standard and vendor-defined) and ensure
that no accidental interlinking happens.

Finally, to enable binary distributions, a basic architecture level
that everyone agrees on (these are being defined at the RISC-V
Foundation under the "Profiles" and "Platforms" umbrellas) provides a
baseline to target that will provide some level of "runs everywhere"
based on such a "small set of widely implemented extensions".

Philipp.

  reply	other threads:[~2022-05-13 11:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11  0:01 Palmer Dabbelt
2022-05-13 10:00 ` Christoph Müllner
2022-05-13 10:37   ` Philipp Tomsich
2022-05-15  1:21     ` Palmer Dabbelt
2022-05-16 12:32       ` Philipp Tomsich
2022-05-16  6:28     ` Andrew Waterman
2022-05-13 10:58   ` Florian Weimer
2022-05-13 11:24     ` Philipp Tomsich [this message]
2022-05-13 12:26     ` Christoph Müllner
2022-07-20 21:24 ` Palmer Dabbelt

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=CAAeLtUBfN+qhterQMKn7hCOdwxM-Ou+SA08M1DozgxHPoYTUvw@mail.gmail.com \
    --to=philipp.tomsich@vrull.eu \
    --cc=binutils@sourceware.org \
    --cc=cmuellner@gcc.gnu.org \
    --cc=fweimer@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=libc-alpha@sourceware.org \
    --cc=palmer@dabbelt.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).