forked from OSchip/llvm-project
Get rid of darwin'isms. Provide convenient macro for assembler local lables.
llvm-svn: 129766
This commit is contained in:
parent
ee92a6b332
commit
1653610449
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -26,29 +26,33 @@
|
|||
*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 \
|
||||
#define DEFINE_COMPILERRT_FUNCTION(name) \
|
||||
.globl SYMBOL_NAME(name) SEPARATOR \
|
||||
HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR \
|
||||
SYMBOL_NAME(name):
|
||||
#else
|
||||
#define DEFINE_COMPILERRT_FUNCTION(name) \
|
||||
.globl SYMBOL_NAME(name) SEPARATOR \
|
||||
#define DEFINE_COMPILERRT_FUNCTION(name) \
|
||||
.globl SYMBOL_NAME(name) SEPARATOR \
|
||||
SYMBOL_NAME(name):
|
||||
#endif
|
||||
|
||||
#define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \
|
||||
.globl SYMBOL_NAME(name) SEPARATOR \
|
||||
.private_extern SYMBOL_NAME(name) SEPARATOR \
|
||||
#define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \
|
||||
.globl 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 \
|
||||
.globl name SEPARATOR \
|
||||
HIDDEN_DIRECTIVE name SEPARATOR \
|
||||
name:
|
||||
|
||||
#endif /* COMPILERRT_ASSEMBLY_H */
|
||||
|
|
Loading…
Reference in New Issue