[llvm-commits] [compiler-rt] r129766 - in /compiler-rt/trunk/lib: arm/divmodsi4.S arm/divsi3.S arm/modsi3.S assembly.h

Anton Korobeynikov asl at math.spbu.ru
Tue Apr 19 10:50:09 PDT 2011


Author: asl
Date: Tue Apr 19 12:50:09 2011
New Revision: 129766

URL: http://llvm.org/viewvc/llvm-project?rev=129766&view=rev
Log:
Get rid of darwin'isms. Provide convenient macro for assembler local lables.

Modified:
    compiler-rt/trunk/lib/arm/divmodsi4.S
    compiler-rt/trunk/lib/arm/divsi3.S
    compiler-rt/trunk/lib/arm/modsi3.S
    compiler-rt/trunk/lib/assembly.h

Modified: compiler-rt/trunk/lib/arm/divmodsi4.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/arm/divmodsi4.S?rev=129766&r1=129765&r2=129766&view=diff
==============================================================================
--- compiler-rt/trunk/lib/arm/divmodsi4.S (original)
+++ compiler-rt/trunk/lib/arm/divmodsi4.S Tue Apr 19 12:50:09 2011
@@ -36,7 +36,7 @@
     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

Modified: compiler-rt/trunk/lib/arm/divsi3.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/arm/divsi3.S?rev=129766&r1=129765&r2=129766&view=diff
==============================================================================
--- compiler-rt/trunk/lib/arm/divsi3.S (original)
+++ compiler-rt/trunk/lib/arm/divsi3.S Tue Apr 19 12:50:09 2011
@@ -32,7 +32,7 @@
     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

Modified: compiler-rt/trunk/lib/arm/modsi3.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/arm/modsi3.S?rev=129766&r1=129765&r2=129766&view=diff
==============================================================================
--- compiler-rt/trunk/lib/arm/modsi3.S (original)
+++ compiler-rt/trunk/lib/arm/modsi3.S Tue Apr 19 12:50:09 2011
@@ -32,7 +32,7 @@
     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

Modified: compiler-rt/trunk/lib/assembly.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/assembly.h?rev=129766&r1=129765&r2=129766&view=diff
==============================================================================
--- compiler-rt/trunk/lib/assembly.h (original)
+++ compiler-rt/trunk/lib/assembly.h Tue Apr 19 12:50:09 2011
@@ -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 */





More information about the llvm-commits mailing list