compiler-rt: whitespace and uniformity for arm
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 1 Jun 2014 04:07:03 +0000 (04:07 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 1 Jun 2014 04:07:03 +0000 (04:07 +0000)
Make the whitespace a bit more uniform in the various assembly routines.  This
also makes the assembly files a bit more uniform on the ARM side by explicitly
stating that it is using the unified syntax and that the contents of the code is
in the text section (or segment).  No functional change.

llvm-svn: 209985

13 files changed:
compiler-rt/lib/builtins/arm/bswapdi2.S
compiler-rt/lib/builtins/arm/bswapsi2.S
compiler-rt/lib/builtins/arm/clzdi2.S
compiler-rt/lib/builtins/arm/clzsi2.S
compiler-rt/lib/builtins/arm/divmodsi4.S
compiler-rt/lib/builtins/arm/divsi3.S
compiler-rt/lib/builtins/arm/modsi3.S
compiler-rt/lib/builtins/arm/udivmodsi4.S
compiler-rt/lib/builtins/arm/udivsi3.S
compiler-rt/lib/builtins/arm/umodsi3.S
compiler-rt/lib/builtins/x86_64/floatundidf.S
compiler-rt/lib/builtins/x86_64/floatundisf.S
compiler-rt/lib/builtins/x86_64/floatundixf.S

index 14070fd..6f228c5 100644 (file)
@@ -9,12 +9,15 @@
 
 #include "../assembly.h"
 
+       .syntax unified
+       .text
+
 //
 // extern uint64_t __bswapdi2(uint64_t);
 //
 // Reverse all the bytes in a 64-bit integer.
 //
-.p2align 2
+       .p2align 2
 DEFINE_COMPILERRT_FUNCTION(__bswapdi2)
 #if __ARM_ARCH < 6
     // before armv6 does not have "rev" instruction
index 0fa2d98..9671339 100644 (file)
@@ -9,12 +9,15 @@
 
 #include "../assembly.h"
 
+       .syntax unified
+       .text
+
 //
 // extern uint32_t __bswapsi2(uint32_t);
 //
 // Reverse all the bytes in a 32-bit integer.
 //
-.p2align 2
+       .p2align 2
 DEFINE_COMPILERRT_FUNCTION(__bswapsi2)
 #if __ARM_ARCH < 6
     // before armv6 does not have "rev" instruction
index 841ba7b..08a18f7 100644 (file)
@@ -14,8 +14,8 @@
 #include "../assembly.h"
 
        .syntax unified
-
        .text
+
        .p2align        2
 DEFINE_COMPILERRT_FUNCTION(__clzdi2)
 #ifdef __ARM_FEATURE_CLZ
index de53f4f..d177b72 100644 (file)
@@ -14,8 +14,8 @@
 #include "../assembly.h"
 
        .syntax unified
-
        .text
+
        .p2align        2
 DEFINE_COMPILERRT_FUNCTION(__clzsi2)
 #ifdef __ARM_FEATURE_CLZ
index ff37d9f..fc017a1 100644 (file)
 #define CLEAR_FRAME_AND_RETURN \
     pop    {r4-r7, pc}
 
-.syntax unified
-.p2align 3
+       .syntax unified
+       .text
+
+       .p2align 3
 DEFINE_COMPILERRT_FUNCTION(__divmodsi4)
 #if __ARM_ARCH_EXT_IDIV__
        tst     r1, r1
index 08f3aba..afb0acd 100644 (file)
 #define CLEAR_FRAME_AND_RETURN \
     pop    {r4, r7, pc}
 
-.syntax unified
-.p2align 3
+       .syntax unified
+       .text
+
+       .p2align 3
 // Ok, APCS and AAPCS agree on 32 bit args, so it's safe to use the same routine.
 DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_idiv, __divsi3)
 DEFINE_COMPILERRT_FUNCTION(__divsi3)
index b7933ea..4be4a22 100644 (file)
 #define CLEAR_FRAME_AND_RETURN \
     pop    {r4, r7, pc}
 
-.syntax unified
-.p2align 3
+       .syntax unified
+       .text
+
+       .p2align 3
 DEFINE_COMPILERRT_FUNCTION(__modsi3)
 #if __ARM_ARCH_EXT_IDIV__
        tst     r1, r1
index bb5d29c..ddc8752 100644 (file)
@@ -15,8 +15,8 @@
 #include "../assembly.h"
 
        .syntax unified
-
        .text
+
        .p2align 2
 DEFINE_COMPILERRT_FUNCTION(__udivmodsi4)
 #if __ARM_ARCH_EXT_IDIV__
index 11c1c09..8fb1dca 100644 (file)
@@ -15,8 +15,8 @@
 #include "../assembly.h"
 
        .syntax unified
-
        .text
+
        .p2align 2
 DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_uidiv, __udivsi3)
 DEFINE_COMPILERRT_FUNCTION(__udivsi3)
index a03afef..164646b 100644 (file)
@@ -15,8 +15,8 @@
 #include "../assembly.h"
 
        .syntax unified
-
        .text
+
        .p2align 2
 DEFINE_COMPILERRT_FUNCTION(__umodsi3)
 #if __ARM_ARCH_EXT_IDIV__
index 28babfd..65601dc 100644 (file)
 #ifndef __ELF__
 .const
 #endif
-.balign 4
-twop52: .quad 0x4330000000000000
+       .balign 4
+twop52:
+       .quad 0x4330000000000000
 twop84_plus_twop52:
-               .quad 0x4530000000100000
-twop84: .quad 0x4530000000000000
+       .quad 0x4530000000100000
+twop84:
+       .quad 0x4530000000000000
 
 #define REL_ADDR(_a)   (_a)(%rip)
 
index b5ca4f3..fa8177a 100644 (file)
@@ -10,7 +10,8 @@
 #ifndef __ELF__
 .literal4
 #endif
-two: .single 2.0
+two:
+       .single 2.0
 
 #define REL_ADDR(_a)   (_a)(%rip)
 
index 36b837c..a0e8b17 100644 (file)
 #ifndef __ELF__
 .const
 #endif
-.balign 4
-twop64: .quad 0x43f0000000000000
+       .balign 4
+twop64:
+       .quad 0x43f0000000000000
 
 #define REL_ADDR(_a)   (_a)(%rip)
 
-.text
-.balign 4
+       .text
+
+       .balign 4
 DEFINE_COMPILERRT_FUNCTION(__floatundixf)
        movq    %rdi,    -8(%rsp)
        fildq   -8(%rsp)
@@ -35,12 +37,16 @@ END_COMPILERRT_FUNCTION(__floatundixf)
 
 #ifdef __x86_64__
 
-.const
-.balign 4
-twop52: .quad 0x4330000000000000
+#if defined(__APPLE__)
+       .const
+#endif
+       .balign 4
+twop52:
+       .quad 0x4330000000000000
 twop84_plus_twop52_neg:
-               .quad 0xc530000000100000
-twop84: .quad 0x4530000000000000
+       .quad 0xc530000000100000
+twop84:
+       .quad 0x4530000000000000
 
 #define REL_ADDR(_a)   (_a)(%rip)