From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by sourceware.org (Postfix) with ESMTPS id A006A394CC30 for ; Tue, 2 May 2023 20:15:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A006A394CC30 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-pf1-x443.google.com with SMTP id d2e1a72fcca58-64115eef620so37568779b3a.1 for ; Tue, 02 May 2023 13:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1683058559; x=1685650559; 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=mRb6IeaGE14w4H9fywVrXxiF7dKEGThwVzv47RnmRi8=; b=P/M2N7/1M1hPsgHzi5rureclhAXRxStRwsKwfTwhjmyVDzoxrenOXEqkFy+RO40KzO SV+BoLV8RQ5L93YzE/2fOCNmAvDQdNKG9ainlD0dVI2z//iNt4JoNLfWr7BgXH6My3XG 2tHC49YCI7WVcAuez4t4ZXBm5vS3n9TE9q3YwhN/KvzCNmtCU2dEZOxzOJ4/tfeMKILe 5UX2Tk7L3i4GobMCfShrclBwCEpIHsa+KXeAXbl9gMmFrtrf74b7dzmJEPjW6NhO007D YHu68H3+CX0R5Ow3/UnunF79ENvyiAEH8d7fn+ilhATrdQuLgOYNeCOAVVWFggyYJoM+ wYbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683058559; x=1685650559; 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=mRb6IeaGE14w4H9fywVrXxiF7dKEGThwVzv47RnmRi8=; b=NeVjW26X/nPIxfQ1vTJ33Vo4Req6POmt4QU+flmeRpqizMcfGL0yForUzJQogGGcwt zN2nE0tMzogrEj0B1lsyKNX7H9BZi7Z4Ow+rTs1+A0lhMb9jr7uq3Q7Q2r3CvfWtvvmx knoqNai69wFsxz/lZ5L/F+zqyLabkQ2ElW8xodWEhOIMOKcG/hmD4wCtNCRLtqggZAfZ 0c9owjdeDgYI69OSzYZf+uTRWBbM1puogwl7WwJaJdsq1kSfKS+lQrrw7JtesACFbvg1 HrP2dxNEq040k6niB+OjUZQP4bjNeHcZqMetCoPnzSdmTGF5gGEl975+2HA1MYXhkORy DvFQ== X-Gm-Message-State: AC+VfDxc1hOKLIXjjclCH5irnog31ska9KAJnwEHbT3zMIDM6T0SfDxV lsNgIBNyCi4/FiQV5rP+1Ot7yg== X-Google-Smtp-Source: ACHHUZ7yXdA9CkXp6l4hXukzSM7bvOShRQwxGW4kA+VDgFkPnk0IknU3m16a3zWpQ5NuBaJUzomF+w== X-Received: by 2002:a17:902:db07:b0:1a6:e564:6044 with SMTP id m7-20020a170902db0700b001a6e5646044mr22137048plx.7.1683058558745; Tue, 02 May 2023 13:15:58 -0700 (PDT) Received: from [10.0.17.156] ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id bh7-20020a170902a98700b001a19cf1b37esm20169012plb.40.2023.05.02.13.15.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 May 2023 13:15:58 -0700 (PDT) Message-ID: <8a09c335-406f-9c01-6bd3-1aa3f9483615@rivosinc.com> Date: Tue, 2 May 2023 13:15:56 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: [Committed 04/11] RISC-V: Enforce atomic compare_exchange SEQ_CST Content-Language: en-US To: Jeff Law , gcc-patches@gcc.gnu.org Cc: palmer@rivosinc.com, gnu-toolchain@rivosinc.com, vineetg@rivosinc.com, andrew@sifive.com, kito.cheng@sifive.com, dlustig@nvidia.com, cmuellner@gcc.gnu.org, andrea@rivosinc.com, hboehm@google.com References: <20230414170942.1695672-1-patrick@rivosinc.com> <20230427162301.1151333-1-patrick@rivosinc.com> <20230427162301.1151333-5-patrick@rivosinc.com> 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.5 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,KAM_SHORT,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 4/28/23 10:23, Jeff Law wrote: > > > On 4/27/23 10:22, Patrick O'Neill wrote: >> This patch enforces SEQ_CST for atomic compare_exchange ops. >> >> Replace Fence/LR.aq/SC.aq pairs with SEQ_CST LR.aqrl/SC.rl pairs >> recommended by table A.6 of the ISA manual. >> >> 2023-04-27 Patrick O'Neill >> >> gcc/ChangeLog: >> >>     * config/riscv/sync.md: Change FENCE/LR.aq/SC.aq into >>     sequentially consistent LR.aqrl/SC.rl pair. > OK.  Note that generally you should note which pattern you're changing > in a ChangeLog entry, similar to how we note the function being > changed.  So something like this might be better: > >     * config/riscv/sync.md (atomic_cas_value_strong): ... > > Jeff Edited ChangeLog and committed: gcc/ChangeLog:     * config/riscv/sync.md (atomic_cas_value_strong): Change     FENCE/LR.aq/SC.aq into sequentially consistent LR.aqrl/SC.rl     pair. Patrick