From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 2A4BA1F62E for ; Tue, 15 Jan 2019 00:41:45 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=QSv3+EIz5d7QoIyE +00+nKd1GOwji/cf0YOBiG7S7KK1lRaNlfLslxbqlc2223ToPP0HNhXhkxBDAQbA RmmQcx+kA1eRz0FhobSDehyDEtSpFkpD7CZZV04uSK2GQKeUu3/a0Hw/X6c5FM6Q CePOfW+f+UrQsBlJHxzVIHcUaYQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=1wQXivdKC9Cr2qT/WocLS1 SIwks=; b=PR5npuOIUNasq7ft74GUWxYPRm+MCFCbryoGwhL3BiDoIjUPU9Dcps BHhyvPalyrWGizNTYQTgu+0ijksgfqdRDO/enAqZ//gZ1v1ODJJIMw4aIt9jY8XR Af7JGoZiDAKsV+Dy/OGGpkfcd7Oe76p1MZc5d+tLtR2/Ov52OfTcA= Received: (qmail 125342 invoked by alias); 15 Jan 2019 00:41:42 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 125332 invoked by uid 89); 15 Jan 2019 00:41:42 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: smtprelay.synopsys.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1547512899; bh=FqZoOANwrWPSm4ifuG4i/YbBKFxnymKIGrcpzXXDeYA=; h=Subject:To:CC:References:From:Date:In-Reply-To:From; b=EeSvUTnqjMHcCnBxH6H0OBiDCf4kEF29TatQ4jnZs5q1C132XSkv7hnlr3PnrQWwl 6GzoWImRWPWkgpnpvzarMi/jp8dTd+hr4naxXBV4t62ugRywWp6KmdyUU6HuEhddLk 8n3lerslSfK05z/8gtv1kBNajM5TYfQawvzbMywPRDoTusxdFYjduNeEW+innc+QI0 KVWLDDaj5frZ0AT8pZPxIhahNTz7yB7UQd3SuJzgHxjXES05GZTlPFguvKraFIBF/D zLV+NobIHImn5Pofk/LugsgXVTDtZ1STdh3I1xsExewbgORk5RqL/yFOvUzF1DoPB9 wUxMOijZeKe7Q== Subject: Re: [PATCH 06/21] ARC: Atomics and Locking primitives To: Joseph Myers CC: , Newsgroups: gmane.comp.lib.glibc.alpha,gmane.linux.kernel.arc References: <1545167083-16764-1-git-send-email-vgupta@synopsys.com> <1545167083-16764-7-git-send-email-vgupta@synopsys.com> From: Vineet Gupta Openpgp: preference=signencrypt Message-ID: Date: Mon, 14 Jan 2019 16:40:36 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 12/18/18 3:15 PM, Joseph Myers wrote: > On Tue, 18 Dec 2018, Vineet Gupta wrote: > >> +#define USE_ATOMIC_COMPILER_BUILTINS 0 > > There is a strong preference for new ports to use 1 for this rather than 0 > (and not to have any asms in their atomic-machine.h unless there's some > reason use of built-in functions is unsuitable) - see the recently posted > C-Sky version, for example. If you can't use 1, there should be a good > reason, documented in a comment, for using asms instead of compiler > built-in functions (e.g. if the compiler built-in functions would result > in libatomic dependencies, which are unsuitable for glibc, rather than > being expanded inline). I tried switching to builtins and see the resulting differences in generated code: there's one snafu to begin with: gcc seems to be generating a DMB 0 for the barriers, which is a no-op, it needs to be DMB {1,2,3} for read, write, control... so that needs fixing there.