From: Palmer Dabbelt <palmer@rivosinc.com>
To: Darius Rad <darius@bluespec.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [RFC] build-many-glibcs: Add a rv64gcbv-on-rv64gc/lp64d sub-variant
Date: Mon, 15 Apr 2024 14:36:59 -0700 (PDT) [thread overview]
Message-ID: <mhng-7f010c85-9035-44bf-be55-dbb8e216d034@palmer-ri-x1c9> (raw)
In-Reply-To: <Zh2M7ubwmwnwGs-E@localhost.localdomain>
On Mon, 15 Apr 2024 13:24:14 PDT (-0700), Darius Rad wrote:
> Is this really lp64d?
I guess that depend on what you mean by "ABI". Passing `-march=rv64gv
-mabi=lp64d` will result in binaries that require the V extension to
run, but can be linked with any other binary that is compiled with
`-mabi=lp64d`. It's essentially the same as `-march=rv64g -mabi=lp64`,
except for vector instead of float.
> What is the status of the vector ABI?
We don't have a global vector ABI switch for GCC (ie, `-mabi=lp64dv`)
and we decided not to put on in for GCC-14. We've essentially got all
the machinery there for it, as we've got the vector calling convention
attribute, but that came in pretty late and we decided it'd be better to
wait.
I don't see any reason it'd miss GCC-15, but no promises as there's not
even a patch on the lists yet...
> If we need to
> have (and test) more targets that are actually useful, so be it. But we
> don't want to be stuck testing targets nobody uses or that provide no
> testing value, and removing them is usually harder than adding them.
Ya, that's kind of my worry here. We'd be going out on a limb here by
targeting something without hardware availability, we've already got
some baggage floating around from lightly-used targets and it'd be best
to avoid too much of that.
IMO it's really more of a question for users/distros -- and I'm
definitely a crazy person on that front, I run Gentoo ;)
> On Mon, Apr 15, 2024 at 12:24:15PM -0700, Palmer Dabbelt wrote:
>> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
>> ---
>> So this is very much an RFC. I had written a commit message as
>>
>> This will hopefully be a widely used configuration in the future, but
>> it's not all that common right now. That said, let's be proactive and
>> at start testing it.
>>
>> but I even that's kind of a strong statement here so I'm just stashing
>> it off to the side to be sure.
>>
>> A few of us were talking about the GCC meeting last week, but I figured
>> I'd send a glibc patch to at least start some discussion on the lists as
>> something similar had come up in the TLSDESC thread and a while ago when
>> we talked about glibc-hwcaps.
>>
>> I'm not really sure what the right thing to do here is: we don't have
>> broadly available hardware that supports these new extensions, but
>> they're pretty much table stakes for hardware that's competitive with
>> arm64/x86. Without B and V we're going to end up piling up a ton of
>> IFUNC-based routines to try and work around the base ISA, but those
>> extensions are so fundamental to good codegen that it doesn't feel like
>> we're going to get where we want with just IFUNCs.
>>
>> Unfortunately I don't think we can drop support for the other base ISAs:
>> the distros appear to be targeting rv64gc and that's the only common
>> base for most hardware that's out there. I guess we could drop support
>> for the rv*ima-based base ISAs, but I'm not sure that buys us much:
>> we've got a lot of embedded users so we won't be able to drop the GCC
>> support for soft float, and dropping the glibc support puts us in a
>> clunky spot for testing.
>>
>> So we're probably stuck in a bit of a performance hole for a while.
>> That said, we could at least put a stake in the ground and start testing
>> some target with some newer extensions. That way distros that want to
>> try a larger base than rv64gc have something that's getting tested and
>> is thus likely to work. For GCC we ended up adding some test targets
>> with pretty much all the non-embedded, but at least B and V seem like
>> the bare minimum.
>>
>> I'm not sure if all that is worth the extra build/test resource burden
>> for everyone, though, particularly given the lack of hardware.
>> ---
>> scripts/build-many-glibcs.py | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
>> index ecc743e672..21da46dc4a 100755
>> --- a/scripts/build-many-glibcs.py
>> +++ b/scripts/build-many-glibcs.py
>> @@ -411,7 +411,9 @@ class Context(object):
>> os_name='linux-gnu',
>> variant='rv64imafdc-lp64d',
>> gcc_cfg=['--with-arch=rv64imafdc', '--with-abi=lp64d',
>> - '--disable-multilib'])
>> + '--disable-multilib']),
>> + extra_glibcs=[{'variant': 'rv64gcbv-rv64gc-lp64d',
>> + 'ccopts': '-march=rv64gcv_zba_zbb_zbs'}]
>> self.add_config(arch='s390x',
>> os_name='linux-gnu',
>> glibcs=[{},
>> --
>> 2
next prev parent reply other threads:[~2024-04-15 21:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-15 19:24 Palmer Dabbelt
2024-04-15 20:05 ` enh
2024-04-15 20:22 ` Palmer Dabbelt
2024-04-25 5:11 ` Jeff Law
2024-04-15 20:24 ` Darius Rad
2024-04-15 21:36 ` Palmer Dabbelt [this message]
2024-04-16 14:55 ` Darius Rad
2024-04-16 16:04 ` Palmer Dabbelt
2024-04-16 20:41 ` Darius Rad
2024-04-16 21:06 ` Palmer Dabbelt
2024-04-16 7:01 ` Michael Hudson-Doyle
2024-04-16 18:12 ` Palmer Dabbelt
2024-04-17 9:46 ` Florian Weimer
2024-04-23 3:08 ` Michael Hudson-Doyle
2024-04-17 10:26 ` Florian Weimer
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-7f010c85-9035-44bf-be55-dbb8e216d034@palmer-ri-x1c9 \
--to=palmer@rivosinc.com \
--cc=darius@bluespec.com \
--cc=libc-alpha@sourceware.org \
/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).