From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2408 invoked by alias); 8 Aug 2012 22:13:27 -0000 Received: (qmail 2400 invoked by uid 22791); 8 Aug 2012 22:13:26 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from toast.topped-with-meat.com (HELO topped-with-meat.com) (204.197.218.159) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Aug 2012 22:13:03 +0000 Received: by topped-with-meat.com (Postfix, from userid 5281) id 6648D2C0ED; Wed, 8 Aug 2012 15:13:02 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Richard Henderson Cc: libc-ports@sourceware.org Subject: Re: [PATCH roland/arm-atomic-warn] Fiddle ARM atomic.h to avoid -Wvolatile-register-var warnings. In-Reply-To: Richard Henderson's message of Wednesday, 8 August 2012 15:02:12 -0700 <5022E1E4.7040801@twiddle.net> References: <20120808204442.9B9F82C085@topped-with-meat.com> <5022E1E4.7040801@twiddle.net> Message-Id: <20120808221302.6648D2C0ED@topped-with-meat.com> Date: Wed, 08 Aug 2012 22:13:00 -0000 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.0 cv=LtfpOghc c=1 sm=1 a=Y4-sxNXo6z4A:10 a=Z6MIti7PxpgA:10 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=14OXPxybAAAA:8 a=ZDYe2OYsO1i6-0A-wQcA:9 a=CjuIK1q_8ugA:10 a=WkljmVdYkabdwxfqvArNOQ==:117 X-IsSubscribed: yes Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00066.txt.bz2 > Is it really worth working so hard to avoid the gcc builtins? > Yes, gcc before 4.7 doesn't have __atomic to avoid the extra > barriers, but at least 4.7 and later will. That file uses them #ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4. I was just killing a warning without worrying about why the code path was being used. > May I ask what gcc version you're targeting, anyway? I'm using today's trunk, cross --target=arm-linux-gnueabi and no other special options. I don't know why __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is not defined. Probably it would be with appropriate -march= settings. Thanks, Roland