From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id 03B643858C52 for ; Thu, 25 Jan 2024 00:38:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 03B643858C52 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 03B643858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::331 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706143095; cv=none; b=QMng5NdKcP2HdsKcSRNX1g/XkWZC/Pu/1JcuVnmJutRe3jyinRgWnyAzT44FYIoCYG2NPr2eae3g63MSq6xI0TjaYdu61X6fd72eyXBuwmA60uq35BMEuzW19jsnMXt17bNlGO533U9QlPV4rulDmfVfRJLVW+JfkveHxCuRb3U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706143095; c=relaxed/simple; bh=41SD4btESaKVKzsbRmxhpLtsddLzKGCIi4QdMj/4ufk=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=lj2fgSmiPapEtzvYwRTbwUHV1u7tke+zJnh33XupCg4QmMARDX/EnULj7KxkQL/T9YBRRlZzfsABU8SQG4a4eR9igEme5ddMf8sJVptj1SLNH0ss/p5q7VSmK/vdyNFfiDCUnkbvfADn1cs9k0PsS/zWPaW0TAlv/vWE/T7kCY4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ot1-x331.google.com with SMTP id 46e09a7af769-6dddb927d02so3602955a34.2 for ; Wed, 24 Jan 2024 16:38:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1706143088; x=1706747888; 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=zNiX7HAeyYoZy4fUwbjcZ91n8KgZyUrALdndit/gSnY=; b=tpzuTNCk/0wuDkHfbzjQcq6gpy3k3xnjfuRvK2hrRdQlwPTd/lmVjLGPKXmEO30Gst Kq6ChD5d/Hwlicu2B3dCt5/mrSQ9L5lCtjXw78cp7K25ajDI4io9RFf2a3+m5mtAa9wa 3sLMV6WWdiaCfXOzQ/wIXu0ZFC29ncUjd6N4RhiREVsM2vGN31culeqphg9dpPJKbQ8I 8HeppsMSlb3Rwt0eE0XmvyIPDdPvmPymqvRRoq/+/EBxPwdx6+gpr5/lTfsuHlUCF2lP /j9oVRIx0mqwLa5kzc9cj69EiviejYU/RsPQlgDtJaxp8Cl6lnVPiWx2B+NxNMbeCfy4 L4qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706143088; x=1706747888; 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=zNiX7HAeyYoZy4fUwbjcZ91n8KgZyUrALdndit/gSnY=; b=TxhYmZbNxrftlnhGmnpSgQo8d3CsziuASoOu/u4Medmj2sGt+T4VhEaOZc0QMl16C9 B9F03wDLHjaVLjv9r7nWn4qA6Rac3rOucMzzJj3b96KqdMM2W/JhULQYxaqxlnomvzRv uh3vu4qm5xEOSbWSxLFwdvWM1QjNJjsGRDEQ2fbc9jI1iLBUAyBZsLqVlR9S+ea7i3Zl jOYYPim2gzMCK4y/xVulpxDX98UnCBgg3qYVtOAxLzwNpntAIRTlQbdOrcZynS+q3ZEf +oNarNzlDXKhLp9m417dZ7pFuFdszZJ0X1li6TtlFJxNtKrcbzBxF2nP+eb3BSrQlZnq X9Pg== X-Gm-Message-State: AOJu0YyP1m78/iLvM8gYKYBY33m099BJya/MpO1fIKViftPliKEA7Sml vfwlgrhKErrgor/liguYuiI5VfmUBE9vgac7nXvwnzff9P+vGpMoehsvtBw+CCV/dAAkOlDL17L C X-Google-Smtp-Source: AGHT+IE6iVuUwHPzblCYq9MwWRnyU3fA1sLlzxufg9FaZRlqMIjeG63ERZIXjWTLhuCnmxEUrkvjmg== X-Received: by 2002:a05:6359:4119:b0:176:7285:80dd with SMTP id kh25-20020a056359411900b00176728580ddmr229465rwc.11.1706143088337; Wed, 24 Jan 2024 16:38:08 -0800 (PST) Received: from [10.0.17.156] ([12.44.203.122]) by smtp.gmail.com with ESMTPSA id iq15-20020a17090afb4f00b00290616981besm248118pjb.25.2024.01.24.16.38.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jan 2024 16:38:07 -0800 (PST) Message-ID: <002c791b-fca1-4156-8105-0cf67ad33d72@rivosinc.com> Date: Wed, 24 Jan 2024 16:38:06 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [Committed] RISC-V: Don't make Ztso imply A Content-Language: en-US To: gcc-patches@gcc.gnu.org Cc: Andrew Waterman , Palmer Dabbelt , jeffreyalaw@gmail.com References: From: Patrick O'Neill In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 1/24/24 16:20, Palmer Dabbelt wrote: > On Wed, 24 Jan 2024 16:19:06 PST (-0800), jeffreyalaw@gmail.com wrote: >> >> >> On 1/24/24 17:07, Patrick O'Neill wrote: >>> On 12/16/23 10:58, Jeff Law wrote: >>>> >>>> >>>> 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 >>> >>> I was going to commit on behalf of Palmer and saw this was marked as >>> Deferred in patchworks: >>> https://patchwork.sourceware.org/project/gcc/patch/20231213035405.2118-1-palmer@rivosinc.com/ >>> >>> >>> Is this an old marking from before Andrew confirmed that they are >>> independent? >> Yea, I put into deferred before Andrew chimed in. > > OK, so I think we can just commit it? Committed. patrick