From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id 0223D3858D28 for ; Sat, 16 Dec 2023 18:58:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0223D3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0223D3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::22e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702753130; cv=none; b=bdtlt7Wd8EL5Vp10X916hc6oZOQ6H1E1UBVRXjRNzgestVF6RcWIULKWlbPtwzPp/xQzaP2rN1zme1vAnFDp44JL+wh5Lrki0nXoYySfuI4zrQUoL/HQwHLo2FEOdT+UwYCUnikA0LCv9qTazd40VIQfr7ERmrURmsccMOx4jJs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702753130; c=relaxed/simple; bh=xRJoAu/TJ6K7p2spA7wlWlahapEz5EoAZaclduyDkgY=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=DKOBurtqSmqMkICDqWKOYtJqBff4OL8koNGtEOPcjW3VgwXr5RiHq1//EjYmH94OLqc5nt27jSII3zOVfMFwKntUDnu576qKQ3HVolAbSCYgwc5Ns4BAUGeA/fl/qABoxvBYM506GVZk91V22Yiw/hT/PLIv2VhJws2mzzdSH0c= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3b9f8c9307dso1732260b6e.0 for ; Sat, 16 Dec 2023 10:58:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702753128; x=1703357928; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=IF5x5Ui/SLrRaCmV+NNQVhLztVOwrpL1Y9OQXz/OEFM=; b=a+duJIjttwwn5nHyuQiVOHqiWSixtke0ETeYs13xqhcH4+PMbV2681d9SyBQeSq/MT cE8fk3hrz7qedxWgiGzkL3ZOs3vT/qOSNc8byV6rm8oOwrGhA3WwMyXtEssQOMM/sKPn 5XMVgiXHg3apzrlTQugiv+R2AVmNto79OnswUtW/m8Q4Ux9lH5uNqyQz2iL25/BXnGHd zC7bKcacE+FHNVjueKrSqZ3pqq1gZVzqrq8BRFvWgy05b2GDeUuEQZiZ1DzxLxpb8Vp8 EBeNo9mYiA8MITUGclaIWKJKy3pFhUnQoVga1lhgrvVu8ZdpXFmMRmi79zfJl01wAKxn nHBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702753128; x=1703357928; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IF5x5Ui/SLrRaCmV+NNQVhLztVOwrpL1Y9OQXz/OEFM=; b=ot8U6pcnqpFNbd+qNXSNVgoeIsMr0JJv1n5wCn0NqEkPE1EIj3456TjRbJ+SDK0R7Y 7sodkCW9CqhZ+Xvh9Eowl9dVv8m4UUNd2BDIGAVoHQKxr35haqDGQvN1Ak/sIKuX/MuV n463e4ZMdOMRlh3Va2F+v2ezm+p9dpacKJL5qRa7YvrATgXXjrO2K6KjNJ1DcLw+wFdL TPpHgGXm+mJ/uGZizHjzUrbWiUVSAhKACguxdKcyC/k2K4wGXRS7dXAlCiSReyA3t1el LgerZ+n7yIx3NtMtedFKYfaxHgG6tBvbeznC+94SppxolQsMnjxS6Cmc6cdtg+xvqb6h tP6A== X-Gm-Message-State: AOJu0YygiCf5EJ2lcrGPBT5nVZ+/xIVAHC3SNYZy4gjdyb9ah2tllyDI 0Fgw66L3SvXUHXJHukVEg2kAmYO6zCk= X-Google-Smtp-Source: AGHT+IGAYkcShRos4jr4bfR2FFQGi6HUTLl77yfEIpK+FLYigKLATkmMSg3vV6Vi+NpFfa9BVa0clQ== X-Received: by 2002:a05:6808:3a16:b0:3b9:db4e:fccc with SMTP id gr22-20020a0568083a1600b003b9db4efcccmr19996420oib.11.1702753128207; Sat, 16 Dec 2023 10:58:48 -0800 (PST) Received: from [172.31.1.103] ([172.56.168.60]) by smtp.gmail.com with ESMTPSA id 13-20020a170902ee4d00b001cfc2d024edsm16148705plo.29.2023.12.16.10.58.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 16 Dec 2023 10:58:47 -0800 (PST) Message-ID: Date: Sat, 16 Dec 2023 11:58:44 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] RISC-V: Don't make Ztso imply A Content-Language: en-US To: Andrew Waterman Cc: Palmer Dabbelt , gcc-patches@gcc.gnu.org References: <20231213035405.2118-1-palmer@rivosinc.com> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SBL_CSS,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 12/15/23 17:14, Andrew Waterman wrote: > On Fri, Dec 15, 2023 at 1:38 PM Jeff Law wrote: >> >> >> >> On 12/12/23 20:54, Palmer Dabbelt wrote: >>> I can't actually find anything in the ISA manual that makes Ztso imply >>> A. In theory the memory ordering is just a different thing that the set >>> of availiable instructions (ie, Ztso without A would still imply TSO for >>> loads and stores). It also seems like a configuration that could be >>> sane to build: without A it's all but impossible to write any meaningful >>> multi-core code, and TSO is really cheap for a single core. >>> >>> That said, I think it's kind of reasonable to provide A to users asking >>> for Ztso. So maybe even if this was a mistake it's the right thing to >>> do? >>> >>> gcc/ChangeLog: >>> >>> * common/config/riscv/riscv-common.cc (riscv_implied_info): >>> Remove {"ztso", "a"}. >> I'd tend to think step #1 is to determine what the ISA intent is, >> meaning engagement with RVI. >> >> We've got time for that engagement and to adjust based on the result. >> So I'd tend to defer until we know if Ztso should imply A or not. > > Palmer is correct. There is no coupling between Ztso and A. (And > there are uncontrived examples of such systems: e.g. embedded > processors without caches that don't support the LR/SC instructions, > but happen to be TSO.) Thanks for the confirmation. Palmer, commit whenever is convenient for you. jeff