summaryrefslogtreecommitdiff
path: root/lib/builtins
diff options
context:
space:
mode:
authorSimon Dardis <simon.dardis@imgtec.com>2017-05-04 13:34:17 +0000
committerSimon Dardis <simon.dardis@imgtec.com>2017-05-04 13:34:17 +0000
commit6bae4bb552040cae850681707c0c2f8d65a0b023 (patch)
tree78bffa753f2f79c7b1c56645218f4b97a9a1271e /lib/builtins
parentc5b0187af67133194c16bd3018e5a7938ea12f48 (diff)
[compiler-rt][mips] Add support for quad precision builtins for mips64
Match the builtins that GCC provides for IEEE754 quad precision on MIPS64. Also, enable building them with clang as PR20098 is resolved. Disable tests for xf and xc modes as MIPS doesn't support that mode in hardware or software. Reviewers: slthakur Differential Revision: https://reviews.llvm.org/D32794 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302147 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins')
-rw-r--r--lib/builtins/CMakeLists.txt45
-rw-r--r--lib/builtins/int_types.h4
2 files changed, 26 insertions, 23 deletions
diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
index c30d9b363..74a6531b0 100644
--- a/lib/builtins/CMakeLists.txt
+++ b/lib/builtins/CMakeLists.txt
@@ -167,6 +167,26 @@ set(GENERIC_SOURCES
umodti3.c
emutls.c)
+set(GENERIC_TF_SOURCES
+ comparetf2.c
+ extenddftf2.c
+ extendsftf2.c
+ fixtfdi.c
+ fixtfsi.c
+ fixtfti.c
+ fixunstfdi.c
+ fixunstfsi.c
+ fixunstfti.c
+ floatditf.c
+ floatsitf.c
+ floattitf.c
+ floatunditf.c
+ floatunsitf.c
+ floatuntitf.c
+ multc3.c
+ trunctfdf2.c
+ trunctfsf2.c)
+
option(COMPILER_RT_EXCLUDE_ATOMIC_BUILTIN
"Skip the atomic builtin (this may be needed if system headers are unavailable)"
Off)
@@ -404,24 +424,7 @@ elseif(NOT WIN32)
endif()
set(aarch64_SOURCES
- comparetf2.c
- extenddftf2.c
- extendsftf2.c
- fixtfdi.c
- fixtfsi.c
- fixtfti.c
- fixunstfdi.c
- fixunstfsi.c
- fixunstfti.c
- floatditf.c
- floatsitf.c
- floattitf.c
- floatunditf.c
- floatunsitf.c
- floatuntitf.c
- multc3.c
- trunctfdf2.c
- trunctfsf2.c
+ ${GENERIC_TF_SOURCES}
${GENERIC_SOURCES})
set(armhf_SOURCES ${arm_SOURCES})
@@ -437,8 +440,10 @@ set(armv7em_SOURCES ${arm_SOURCES})
set(mips_SOURCES ${GENERIC_SOURCES})
set(mipsel_SOURCES ${mips_SOURCES})
-set(mips64_SOURCES ${mips_SOURCES})
-set(mips64el_SOURCES ${mips_SOURCES})
+set(mips64_SOURCES ${GENERIC_TF_SOURCES}
+ ${mips_SOURCES})
+set(mips64el_SOURCES ${GENERIC_TF_SOURCES}
+ ${mips_SOURCES})
set(wasm32_SOURCES ${GENERIC_SOURCES})
set(wasm64_SOURCES ${GENERIC_SOURCES})
diff --git a/lib/builtins/int_types.h b/lib/builtins/int_types.h
index 660385ecd..a92238c5b 100644
--- a/lib/builtins/int_types.h
+++ b/lib/builtins/int_types.h
@@ -60,9 +60,7 @@ typedef union
}s;
} udwords;
-/* MIPS64 issue: PR 20098 */
-#if (defined(__LP64__) || defined(__wasm__)) && \
- !(defined(__mips__) && defined(__clang__))
+#if (defined(__LP64__) || defined(__wasm__) || defined(__mips64))
#define CRT_HAS_128BIT
#endif