Get rid of darwin'isms. Provide convenient macro for assembler local lables.

llvm-svn: 129766
This commit is contained in:
Anton Korobeynikov 2011-04-19 17:50:09 +00:00
parent ee92a6b332
commit 1653610449
4 changed files with 17 additions and 13 deletions

View File

@ -36,7 +36,7 @@ DEFINE_COMPILERRT_FUNCTION(__divmodsi4)
sub r0, ip, r0, asr #31
sub r1, lr, r1, asr #31
// Unsigned divmod:
bl ___udivmodsi4
bl SYMBOL_NAME(__udivmodsi4)
// Apply the sign of quotient and modulus
ldr r1, [r6]
eor r0, r0, r4, asr #31

View File

@ -32,7 +32,7 @@ DEFINE_COMPILERRT_FUNCTION(__divsi3)
sub r0, r2, r0, asr #31
sub r1, r3, r1, asr #31
// abs(a) / abs(b)
bl ___udivsi3
bl SYMBOL_NAME(__udivsi3)
// Apply sign of quotient to result and return.
eor r0, r0, r4, asr #31
sub r0, r0, r4, asr #31

View File

@ -32,7 +32,7 @@ DEFINE_COMPILERRT_FUNCTION(__modsi3)
sub r0, r2, r0, asr #31
sub r1, r3, r1, asr #31
// abs(a) % abs(b)
bl ___umodsi3
bl SYMBOL_NAME(__umodsi3)
// Apply sign of dividend to result and return.
eor r0, r0, r4, asr #31
sub r0, r0, r4, asr #31

View File

@ -26,14 +26,18 @@
*values* of two macros. This is quite brittle, though. */
#if defined(__APPLE__)
#define SYMBOL_NAME(name) _##name
#define HIDDEN_DIRECTIVE .private_extern
#define LOCAL_LABEL(name) L_##name
#else
#define SYMBOL_NAME(name) name
#define HIDDEN_DIRECTIVE .hidden
#define LOCAL_LABEL(name) .L_##name
#endif
#ifdef VISIBILITY_HIDDEN
#define DEFINE_COMPILERRT_FUNCTION(name) \
.globl SYMBOL_NAME(name) SEPARATOR \
.private_extern SYMBOL_NAME(name) SEPARATOR \
HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR \
SYMBOL_NAME(name):
#else
#define DEFINE_COMPILERRT_FUNCTION(name) \
@ -43,12 +47,12 @@
#define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \
.globl SYMBOL_NAME(name) SEPARATOR \
.private_extern SYMBOL_NAME(name) SEPARATOR \
HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR \
SYMBOL_NAME(name):
#define DEFINE_COMPILERRT_PRIVATE_FUNCTION_UNMANGLED(name) \
.globl name SEPARATOR \
.private_extern name SEPARATOR \
HIDDEN_DIRECTIVE name SEPARATOR \
name:
#endif /* COMPILERRT_ASSEMBLY_H */