summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2015-10-15 02:47:19 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2015-10-15 02:47:19 +0000
commit9ca87a63ad38f61e12df279f9cd2528aa3cbaa7e (patch)
treefc56f31d25c16b146f830b2dbaa6b64aed7bb2e3
parent956365ef7f809da5fe3244e14d948c0197fdd859 (diff)
downloadbcm5719-llvm-9ca87a63ad38f61e12df279f9cd2528aa3cbaa7e.tar.gz
bcm5719-llvm-9ca87a63ad38f61e12df279f9cd2528aa3cbaa7e.zip
builtins: use C implementation on MSVC
The assembly implementations use GNU syntax which MSVC doesn't handle. Rather than duplicate the code in a second syntax, use the C implementations. Patch by Tee Hao Wei! llvm-svn: 250360
-rw-r--r--compiler-rt/lib/builtins/CMakeLists.txt85
1 files changed, 49 insertions, 36 deletions
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index 08aa3940414..d6a972e5a5f 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -162,47 +162,60 @@ if (HAVE_UNWIND_H)
gcc_personality_v0.c)
endif ()
-set(x86_64_SOURCES
- x86_64/floatdidf.c
- x86_64/floatdisf.c
- x86_64/floatdixf.c
- x86_64/floatundidf.S
- x86_64/floatundisf.S
- x86_64/floatundixf.S
- ${GENERIC_SOURCES})
-set(x86_64h_SOURCES ${x86_64_SOURCES})
-
-if(WIN32)
+if (NOT MSVC)
set(x86_64_SOURCES
- ${x86_64_SOURCES}
- x86_64/chkstk.S)
-endif()
+ x86_64/floatdidf.c
+ x86_64/floatdisf.c
+ x86_64/floatdixf.c
+ x86_64/floatundidf.S
+ x86_64/floatundisf.S
+ x86_64/floatundixf.S
+ ${GENERIC_SOURCES})
+ set(x86_64h_SOURCES ${x86_64_SOURCES})
-set(i386_SOURCES
- i386/ashldi3.S
- i386/ashrdi3.S
- i386/divdi3.S
- i386/floatdidf.S
- i386/floatdisf.S
- i386/floatdixf.S
- i386/floatundidf.S
- i386/floatundisf.S
- i386/floatundixf.S
- i386/lshrdi3.S
- i386/moddi3.S
- i386/muldi3.S
- i386/udivdi3.S
- i386/umoddi3.S
- ${GENERIC_SOURCES})
+ if (WIN32)
+ set(x86_64_SOURCES
+ ${x86_64_SOURCES}
+ x86_64/chkstk.S)
+ endif()
-if(WIN32)
set(i386_SOURCES
- ${i386_SOURCES}
- i386/chkstk.S)
-endif()
+ i386/ashldi3.S
+ i386/ashrdi3.S
+ i386/divdi3.S
+ i386/floatdidf.S
+ i386/floatdisf.S
+ i386/floatdixf.S
+ i386/floatundidf.S
+ i386/floatundisf.S
+ i386/floatundixf.S
+ i386/lshrdi3.S
+ i386/moddi3.S
+ i386/muldi3.S
+ i386/udivdi3.S
+ i386/umoddi3.S
+ ${GENERIC_SOURCES})
+
+ if (WIN32)
+ set(i386_SOURCES
+ ${i386_SOURCES}
+ i386/chkstk.S)
+ endif()
-set(i686_SOURCES
- ${i386_SOURCES})
+ set(i686_SOURCES
+ ${i386_SOURCES})
+else () # MSVC
+ # Use C versions of functions when building on MSVC
+ # MSVC's assembler takes Intel syntax, not AT&T syntax
+ set(x86_64_SOURCES
+ x86_64/floatdidf.c
+ x86_64/floatdisf.c
+ x86_64/floatdixf.c
+ ${GENERIC_SOURCES})
+ set(x86_64h_SOURCES ${x86_64_SOURCES})
+ set(i386_SOURCES ${GENERIC_SOURCES})
+ set(i686_SOURCES ${i386_SOURCES})
+endif () # if (NOT MSVC)
set(arm_SOURCES
arm/adddf3vfp.S
OpenPOWER on IntegriCloud