[builtins] Move Windows/ARM frontends for fix/float functions into the individual source files

This avoids pulling in all of them if only one of them is needed
(if builtins are built without -ffunction-sections), and matches how
the similar aliases for AEABI are set up.

Differential Revision: https://reviews.llvm.org/D107815
This commit is contained in:
Martin Storsjö
2021-08-10 13:27:08 +03:00
parent f2694500c2
commit e6407356ba
10 changed files with 32 additions and 35 deletions

View File

@@ -492,7 +492,6 @@ if(MINGW)
arm/aeabi_uidivmod.S
arm/aeabi_uldivmod.S
arm/chkstk.S
mingw_fixfloat.c
${arm_SOURCES}
)
elseif(NOT WIN32)

View File

@@ -42,3 +42,7 @@ AEABI_RTABI di_int __aeabi_d2lz(fp_t a) { return __fixdfdi(a); }
COMPILER_RT_ALIAS(__fixdfdi, __aeabi_d2lz)
#endif
#endif
#if defined(__MINGW32__) && defined(__arm__)
COMPILER_RT_ALIAS(__fixdfdi, __dtoi64)
#endif

View File

@@ -42,3 +42,7 @@ AEABI_RTABI di_int __aeabi_f2lz(fp_t a) { return __fixsfdi(a); }
COMPILER_RT_ALIAS(__fixsfdi, __aeabi_f2lz)
#endif
#endif
#if defined(__MINGW32__) && defined(__arm__)
COMPILER_RT_ALIAS(__fixsfdi, __stoi64)
#endif

View File

@@ -40,3 +40,7 @@ AEABI_RTABI du_int __aeabi_d2ulz(fp_t a) { return __fixunsdfdi(a); }
COMPILER_RT_ALIAS(__fixunsdfdi, __aeabi_d2ulz)
#endif
#endif
#if defined(__MINGW32__) && defined(__arm__)
COMPILER_RT_ALIAS(__fixunsdfdi, __dtou64)
#endif

View File

@@ -41,3 +41,7 @@ AEABI_RTABI du_int __aeabi_f2ulz(fp_t a) { return __fixunssfdi(a); }
COMPILER_RT_ALIAS(__fixunssfdi, __aeabi_f2ulz)
#endif
#endif
#if defined(__MINGW32__) && defined(__arm__)
COMPILER_RT_ALIAS(__fixunssfdi, __stou64)
#endif

View File

@@ -101,3 +101,7 @@ AEABI_RTABI double __aeabi_l2d(di_int a) { return __floatdidf(a); }
COMPILER_RT_ALIAS(__floatdidf, __aeabi_l2d)
#endif
#endif
#if defined(__MINGW32__) && defined(__arm__)
COMPILER_RT_ALIAS(__floatdidf, __i64tod)
#endif

View File

@@ -73,3 +73,7 @@ AEABI_RTABI float __aeabi_l2f(di_int a) { return __floatdisf(a); }
COMPILER_RT_ALIAS(__floatdisf, __aeabi_l2f)
#endif
#endif
#if defined(__MINGW32__) && defined(__arm__)
COMPILER_RT_ALIAS(__floatdisf, __i64tos)
#endif

View File

@@ -104,3 +104,7 @@ AEABI_RTABI double __aeabi_ul2d(du_int a) { return __floatundidf(a); }
COMPILER_RT_ALIAS(__floatundidf, __aeabi_ul2d)
#endif
#endif
#if defined(__MINGW32__) && defined(__arm__)
COMPILER_RT_ALIAS(__floatundidf, __u64tod)
#endif

View File

@@ -70,3 +70,7 @@ AEABI_RTABI float __aeabi_ul2f(du_int a) { return __floatundisf(a); }
COMPILER_RT_ALIAS(__floatundisf, __aeabi_ul2f)
#endif
#endif
#if defined(__MINGW32__) && defined(__arm__)
COMPILER_RT_ALIAS(__floatundisf, __u64tos)
#endif

View File

@@ -1,34 +0,0 @@
//===-- mingw_fixfloat.c - Wrap int/float conversions for arm/windows -----===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "int_lib.h"
COMPILER_RT_ABI di_int __fixdfdi(double a);
COMPILER_RT_ABI di_int __fixsfdi(float a);
COMPILER_RT_ABI du_int __fixunsdfdi(double a);
COMPILER_RT_ABI du_int __fixunssfdi(float a);
COMPILER_RT_ABI double __floatdidf(di_int a);
COMPILER_RT_ABI float __floatdisf(di_int a);
COMPILER_RT_ABI double __floatundidf(du_int a);
COMPILER_RT_ABI float __floatundisf(du_int a);
COMPILER_RT_ABI di_int __dtoi64(double a) { return __fixdfdi(a); }
COMPILER_RT_ABI di_int __stoi64(float a) { return __fixsfdi(a); }
COMPILER_RT_ABI du_int __dtou64(double a) { return __fixunsdfdi(a); }
COMPILER_RT_ABI du_int __stou64(float a) { return __fixunssfdi(a); }
COMPILER_RT_ABI double __i64tod(di_int a) { return __floatdidf(a); }
COMPILER_RT_ABI float __i64tos(di_int a) { return __floatdisf(a); }
COMPILER_RT_ABI double __u64tod(du_int a) { return __floatundidf(a); }
COMPILER_RT_ABI float __u64tos(du_int a) { return __floatundisf(a); }