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/truncdfsf2vfp.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/truncdfsf2vfp.S')
-rw-r--r-- | compiler-rt/lib/builtins/arm/truncdfsf2vfp.S | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/builtins/arm/truncdfsf2vfp.S b/compiler-rt/lib/builtins/arm/truncdfsf2vfp.S index 04287ad27ce..682e54d3d29 100644 --- a/compiler-rt/lib/builtins/arm/truncdfsf2vfp.S +++ b/compiler-rt/lib/builtins/arm/truncdfsf2vfp.S @@ -19,9 +19,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__truncdfsf2vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcvt.f32.f64 s0, d0 +#else vmov d7, r0, r1 // load double from r0/r1 pair vcvt.f32.f64 s15, d7 // convert double to single (trucate precision) vmov r0, s15 // return result in r0 +#endif bx lr END_COMPILERRT_FUNCTION(__truncdfsf2vfp) |