aboutsummaryrefslogtreecommitdiff
path: root/lib/Headers
AgeCommit message (Collapse)Author
2012-05-31Add builtin for pclmulqdq instruction.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157733 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-30Update FIXME. ABM is already covered by LZCNT and POPCNT.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157676 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-29Install ammintrin.h in the cmake build.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157639 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-29Add an ammintrin.h header for SSE4a intrinsics.Benjamin Kramer
This is a clean-room implementation based on public documentation and I tried to validate it as much as possible against gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157638 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-07Remove the 'intrin.h' builtin header file and its tests for now.Chandler Carruth
After discussion with several people, including Doug Gregor, we've decided to change our approach here. If you have questions about this header file, the commit removing it, etc., please reach out to me off-list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156322 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Get rid of storelv4si builtin as it can be expressed directly. This is generalChad Rosier
goodness because it provides opportunites to cleanup things. For example, uint64_t t1(__m128i vA) { uint64_t Alo; _mm_storel_epi64((__m128i*)&Alo, vA); return Alo; } was generating movq %xmm0, -8(%rbp) movq -8(%rbp), %rax and now generates movd %xmm0, %rax rdar://11282581 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155924 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24Expand #include_next in float.h from mingw to _msc_ver.Nico Weber
A test for this is checking if this compiles: #include <float.h> inline bool IsFinite(const double& number) { return _finite(number) != 0; } That depends however on either mingw or msvc being installed, and chapuni tells me there might be issues with float.h on mingw, so no automated test is added. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155507 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24Let NULL and MSVC headers coexist better.Nico Weber
Fixes the two issues mentioned in PR12146. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155490 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24Adding information about what intrinsics still need to be implemented for ↵Aaron Ballman
MSVC compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155441 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24Fix a typo spotted by Matt.Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155427 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24Introduce an initial sketch of a MSVC compatible 'intrin.h' builtinChandler Carruth
header, along with a stub test to make sure it compiles in the appropriate modes. Thanks to Aaron Ballman for working with me to figure out the initial strategy here, and to Nico for reviewing and pestering me to actually commit it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155425 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-17Convert vperm2f128 and vperm2i128 intrinsics back to using llvm intrinsics. ↵Craig Topper
Unfortunately, these instructions have behavior that can't be modeled with shuffle vector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154906 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-15Change _mm256_permute4x64_epi64 and _mm256_permute4x64_pd to use ↵Craig Topper
builtin_shufflevector instead of specific builtins. Old builtins will be removed from llvm now that vpermq/vpermpd are supported by shuffle lowering code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154777 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-12Fix the signatures for the _mm256_storeu2_* intrinsics.Chad Rosier
PR12532 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154591 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-30Correctly check argument types for some vector macros in smmintrin.h. Put ↵Craig Topper
parentheses around uses of vector macro arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153732 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-30Add _mm_minpos_epu16 to smmintrin.h. Fixes PR12399.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153726 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-30Fix shuffle vector calculation for mm_permute_ps. Fixes PR 12401.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153724 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-29unwind.h fix for -fvisibility=hidden users. This fixes firefox build in a systemRafael Espindola
with libunwind installed. Patch by Jeffrey Yasskin! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153633 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-20[avx] Define the _mm256_loadu2_xxx and _mm256_storeu2_xxx intrinsics.Chad Rosier
From the Intel Optimization Reference Manual, Section 11.6.2. When data cannot be aligned or alignment is not known, 16-byte memory accesses may provide better performance. rdar://11076953 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153091 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-23* tgmath_logb.patch implements the missing logb function (see C99 standard ↵Howard Hinnant
7.22, paragraph 5). * tgmath_fabs_complex.patch corrects the return types for the complex fabs functions. These must be non-complex float/double/long double (see C99 standard 7.22, paragraph 4 and 7.3.8.1). Patch contributed by Kristof Beyls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151276 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-21Allow linux builds to take advantage of libunwind to get unwind.h ifJeffrey Yasskin
that's installed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151058 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20Add 3dNOW intrinsic header to x86intrin.h, conditioned on __3dNOW__ toChandler Carruth
match the behavior of GCC. Also add a test for these intrinsics, which apparently have *zero* tests. =[ Not surprisingly, Clang crashed when compiling these. Fix the bug in CodeGen where we failed to bitcast the argument type to x86mmx prior to calling the LLVM intrinsic. This fixes an assert on the new 3dnow-builtins.c test. This is one issue impacting the efforts to get Clang to emulate the Microsoft intrinsics headers -- 3dnow intrinsics are implictitly made available there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150948 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-08Remove vperm2f* and vperm2i builtins. Same effect can be achieved with ↵Craig Topper
builtin_shufflevector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150064 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-08Remove vpermilp* builtins. Same effect can be achieved with ↵Craig Topper
builtin_shufflevector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150056 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-07Add C11 FLT_TRUE_MIN and friends. <rdar://problem/10812837>.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149949 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-04Comment mystery code.Nick Lewycky
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149742 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-03Make _mm_cmpgt_epi8 immute to -funsigned-char.Nick Lewycky
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149725 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-02Back out my heinous hack that tricked the module generation mechanismDouglas Gregor
into using non-absolute system includes (<foo>)... ... and introduce another hack that is simultaneously more heineous and more effective. We whitelist Clang-supplied headers that augment or override system headers (such as float.h, stdarg.h, and tgmath.h). For these headers, Clang does not provide a module mapping. Instead, a system-supplied module map can refer to these headers in a system module, and Clang will look both in its own include directory and wherever the system-supplied module map suggests, then adds either or both headers. The end result is that Clang-supplied headers get merged into the system-supplied module for the C standard library. As a drive-by, fix up a few dependencies in the _Builtin_instrinsics module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149611 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31Split compiler builtin module into "stdlib" builtins and "intrinsic"Douglas Gregor
builds, and bring mm_alloc.h into the fold. Start playing some tricks with these builtin modules to mirror the include_next tricks that the headers already perform. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149434 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30Remove tgmath.h from the module map for now, because it currently causes aDouglas Gregor
cyclic module dependency due to its inclusion of math.h and complex.h. I'll take another shot at it later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149283 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30Fix typo spotted by Sebastian. Thanks!Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149257 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30Cleanup 3dnow builtin handling. Most of them were already handled by LLVM ↵Craig Topper
connecting intrinsics and builtins in IntrinsicsX86.td. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149233 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30Introduce TargetInfo::hasFeature() to query various feature names inDouglas Gregor
each of the targets. Use this for module requirements, so that we can pin the availability of certain modules to certain target features, e.g., provide a module for xmmintrin.h only when SSE support is available. Use these feature names to provide a nearly-complete module map for Clang's built-in headers. Only mm_alloc.h and unwind.h are missing, and those two are fairly specialized at the moment. Finishes <rdar://problem/10710060>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149227 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-29Just disable the compiler-builtins module test on MSVC for nowDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149214 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-29Teach tgmath.h to only include <complex.h> if it's available.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149213 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-29Alternate fix to the modules failures that doesn't require us to tweak tgmath.hDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149210 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-29If there's no math.h, then tgmath.h should just be emptyDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149209 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-29Introduce a module map for (some of) the compiler-suppliedDouglas Gregor
headers. The remaining headers require more sophisticated requirements; they'll be handled separately. Part of <rdar://problem/10710060>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149206 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-25Represent 256-bit unaligned loads natively and remove the builtins. Similar ↵Craig Topper
change was made for 128-bit versions a while back. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148919 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-24On Darwin, use the system's <unwind.h> whenever it isDouglas Gregor
available. Clang's <unwind.h> isn't ready for prime time. Fixes <rdar://problem/10733587>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148807 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-23Fix a typo: _MM_FLUSH_ZERO_OFF has the wrong value. rdar://10716672Bob Wilson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148711 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-19Extend unwind.h with the ARM unwinder interface.Evgeniy Stepanov
These declarations come from the sample code in the "Exception Handling ABI for the ARM Architecture" document. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148469 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-03Don't depend on undefined macros being 0, there are options for theJoerg Sonnenberger
preprocessor to warn about it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147466 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-30clang/lib/Headers/CMakeLists.txt: Unbreak cmake build.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147373 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-30Add FMA4 intrinsics.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147372 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-30Remove an accidental change from r147370. Would only break if the new fma4 ↵Craig Topper
flag was used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147371 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-30Add FMA4 feature flag. Intrinsics coming soon. Also make sse4a feature flag ↵Craig Topper
imply sse3. Matches gcc behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147370 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-29Unbreak cmake build after r147340.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147355 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-29Add popcnt feature flag to match gcc. This flag is implied when sse42 is ↵Craig Topper
enabled, but can be disabled separately. Move popcnt intrinsics to popcntintrin.h to match gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147340 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-26clang/lib/Headers/CMakeLists.txt: Unbreak cmake build to add bmi2intrin.h ↵NAKAMURA Takumi
since r147275. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147276 91177308-0d34-0410-b5e6-96231b3b80d8