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 | 2d5a51da2c5ce01ab0f43556388de96efc70d3f1 (patch) | |
tree | 16c989d817cbf492a1586bae43b8876c3c64f594 /lib/builtins/arm/negsf2vfp.S | |
parent | d7d74b37574937c97965d3b2156d793b00b0d86f (diff) | |
download | compiler-rt-2d5a51da2c5ce01ab0f43556388de96efc70d3f1.tar.gz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291677 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/arm/negsf2vfp.S')
-rw-r--r-- | lib/builtins/arm/negsf2vfp.S | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/builtins/arm/negsf2vfp.S b/lib/builtins/arm/negsf2vfp.S index 797abb32e..46ab4a9cf 100644 --- a/lib/builtins/arm/negsf2vfp.S +++ b/lib/builtins/arm/negsf2vfp.S @@ -18,7 +18,11 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__negsf2vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vneg.f32 s0, s0 +#else eor r0, r0, #-2147483648 // flip sign bit on float in r0 +#endif bx lr END_COMPILERRT_FUNCTION(__negsf2vfp) |