From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id 619803858CDA for ; Mon, 15 Apr 2024 20:22:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 619803858CDA 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 619803858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::634 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713212559; cv=none; b=LcfK7UEcRczJUqOXZ5qpGdrSYUjFZtihSUQuNC4Cr2fvX0dAL8JF5YO3KmkN7I6FCzOVqWVKYNq1mVYuhTYZGHpi8vLyLyAE4X8Pq4KhEgOHv0dAdaV5Ab2cKSIj+HYbpLn4HcY6J8cO4Id4X4nCV9HOONxJw3Uui+dV6BybmP4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713212559; c=relaxed/simple; bh=apnVARUBGLtZzBGE7GnVt//TD1Uvnpn23Lv6zdi9+PQ=; h=DKIM-Signature:Date:Subject:From:To:Message-ID:Mime-Version; b=Rnx+K7Dmslz+cvzJx/6226AlQTXe1TQc9k/U3HvnLpUMN5TNpjXel0DxhIH0pPD91iF4JfaQ9U0j7GIdTjN6mFX95WseoqLK8KD5h1+hm1jIbSQD8g/SnhTFTQ7uRxcaLHB8tJ0CoOWtEipIpS/UYUhsbqsmzPRDnzHNJ8Ih+HI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1e6723c606dso11854035ad.1 for ; Mon, 15 Apr 2024 13:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1713212554; x=1713817354; 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=JJFJVIvVFfYQp8+dhD0xszw1N4Sf9Y23iwYvVzlMSQk=; b=rcNUm1nE2tG+6WOXp10gnjq7KnGyDVJimvrb74k9CvOPJVFk3cp57xMRJXMGvKqwWp XXPYByVvi/rPjprRBT1hWocKVKuSo8Mk3CaPAyf5KEmjUC/Zi7BNuORnz8NP2ni3XfGc launaHaQiEWXaaoZEqVxhHY5SZa0yjqQLQEoO3IdEgNrII4uZolxSXJHyvMpLAIaFHVp Z7jx5U3FZwpyNlTLw4c6+Ghu8DPMqKpaU4tTz90xax4nbVUXaHtK5NAlm9tGpT9xw1HW G/dJdmrkFA5BOj/NHqIzDJQirB2FylxXIBXfSrA1uJffY/eu3XEUfQEZUar3KVmOcju/ Hpzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713212554; x=1713817354; 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=JJFJVIvVFfYQp8+dhD0xszw1N4Sf9Y23iwYvVzlMSQk=; b=OvgV8yZe+vG4nn7yzVkzRga6UaFCWzZr/x2h39IV4FeRmEXohRPmwjK46z0H3u1hqQ zoiVZgdSg+3khuzrKyW1WwO8drJG93Q/rEKAqYyIl87EeTQ/mlUcAta4y7U863Bp1aqq X0GmJXl18nq+uswgZnvhZIqnr7JYNuvpeVccIol37HzFH/LxhoICKuWCvI4Wh43Pn0AD H7AJXIocn6gPvFH1/58w9ETBbNYswKr2GGHtimS6idxZjC/jjKitzaQdW8tTi4fexP96 aSGWMbyY5DOi64YCAaoXOgNenvBlmjJZ54HEkZ6EzaZCm/zQG0KR64fVSq1y+Rihy/B+ CtSQ== X-Gm-Message-State: AOJu0YyrbgGAJX2kOD4BCLQtCLL26nPUiYLqSmGRS41DZFa/OibstO1Z 9ekP7OkIDgMVakv7eISBFplozoDbfT841ZCBc9dWB1bw5WgHaEge2XGcJ5cNiJg/HvYmSBIKH6x 5 X-Google-Smtp-Source: AGHT+IG5m9CWt3PVZeCLDQle72IZZmAz+0uObijeYQ38z/okjDXqVIvIpE+t+YXgCIZjsCLC1qWAvw== X-Received: by 2002:a17:903:41cf:b0:1e4:3535:142d with SMTP id u15-20020a17090341cf00b001e43535142dmr15442373ple.34.1713212553852; Mon, 15 Apr 2024 13:22:33 -0700 (PDT) Received: from localhost ([192.184.165.199]) by smtp.gmail.com with ESMTPSA id q12-20020a170902a3cc00b001e2b36d0c8esm2976773plb.7.2024.04.15.13.22.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 13:22:33 -0700 (PDT) Date: Mon, 15 Apr 2024 13:22:33 -0700 (PDT) X-Google-Original-Date: Mon, 15 Apr 2024 13:22:31 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: enh@google.com 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:05:53 PDT (-0700), enh@google.com wrote: > On Mon, Apr 15, 2024 at 12:27 PM 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. > > for Android -- which is in a similar situation -- having the build > system enable these extensions been pretty useful for finding > toolchain and qemu bugs, which seems useful in its own right, if only > for CI purposes... Ya, that's kind of my theory here. Hopefully hardware vendors will eventually align to some interesting set of extensions, maybe split between a few markets, but at least we can do _something_ here. I'd be super surprised if we end up with any sort of long-term successful hardware that lacks B and V, so it seems like a safe target for testing. >> --- >> 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.44.0 >>