diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-01-11 16:19:25 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-01-11 16:19:25 +0000 |
commit | 9c287bca23e0f7279a43b753dd1310b78c38bc15 (patch) | |
tree | 4cbe85d201ab08db6c963da0e11213155b9f0178 /compiler-rt/lib/builtins/arm/ltsf2vfp.S | |
parent | 4bf308317d9e64b4a1067de1d5d74326591c7e33 (diff) | |
download | bcm5719-llvm-9c287bca23e0f7279a43b753dd1310b78c38bc15.tar.gz bcm5719-llvm-9c287bca23e0f7279a43b753dd1310b78c38bc15.zip |
builtins: support building ARM builtins for a HF target
The `-target` impacts the CC for the builtins. HF targets (with either
floating point ABI) always use AAPCS VFP for the builtins unless they
are AEABI builtins, in which case they use AAPCS. Non-HF targets (with
either floating point ABI) always use AAPCS for the builtins and AAPCS
for the AEABI builtins. This introduces the thunks necessary to switch
CC for the floating point operations. This is not currently enabled,
and should be dependent on the target being used to build compiler-rt.
However, as a stop-gap, a define can be added for ASFLAGS to get the
thunks.
llvm-svn: 291677
Diffstat (limited to 'compiler-rt/lib/builtins/arm/ltsf2vfp.S')
-rw-r--r-- | compiler-rt/lib/builtins/arm/ltsf2vfp.S | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/builtins/arm/ltsf2vfp.S b/compiler-rt/lib/builtins/arm/ltsf2vfp.S index 95febb60672..c4ff812b49a 100644 --- a/compiler-rt/lib/builtins/arm/ltsf2vfp.S +++ b/compiler-rt/lib/builtins/arm/ltsf2vfp.S @@ -19,9 +19,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__ltsf2vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcmp.f32 s0, s1 +#else vmov s14, r0 // move from GPR 0 to float register vmov s15, r1 // move from GPR 1 to float register vcmp.f32 s14, s15 +#endif vmrs apsr_nzcv, fpscr movmi r0, #1 // set result register to 1 if equal movpl r0, #0 |