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/mulsf3vfp.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/mulsf3vfp.S')
-rw-r--r-- | compiler-rt/lib/builtins/arm/mulsf3vfp.S | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/builtins/arm/mulsf3vfp.S b/compiler-rt/lib/builtins/arm/mulsf3vfp.S index bef58d3a0c8..a1da789dcad 100644 --- a/compiler-rt/lib/builtins/arm/mulsf3vfp.S +++ b/compiler-rt/lib/builtins/arm/mulsf3vfp.S @@ -18,9 +18,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__mulsf3vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vmul.f32 s0, s0, s1 +#else vmov s14, r0 // move first param from r0 into float register vmov s15, r1 // move second param from r1 into float register vmul.f32 s13, s14, s15 +#endif vmov r0, s13 // move result back to r0 bx lr END_COMPILERRT_FUNCTION(__mulsf3vfp) |