ARM: add __aeabi_d2h for truncation on AEABI systems

ARM does actually define the name for this conversion, so we should use it on
"-eabi" platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214176 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tim Northover 2014-07-29 09:56:45 +00:00
parent b1692ad2c3
commit 30ef915bb4
2 changed files with 2 additions and 1 deletions

View File

@ -312,6 +312,7 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
// Conversions between floating types.
// RTABI chapter 4.1.2, Table 7
{ RTLIB::FPROUND_F64_F32, "__aeabi_d2f", CallingConv::ARM_AAPCS, ISD::SETCC_INVALID },
{ RTLIB::FPROUND_F64_F16, "__aeabi_d2h", CallingConv::ARM_AAPCS, ISD::SETCC_INVALID },
{ RTLIB::FPEXT_F32_F64, "__aeabi_f2d", CallingConv::ARM_AAPCS, ISD::SETCC_INVALID },
// Integer to floating-point conversions.

View File

@ -73,7 +73,7 @@ define arm_aapcs_vfpcc i16 @test_to_fp16(double %in) {
; CHECK-ARMV8: vcvtb.f16.f64 [[TMP:s[0-9]+]], d0
; CHECK-ARMV8: vmov r0, [[TMP]]
; CHECK-SOFTFLOAT: bl __truncdfhf2
; CHECK-SOFTFLOAT: bl __aeabi_d2h
ret i16 %val
}