forked from OSchip/llvm-project
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
This commit is contained in:
parent
23b4ecbff4
commit
57aa97f53a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
#include "../assembly.h"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
.p2align 2
|
||||
DEFINE_COMPILERRT_FUNCTION(__clzdi2)
|
||||
#ifdef __ARM_FEATURE_CLZ
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
#include "../assembly.h"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
.p2align 2
|
||||
DEFINE_COMPILERRT_FUNCTION(__clzsi2)
|
||||
#ifdef __ARM_FEATURE_CLZ
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
#include "../assembly.h"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
.p2align 2
|
||||
DEFINE_COMPILERRT_FUNCTION(__udivmodsi4)
|
||||
#if __ARM_ARCH_EXT_IDIV__
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
#include "../assembly.h"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
.p2align 2
|
||||
DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_uidiv, __udivsi3)
|
||||
DEFINE_COMPILERRT_FUNCTION(__udivsi3)
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
#include "../assembly.h"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
.p2align 2
|
||||
DEFINE_COMPILERRT_FUNCTION(__umodsi3)
|
||||
#if __ARM_ARCH_EXT_IDIV__
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
#ifndef __ELF__
|
||||
.literal4
|
||||
#endif
|
||||
two: .single 2.0
|
||||
two:
|
||||
.single 2.0
|
||||
|
||||
#define REL_ADDR(_a) (_a)(%rip)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue