From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31058 invoked by alias); 5 Apr 2010 14:10:44 -0000 Received: (qmail 31020 invoked by uid 48); 5 Apr 2010 14:10:30 -0000 Date: Mon, 05 Apr 2010 14:10:00 -0000 Message-ID: <20100405141030.31019.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/33413] Please provide __sync_lock_test_and_set builtin for ARM using swap insn In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "spam_from_gcc_bugzilla at chezphil dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg00398.txt.bz2 ------- Comment #2 from spam_from_gcc_bugzilla at chezphil dot org 2010-04-05 14:10 ------- Hi Richard, This is obviously less of an issue than it was in 2007. I think there are enough pre-ARMv6 systems still deployed that they cannot be ignored, though. For example, I believe that the Android native development kit assumes that the hardware is >= ARMv5. Currently, portable code need to do something like: #if v6 or newer ...use gcc builtins, which generate ldx/stx... #else ...use asm statements that generate swp... #endif It would be a bit less clunky if gcc builtins could be used in both cases. Personally, I use asm sufficiently rarely that it takes me a while to work out the syntax each time (both the actual assembler syntax and the gcc asm statement syntax). The builtins are much easier to use. Regards, Phil. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33413