From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94447 invoked by alias); 30 May 2019 20:50:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 94439 invoked by uid 89); 30 May 2019 20:50:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=our X-HELO: mail-ua1-f44.google.com Received: from mail-ua1-f44.google.com (HELO mail-ua1-f44.google.com) (209.85.222.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 May 2019 20:50:28 +0000 Received: by mail-ua1-f44.google.com with SMTP id n7so3001460uap.12 for ; Thu, 30 May 2019 13:50:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7riqu+Ig6VAcVhkh6HH1hAlm3hVClrwBEpkIiI8Jm1c=; b=K3LoMkBbNrjk9aFvHpmUEm1L/C/KyyFrxYST/Up67FSTxl+BQ1nIw9JWijWyX4UO/q PjuYUKg8irv04L6Li7UmysYl+b0Z9gOvp2CvuVfMdOM/nnXR4VENgnxdbJ2VcKVmJFql UHkN0MlfcwAfPESN9C3RzSpVmngFpyOEPnFUKDWDNn+Lg3Wh4BXTcLyxiWRiX6ZY+Aqt jCR5+v2q76ku9HoFrKgyMmPkv7mrJXhtBMBWsycFg1bKo2xVqrMekxJ8gvGBWTScG+px 2fhzDmNDZkUXGhHmrI4RcvuTP3FEISygycPI+/0yZx2U67l0LhL6HPIRjh8AqT4m88cs vfWg== MIME-Version: 1.0 References: <87a7fibpms.fsf@igel.home> In-Reply-To: From: Jim Wilson Date: Thu, 30 May 2019 20:51:00 -0000 Message-ID: Subject: Re: [gofrontend-dev] Re: Go patch committed: Intrinsify runtime/internal/atomic functions To: Cherry Zhang Cc: Andreas Schwab , Ian Lance Taylor , gcc-patches , gofrontend-dev Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg02057.txt.bz2 On Wed, May 22, 2019 at 6:36 PM Cherry Zhang wrote: > Jim, thank you for the fix! The patch looks good to me. Maybe we should also apply this to __atomic_add_fetch_4 and __atomic_add_fetch_8? Sorry about the delay, I caught a virus last week and am behind on everything. For 64-bit RISC-V those are open coded and hence not a problems. All of the major targets open code everything except RISC-V which needs a library call for the 1 and 2 byte atomics, though this is on our list of things to fix. We just haven't gotten around to it yet. For 32-bit RISC-V, the 8-byte atomic would require a library call, but 32-bit riscv-linux isn't formally supported, as the glibc patches are not upstream yet, so this isn't a practical problem yet. Anyways, yes, in theory, we should be handling these two also, but there probably aren't any well supported targets that will fail if they are missing. Jim