From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 17B203858D32 for ; Mon, 15 Apr 2024 21:37:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 17B203858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 17B203858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::429 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713217024; cv=none; b=WkdSqMabe/QtzS6RTxwA0qvOWU/QbdWQmCbAPQqOY0PyylxRjjRN1IiyZ9gvax6HI5VBKuxJnKB3osryMLojS5MQIntkmKwzIZW37oSOuUxijxv2WDIcuzm1Q/JjHh18hyA4KN1eY5fvh17geVLPAuRqYka/WYEmT+Cg5t9LnQ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713217024; c=relaxed/simple; bh=JQ5ZzwlqWSIl2wC4LWBWpphWtf2vGu2CGFCdP9PLJAo=; h=DKIM-Signature:Date:Subject:From:To:Message-ID:Mime-Version; b=dGk/526aFoSCkgXHAGEv9O7CfEAiu4EXphwD2cThzzV5R+Vj7V1HueQcW6V+FOJhr96Wit1xd2yVg/Jdeu9UMo+Ndaaaj5aCWDeboUPF/Q8IfYiYniVf55LnvPlnd2aTXJKMoC3F2BqwjzLYZp7eKGBurOy+QHnkod1aKpm6wK4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6eddff25e4eso3121650b3a.3 for ; Mon, 15 Apr 2024 14:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1713217021; x=1713821821; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=wDV0kv33brXn9DvXMqmSHYffDnkiwGFhYlG83IF7FAE=; b=pi8Ssg6rnQJ1RYae51xkxzBs5U/HRpD1q7UqT5wr5ypZ4kirarBS7KzN1N9ArDSPPe 7IvNd7tChbPWyuKbUQqlsxa8/2hQiSPxx2Bzn8MC95RR9HuTQewos1Qfo98YF799WnoZ tEldoMxccmeF4Hw8Fl0mhgWNRcUdMIa321v5vOeMJCSS/y4S4ULOdH+yf6xisF9xpP+L EpE+JW5K9I7WUYFwLl8z53sgqi20c/ezPl37D69VgEHlT9w0RshpFHRX010rFMP0W6W+ DqqFb37F9x3OIAzT3BXE3sK92tWeNEwNtp83OPhI6ddR/QHBtsErIECZ4k5rGnioYI4F 0kKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713217021; x=1713821821; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wDV0kv33brXn9DvXMqmSHYffDnkiwGFhYlG83IF7FAE=; b=faLY6i2LzE96nzbNkVWRnsxt/1gK9NWuX8dzvnxZesAXa6aBOaeHeLQiG8SjLCKxU5 ejOWcHdN0h3XRsS6jOzw2Ia6+dZALfgaGCc+cYZAa1/RdCnpl25Or0WyBSvW7WHB+uzg OZuBPaaLIYXxhn8LwN2872HQLJgy6teHa/phgyWYlQcYp5SmAK8HU25mfLGjCdo4uMF6 7GB6m/yXck7qKyeRgJ6Gzmq3TRJfXut+lAs51N/T1V1JNYu+fYWT6G0AyqcNedV01Fsk TozDjETlJ89X405N1AuMOzQzEUcXB4xUrxANk//VjA9ijzdc79vx9ZoRjVZbtw+ieo96 8vhw== X-Gm-Message-State: AOJu0YzzV2dlu82SUcJpEPQXq4uqNMX7JXNk5Y8eKee/Ic3whsAq2W2Q zVrOJErR/+aVeGpZ5zBDc0doxnySwaFaryGWPiomRCSiCBrntjNLPNgR4Igb4rL3LaZ8OBd7u0B W X-Google-Smtp-Source: AGHT+IFy8Z7byNw4m/yYkTzWSXgWLakxzuZCNeHaWtXQYdIwKUv3N6BbwwF1nvDuARjpcUN9fSVS8Q== X-Received: by 2002:a05:6a20:3cac:b0:1a7:6ec4:d27e with SMTP id b44-20020a056a203cac00b001a76ec4d27emr12525896pzj.14.1713217020389; Mon, 15 Apr 2024 14:37:00 -0700 (PDT) Received: from localhost ([192.184.165.199]) by smtp.gmail.com with ESMTPSA id du20-20020a056a002b5400b006ea7d877191sm7687181pfb.2.2024.04.15.14.36.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 14:36:59 -0700 (PDT) Date: Mon, 15 Apr 2024 14:36:59 -0700 (PDT) X-Google-Original-Date: Mon, 15 Apr 2024 14:36:56 PDT (-0700) Subject: Re: [RFC] build-many-glibcs: Add a rv64gcbv-on-rv64gc/lp64d sub-variant In-Reply-To: CC: libc-alpha@sourceware.org From: Palmer Dabbelt To: Darius Rad Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 >> --- >> 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