minix/sys/external/bsd/compiler_rt/dist/lib/arm/sync_synchronize.S
Lionel Sambuc 4684ddb6aa LLVM Minix changes
- import libcxx
 - reduce targets to the one when compiled as a tools

Change-Id: Iabb8427f80ff8e89463559a28bcb8b4f2bdbc496
2014-07-28 17:05:59 +02:00

35 lines
899 B
ArmAsm

//===-- sync_synchronize - Implement memory barrier * ----------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// When compiling a use of the gcc built-in __sync_synchronize() in thumb1 mode
// the compiler may emit a call to __sync_synchronize.
// On Darwin the implementation jumps to an OS supplied function named
// OSMemoryBarrier
//
.text
.syntax unified
#if __APPLE__
.align 2
DEFINE_COMPILERRT_PRIVATE_FUNCTION(__sync_synchronize)
stmfd sp!, {r7, lr}
add r7, sp, #0
bl _OSMemoryBarrier
ldmfd sp!, {r7, pc}
// tell linker it can break up file at label boundaries
.subsections_via_symbols
#endif