From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id 71D1D3858D35 for ; Fri, 5 May 2023 18:55:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 71D1D3858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-959a3e2dd27so375415766b.3 for ; Fri, 05 May 2023 11:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1683312937; x=1685904937; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=MEEqlAHPLwKa3KmwAS/ThqaP+YYULczgRWPNwc0edCk=; b=MQkNLWCgUHU6LL4XSog6/UtUP3Zp8qpVhsdp3/scOJB9Szw1iJj5EiToitwWkngbR8 E9dn78jei7FTbaqa756JNewt+L4+/qllgw3byQ3I+0QrXR2GVHsk6j9BM3X28iZnI9bV FmDuvnQX8DNGJlw6OHT5xk6LMGvtg4WAQsNvFeL4F5cwJ2A3cV+VbInL/qnjUOf+jvMl HsYo6P5TFn/tPCWlsdQ9Xa9wvGu/2MHVWPNHZNqQpZk9VuwU6tCDRSZozfJUCvpZPkbp /M8vSMZnnHeAhvClGYt+3THslqB46FjlOPy1F3NsjvyMtW9ZQQX/zzv2hUTtoLvVvXDJ QJuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683312937; x=1685904937; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MEEqlAHPLwKa3KmwAS/ThqaP+YYULczgRWPNwc0edCk=; b=e5eFklxePn7ymB26MQdcxf1gd/uEA3h/keTlD8jk6suGcagUssMsCHP7PceDNjxLD5 IjMVlo1WZKQ7i+zqsccNOUaAbgOzlnUG2CeilKP/oWJgOU+vGrN1ZG+CKBg7Oi4de+6+ NK51KtojAh0QI1W24hgS8UfCKhynlI15wzxZBu7EyF2evZpU+Hd7n03IPiVH+QM27cHF BjhVeuLf5DY9e3YtgzGGLqmDsBi+sdKM02UmYTCTht91AtvkTrJmr/T6FCnPtDd9HSFC r09T2p4YRwMd6EtxZSTR6YKpIyZHwFlMWYwXz8RPLY35VNoRDTc8qevR0hEZuhJwo8wb M00w== X-Gm-Message-State: AC+VfDwnHrBnqXrQCM1fI8Mdg1CbPBWVbHof5NFz7JPfiq0EE4JzZsh4 8ZkKpA5J/ChcTlqmPegKVXm5lg== X-Google-Smtp-Source: ACHHUZ6wzZ0eDzlNE/TkRK7fGudyJkBwdY1HHeaO8rZk7sGZgnDj8Bm7Nj5824nBFhSUN4mVSSWrOw== X-Received: by 2002:a17:907:720f:b0:95f:4c5c:4eaf with SMTP id dr15-20020a170907720f00b0095f4c5c4eafmr2022756ejc.46.1683312937124; Fri, 05 May 2023 11:55:37 -0700 (PDT) Received: from andrea (host-87-1-71-229.retail.telecomitalia.it. [87.1.71.229]) by smtp.gmail.com with ESMTPSA id y9-20020a1709063a8900b0094f499257f7sm1265664ejd.151.2023.05.05.11.55.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:55:36 -0700 (PDT) Date: Fri, 5 May 2023 20:55:31 +0200 From: Andrea Parri To: Patrick O'Neill Cc: gcc-patches@gcc.gnu.org, jeffreyalaw@gmail.com, palmer@rivosinc.com, vineetg@rivosinc.com, andrew@sifive.com, kito.cheng@sifive.com, dlustig@nvidia.com, cmuellner@gcc.gnu.org, hboehm@google.com, gnu-toolchain@rivosinc.com Subject: Re: [RFC] RISC-V: Add proposed Ztso atomic mappings Message-ID: References: <20230505171256.1380528-1-patrick@rivosinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230505171256.1380528-1-patrick@rivosinc.com> X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no 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 Fri, May 05, 2023 at 10:12:56AM -0700, Patrick O'Neill wrote: > The RISC-V Ztso extension currently has no effect on generated code. > With the additional ordering constraints guarenteed by Ztso, we can emit > more optimized atomic mappings than the RVWMO mappings. > > This patch implements Andrea Parri's proposed Ztso mappings ("Proposed > Mapping"). > https://github.com/preames/public-notes/blob/master/riscv-tso-mappings.rst > > LLVM has implemented this same mapping (Ztso is still behind a > experimental flag in LLVM, so there is *not* a defined ABI for this yet). > https://reviews.llvm.org/D143076 Given the recent patches/discussions, it seems worth pointing out the the Ztso mappings referred to above was designed to be compatible with the mappings in Table A.6 and that they are _not_ compatible with the mappings in Table A.7 or with a "subset" of A.7 (even assuming RVTSO). Andrea