summaryrefslogtreecommitdiff
path: root/lib/builtins/comparetf2.c
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2019-04-29 00:46:23 +0000
committerPetr Hosek <phosek@chromium.org>2019-04-29 00:46:23 +0000
commit37e90d10534b591374e08ca02ff1878803096d41 (patch)
tree2b537cef0e1d6ca9690ce3e7a6e2833ac6e7c26e /lib/builtins/comparetf2.c
parentf0745e8476f069296a7c71accedd061dce4cdf79 (diff)
downloadcompiler-rt-37e90d10534b591374e08ca02ff1878803096d41.tar.gz
[builtins] Use aliases for function redirects
Symbol aliases are supported by all platforms that compiler-rt builtins target, and we can use these instead of function redirects to avoid the extra indirection. This is part of the cleanup proposed in "[RFC] compiler-rt builtins cleanup and refactoring". Differential Revision: https://reviews.llvm.org/D60931 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/comparetf2.c')
-rw-r--r--lib/builtins/comparetf2.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/builtins/comparetf2.c b/lib/builtins/comparetf2.c
index b82f5cbe4..2eb34cf37 100644
--- a/lib/builtins/comparetf2.c
+++ b/lib/builtins/comparetf2.c
@@ -82,8 +82,11 @@ COMPILER_RT_ABI enum LE_RESULT __letf2(fp_t a, fp_t b) {
#if defined(__ELF__)
// Alias for libgcc compatibility
-FNALIAS(__cmptf2, __letf2);
+COMPILER_RT_ALIAS(__letf2, __cmptf2)
#endif
+COMPILER_RT_ALIAS(__letf2, __eqtf2)
+COMPILER_RT_ALIAS(__letf2, __lttf2)
+COMPILER_RT_ALIAS(__letf2, __netf2)
enum GE_RESULT {
GE_LESS = -1,
@@ -120,20 +123,12 @@ COMPILER_RT_ABI enum GE_RESULT __getf2(fp_t a, fp_t b) {
}
}
+COMPILER_RT_ALIAS(__getf2, __gttf2)
+
COMPILER_RT_ABI int __unordtf2(fp_t a, fp_t b) {
const rep_t aAbs = toRep(a) & absMask;
const rep_t bAbs = toRep(b) & absMask;
return aAbs > infRep || bAbs > infRep;
}
-// The following are alternative names for the preceding routines.
-
-COMPILER_RT_ABI enum LE_RESULT __eqtf2(fp_t a, fp_t b) { return __letf2(a, b); }
-
-COMPILER_RT_ABI enum LE_RESULT __lttf2(fp_t a, fp_t b) { return __letf2(a, b); }
-
-COMPILER_RT_ABI enum LE_RESULT __netf2(fp_t a, fp_t b) { return __letf2(a, b); }
-
-COMPILER_RT_ABI enum GE_RESULT __gttf2(fp_t a, fp_t b) { return __getf2(a, b); }
-
#endif