[compiler-rt] r250360 - builtins: use C implementation on MSVC
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 14 19:47:19 PDT 2015
Author: compnerd
Date: Wed Oct 14 21:47:19 2015
New Revision: 250360
URL: http://llvm.org/viewvc/llvm-project?rev=250360&view=rev
Log:
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!
Modified:
compiler-rt/trunk/lib/builtins/CMakeLists.txt
Modified: compiler-rt/trunk/lib/builtins/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/CMakeLists.txt?rev=250360&r1=250359&r2=250360&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/builtins/CMakeLists.txt Wed Oct 14 21:47:19 2015
@@ -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()
-
-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})
+ 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)
+ set(x86_64_SOURCES
+ ${x86_64_SOURCES}
+ x86_64/chkstk.S)
+ endif()
-if(WIN32)
set(i386_SOURCES
- ${i386_SOURCES}
- i386/chkstk.S)
-endif()
-
-set(i686_SOURCES
- ${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(i386_SOURCES
+ ${i386_SOURCES}
+ i386/chkstk.S)
+ endif()
+
+ 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
More information about the llvm-commits
mailing list