assembly.h revision 214152
1214152Sed/* ===-- assembly.h - compiler-rt assembler support macros -----------------=== 2214152Sed * 3214152Sed * The LLVM Compiler Infrastructure 4214152Sed * 5214152Sed * This file is distributed under the University of Illinois Open Source 6214152Sed * License. See LICENSE.TXT for details. 7214152Sed * 8214152Sed * ===----------------------------------------------------------------------=== 9214152Sed * 10214152Sed * This file defines macros for use in compiler-rt assembler source. 11214152Sed * This file is not part of the interface of this library. 12214152Sed * 13214152Sed * ===----------------------------------------------------------------------=== 14214152Sed */ 15214152Sed 16214152Sed#ifndef COMPILERRT_ASSEMBLY_H 17214152Sed#define COMPILERRT_ASSEMBLY_H 18214152Sed 19214152Sed#if defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) 20214152Sed#define SEPARATOR @ 21214152Sed#else 22214152Sed#define SEPARATOR ; 23214152Sed#endif 24214152Sed 25214152Sed/* We can't use __USER_LABEL_PREFIX__ here, it isn't possible to concatenate the 26214152Sed *values* of two macros. This is quite brittle, though. */ 27214152Sed#if defined(__APPLE__) 28214152Sed#define SYMBOL_NAME(name) _##name 29214152Sed#else 30214152Sed#define SYMBOL_NAME(name) name 31214152Sed#endif 32214152Sed 33214152Sed#ifdef VISIBILITY_HIDDEN 34214152Sed#define DEFINE_COMPILERRT_FUNCTION(name) \ 35214152Sed .globl SYMBOL_NAME(name) SEPARATOR \ 36214152Sed .private_extern SYMBOL_NAME(name) SEPARATOR \ 37214152Sed SYMBOL_NAME(name): 38214152Sed#else 39214152Sed#define DEFINE_COMPILERRT_FUNCTION(name) \ 40214152Sed .globl SYMBOL_NAME(name) SEPARATOR \ 41214152Sed SYMBOL_NAME(name): 42214152Sed#endif 43214152Sed 44214152Sed#define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \ 45214152Sed .globl SYMBOL_NAME(name) SEPARATOR \ 46214152Sed .private_extern SYMBOL_NAME(name) SEPARATOR \ 47214152Sed SYMBOL_NAME(name): 48214152Sed 49214152Sed#define DEFINE_COMPILERRT_PRIVATE_FUNCTION_UNMANGLED(name) \ 50214152Sed .globl name SEPARATOR \ 51214152Sed .private_extern name SEPARATOR \ 52214152Sed name: 53214152Sed 54214152Sed#endif /* COMPILERRT_ASSEMBLY_H */ 55