From: Saleem Abdulrasool Date: Sun, 1 Jun 2014 04:07:03 +0000 (+0000) Subject: compiler-rt: whitespace and uniformity for arm X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=57aa97f53a76478c405b3d0900134a27130163e0;p=platform%2Fupstream%2Fllvm.git compiler-rt: whitespace and uniformity for arm 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 --- diff --git a/compiler-rt/lib/builtins/arm/bswapdi2.S b/compiler-rt/lib/builtins/arm/bswapdi2.S index 14070fd..6f228c5 100644 --- a/compiler-rt/lib/builtins/arm/bswapdi2.S +++ b/compiler-rt/lib/builtins/arm/bswapdi2.S @@ -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 diff --git a/compiler-rt/lib/builtins/arm/bswapsi2.S b/compiler-rt/lib/builtins/arm/bswapsi2.S index 0fa2d98..9671339 100644 --- a/compiler-rt/lib/builtins/arm/bswapsi2.S +++ b/compiler-rt/lib/builtins/arm/bswapsi2.S @@ -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 diff --git a/compiler-rt/lib/builtins/arm/clzdi2.S b/compiler-rt/lib/builtins/arm/clzdi2.S index 841ba7b..08a18f7 100644 --- a/compiler-rt/lib/builtins/arm/clzdi2.S +++ b/compiler-rt/lib/builtins/arm/clzdi2.S @@ -14,8 +14,8 @@ #include "../assembly.h" .syntax unified - .text + .p2align 2 DEFINE_COMPILERRT_FUNCTION(__clzdi2) #ifdef __ARM_FEATURE_CLZ diff --git a/compiler-rt/lib/builtins/arm/clzsi2.S b/compiler-rt/lib/builtins/arm/clzsi2.S index de53f4f..d177b72 100644 --- a/compiler-rt/lib/builtins/arm/clzsi2.S +++ b/compiler-rt/lib/builtins/arm/clzsi2.S @@ -14,8 +14,8 @@ #include "../assembly.h" .syntax unified - .text + .p2align 2 DEFINE_COMPILERRT_FUNCTION(__clzsi2) #ifdef __ARM_FEATURE_CLZ diff --git a/compiler-rt/lib/builtins/arm/divmodsi4.S b/compiler-rt/lib/builtins/arm/divmodsi4.S index ff37d9f..fc017a1 100644 --- a/compiler-rt/lib/builtins/arm/divmodsi4.S +++ b/compiler-rt/lib/builtins/arm/divmodsi4.S @@ -21,8 +21,10 @@ #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 diff --git a/compiler-rt/lib/builtins/arm/divsi3.S b/compiler-rt/lib/builtins/arm/divsi3.S index 08f3aba..afb0acd 100644 --- a/compiler-rt/lib/builtins/arm/divsi3.S +++ b/compiler-rt/lib/builtins/arm/divsi3.S @@ -20,8 +20,10 @@ #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) diff --git a/compiler-rt/lib/builtins/arm/modsi3.S b/compiler-rt/lib/builtins/arm/modsi3.S index b7933ea..4be4a22 100644 --- a/compiler-rt/lib/builtins/arm/modsi3.S +++ b/compiler-rt/lib/builtins/arm/modsi3.S @@ -20,8 +20,10 @@ #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 diff --git a/compiler-rt/lib/builtins/arm/udivmodsi4.S b/compiler-rt/lib/builtins/arm/udivmodsi4.S index bb5d29c..ddc8752 100644 --- a/compiler-rt/lib/builtins/arm/udivmodsi4.S +++ b/compiler-rt/lib/builtins/arm/udivmodsi4.S @@ -15,8 +15,8 @@ #include "../assembly.h" .syntax unified - .text + .p2align 2 DEFINE_COMPILERRT_FUNCTION(__udivmodsi4) #if __ARM_ARCH_EXT_IDIV__ diff --git a/compiler-rt/lib/builtins/arm/udivsi3.S b/compiler-rt/lib/builtins/arm/udivsi3.S index 11c1c09..8fb1dca 100644 --- a/compiler-rt/lib/builtins/arm/udivsi3.S +++ b/compiler-rt/lib/builtins/arm/udivsi3.S @@ -15,8 +15,8 @@ #include "../assembly.h" .syntax unified - .text + .p2align 2 DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_uidiv, __udivsi3) DEFINE_COMPILERRT_FUNCTION(__udivsi3) diff --git a/compiler-rt/lib/builtins/arm/umodsi3.S b/compiler-rt/lib/builtins/arm/umodsi3.S index a03afef..164646b 100644 --- a/compiler-rt/lib/builtins/arm/umodsi3.S +++ b/compiler-rt/lib/builtins/arm/umodsi3.S @@ -15,8 +15,8 @@ #include "../assembly.h" .syntax unified - .text + .p2align 2 DEFINE_COMPILERRT_FUNCTION(__umodsi3) #if __ARM_ARCH_EXT_IDIV__ diff --git a/compiler-rt/lib/builtins/x86_64/floatundidf.S b/compiler-rt/lib/builtins/x86_64/floatundidf.S index 28babfd..65601dc 100644 --- a/compiler-rt/lib/builtins/x86_64/floatundidf.S +++ b/compiler-rt/lib/builtins/x86_64/floatundidf.S @@ -20,11 +20,13 @@ #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) diff --git a/compiler-rt/lib/builtins/x86_64/floatundisf.S b/compiler-rt/lib/builtins/x86_64/floatundisf.S index b5ca4f39..fa8177a 100644 --- a/compiler-rt/lib/builtins/x86_64/floatundisf.S +++ b/compiler-rt/lib/builtins/x86_64/floatundisf.S @@ -10,7 +10,8 @@ #ifndef __ELF__ .literal4 #endif -two: .single 2.0 +two: + .single 2.0 #define REL_ADDR(_a) (_a)(%rip) diff --git a/compiler-rt/lib/builtins/x86_64/floatundixf.S b/compiler-rt/lib/builtins/x86_64/floatundixf.S index 36b837c..a0e8b17 100644 --- a/compiler-rt/lib/builtins/x86_64/floatundixf.S +++ b/compiler-rt/lib/builtins/x86_64/floatundixf.S @@ -10,13 +10,15 @@ #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)