Commit Graph

16 Commits

Author SHA1 Message Date
Reid Kleckner 1bd5e3ec56 Use 'unsigned long' to match the APIs of the MS bitscan intrinsics
We were getting warnings about how 'uint32_t*' is different from
'unsigned long*' even though they are effectively the same on Windows.

llvm-svn: 277363
2016-08-01 18:39:27 +00:00
Saleem Abdulrasool 28e1b977d4 builtins: remove use of __attribute__((pcs("aapcs"))) on Windows
Windows does not honour the __attribute__((pcs)) on ARM.  Although this will
result in ABI mismatches, compiler-rt should largely be unneeded for resolving
dependencies as we generate MS ABI compliant library calls now for the most
part.

llvm-svn: 266891
2016-04-20 17:43:40 +00:00
Nico Weber 6341a79387 fix a gcc warning
llvm-svn: 256256
2015-12-22 17:22:25 +00:00
Saleem Abdulrasool 956365ef7f builtins: __builtin_clzll for x86 on MSVC
Add an implementation for __builtin_clzll on MSVC even when _BitScanForward4 is
unavailable.

Patch by Tee Hao Wei!

llvm-svn: 250359
2015-10-15 02:46:37 +00:00
Saleem Abdulrasool e49971517a builtins: define and use ALWAYS_INLINE
Abstract out the always inline spelling similar to ASAN.  NFC.

llvm-svn: 249986
2015-10-11 17:35:42 +00:00
Saleem Abdulrasool 9650c4a26e builtins: silence a MSVC warning
_BitReverse64 is only available on ARM and x64.  Guard it accordingly.

llvm-svn: 249949
2015-10-10 17:57:37 +00:00
Saleem Abdulrasool 396e794459 builtins: implement instrinics for cl
cl does not support the same intrinsics as clang.  Provide implementations for
the intrinsics using MSVC builtins.

Patch by Tee Hao Wei!

llvm-svn: 249515
2015-10-07 02:58:11 +00:00
Saleem Abdulrasool e6f9652a22 builtins: Use MSVC-equivalents of attributes
This allows us to build the builtins using MSVC.  NFC.

Patch by Tee Hao Wei!

llvm-svn: 249375
2015-10-06 04:33:05 +00:00
Saleem Abdulrasool 0d6094b992 builtins: restrict aliases
MachO and COFF do not support aliases.  Restrict the alias to ELF targets.  This
should also fix the Darwin build.  Make the FNALIAS usage an error on non-ELF
targets.

llvm-svn: 245669
2015-08-21 04:39:52 +00:00
Josh Gao 772527c57b [compiler-rt] Add libgcc compatibility aliases for __cmp{s,d,f}f2.
Reviewers: compnerd

Subscribers: asl, llvm-commits

Differential Revision: http://reviews.llvm.org/D12091

llvm-svn: 245663
2015-08-21 02:51:17 +00:00
Saleem Abdulrasool a3b3952ccd builtins: mark functions as aapcs on Windows
Windows does not use AAPCS, but rather AAPCS-VFP, and thus the functions which
are assumed to be AAPCS will cause invalid argument setup.  Ensure that the
functions are marked as AAPCS.

llvm-svn: 238056
2015-05-22 21:47:24 +00:00
Saleem Abdulrasool b6a85b4f6a builtins: remove unnecessary COMPILER_RT_EXPORT
This macro did not do anything at this point, and is not particularly needed for
Windows unless building the builtins as a shared library.  NFC.

llvm-svn: 217321
2014-09-06 21:33:55 +00:00
Saleem Abdulrasool a374f43ec8 builtins: add missing file
Add (missing) definition of COMPILER_RT_EXPORT which is meant to be used for
decorating functions that are meant to be exported.  This is useful for
platforms where exports and imports must be decorated explicitly (i.e. Windows).

llvm-svn: 208593
2014-05-12 16:47:01 +00:00
Joerg Sonnenberger 7e6a314d7c Move __clzti2 into 128bit fragment.
llvm-svn: 202593
2014-03-01 15:57:30 +00:00
Joerg Sonnenberger 6e99daab4c Consistently use COMPILER_RT_ABI for all public symbols.
Move prototypes into headers and fix a few inconsistencies.

llvm-svn: 202591
2014-03-01 15:30:50 +00:00
Alexey Samsonov a6b264b51d Move original compiler-rt functions (libgcc replacement) to lib/builtins directory
llvm-svn: 201393
2014-02-14 09:20:33 +00:00