Howard Hinnant
ebab2b0660
* tgmath_logb.patch implements the missing logb function (see C99 standard 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.
...
llvm-svn: 151276
2012-02-23 20:22:10 +00:00
Jeffrey Yasskin
a09e62a042
Allow linux builds to take advantage of libunwind to get unwind.h if
...
that's installed.
llvm-svn: 151058
2012-02-21 16:20:12 +00:00
Chandler Carruth
a2a5410e6d
Add 3dNOW intrinsic header to x86intrin.h, conditioned on __3dNOW__ to
...
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.
llvm-svn: 150948
2012-02-20 07:35:45 +00:00
Craig Topper
e5ea3b0239
Remove vperm2f* and vperm2i builtins. Same effect can be achieved with builtin_shufflevector.
...
llvm-svn: 150064
2012-02-08 07:33:36 +00:00
Craig Topper
fec9f8edb7
Remove vpermilp* builtins. Same effect can be achieved with builtin_shufflevector.
...
llvm-svn: 150056
2012-02-08 05:16:54 +00:00
Eli Friedman
96efec99eb
Add C11 FLT_TRUE_MIN and friends. <rdar://problem/10812837>.
...
llvm-svn: 149949
2012-02-07 01:02:19 +00:00
Nick Lewycky
d0ba3793aa
Comment mystery code.
...
llvm-svn: 149742
2012-02-04 02:16:48 +00:00
Nick Lewycky
51a009092c
Make _mm_cmpgt_epi8 immute to -funsigned-char.
...
llvm-svn: 149725
2012-02-03 23:57:48 +00:00
Douglas Gregor
3ec6663be0
Back out my heinous hack that tricked the module generation mechanism
...
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.
llvm-svn: 149611
2012-02-02 18:42:48 +00:00
Douglas Gregor
232e3431e2
Split compiler builtin module into "stdlib" builtins and "intrinsic"
...
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.
llvm-svn: 149434
2012-01-31 21:57:50 +00:00
Douglas Gregor
56435b49e0
Remove tgmath.h from the module map for now, because it currently causes a
...
cyclic module dependency due to its inclusion of math.h and
complex.h. I'll take another shot at it later.
llvm-svn: 149283
2012-01-30 22:22:39 +00:00
Douglas Gregor
71022cac1f
Fix typo spotted by Sebastian. Thanks!
...
llvm-svn: 149257
2012-01-30 18:49:05 +00:00
Craig Topper
d6d3a05b4f
Cleanup 3dnow builtin handling. Most of them were already handled by LLVM connecting intrinsics and builtins in IntrinsicsX86.td.
...
llvm-svn: 149233
2012-01-30 08:18:19 +00:00
Douglas Gregor
0070c0bfbe
Introduce TargetInfo::hasFeature() to query various feature names in
...
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>.
llvm-svn: 149227
2012-01-30 06:38:25 +00:00
Douglas Gregor
c93a872206
Just disable the compiler-builtins module test on MSVC for now
...
llvm-svn: 149214
2012-01-29 23:53:54 +00:00
Douglas Gregor
e8f900bdcc
Teach tgmath.h to only include <complex.h> if it's available.
...
llvm-svn: 149213
2012-01-29 23:40:50 +00:00
Douglas Gregor
80928be137
Alternate fix to the modules failures that doesn't require us to tweak tgmath.h
...
llvm-svn: 149210
2012-01-29 22:47:19 +00:00
Douglas Gregor
b9f9aea13c
If there's no math.h, then tgmath.h should just be empty
...
llvm-svn: 149209
2012-01-29 22:35:57 +00:00
Douglas Gregor
3f09de6442
Introduce a module map for (some of) the compiler-supplied
...
headers. The remaining headers require more sophisticated
requirements; they'll be handled separately. Part of
<rdar://problem/10710060>.
llvm-svn: 149206
2012-01-29 20:52:14 +00:00
Craig Topper
9e9301a83a
Represent 256-bit unaligned loads natively and remove the builtins. Similar change was made for 128-bit versions a while back.
...
llvm-svn: 148919
2012-01-25 04:26:17 +00:00
Douglas Gregor
38f3981a99
On Darwin, use the system's <unwind.h> whenever it is
...
available. Clang's <unwind.h> isn't ready for prime time. Fixes
<rdar://problem/10733587>.
llvm-svn: 148807
2012-01-24 15:12:50 +00:00
Bob Wilson
51897ec79b
Fix a typo: _MM_FLUSH_ZERO_OFF has the wrong value. rdar://10716672
...
llvm-svn: 148711
2012-01-23 18:27:24 +00:00
Evgeniy Stepanov
5dfe9f2b2f
Extend unwind.h with the ARM unwinder interface.
...
These declarations come from the sample code in the
"Exception Handling ABI for the ARM Architecture" document.
llvm-svn: 148469
2012-01-19 11:39:05 +00:00
Joerg Sonnenberger
c2f91c37e8
Don't depend on undefined macros being 0, there are options for the
...
preprocessor to warn about it.
llvm-svn: 147466
2012-01-03 19:22:38 +00:00
NAKAMURA Takumi
96d77daa49
clang/lib/Headers/CMakeLists.txt: Unbreak cmake build.
...
llvm-svn: 147373
2011-12-30 10:38:16 +00:00
Craig Topper
b4ceb6fd52
Add FMA4 intrinsics.
...
llvm-svn: 147372
2011-12-30 09:15:03 +00:00
Craig Topper
ba418d8e91
Remove an accidental change from r147370. Would only break if the new fma4 flag was used.
...
llvm-svn: 147371
2011-12-30 07:35:49 +00:00
Craig Topper
ffdb46ceef
Add FMA4 feature flag. Intrinsics coming soon. Also make sse4a feature flag imply sse3. Matches gcc behavior.
...
llvm-svn: 147370
2011-12-30 07:33:42 +00:00
Richard Smith
6b751dc2c6
Unbreak cmake build after r147340.
...
llvm-svn: 147355
2011-12-29 21:42:29 +00:00
Craig Topper
1de8348db7
Add popcnt feature flag to match gcc. This flag is implied when sse42 is enabled, but can be disabled separately. Move popcnt intrinsics to popcntintrin.h to match gcc.
...
llvm-svn: 147340
2011-12-29 16:10:46 +00:00
NAKAMURA Takumi
9a3f299f0e
clang/lib/Headers/CMakeLists.txt: Unbreak cmake build to add bmi2intrin.h since r147275.
...
llvm-svn: 147276
2011-12-26 03:20:06 +00:00
Craig Topper
c334dd68a7
Add BMI2 intrinsics.
...
llvm-svn: 147275
2011-12-26 02:31:10 +00:00
NAKAMURA Takumi
dceeeb8918
lib/Headers/CMakeLists.txt: Fix cmake build since r147263, for two missing headers.
...
llvm-svn: 147266
2011-12-25 12:47:46 +00:00
Craig Topper
a06d4a1c40
Add the rest of the BMI intrinsics.
...
llvm-svn: 147265
2011-12-25 07:27:12 +00:00
Craig Topper
f2855ade2b
Add intrinsics for lzcnt and tzcnt instructions.
...
llvm-svn: 147263
2011-12-25 06:25:37 +00:00
Craig Topper
22967d4a61
Add BMI, BMI2, and LZCNT feature flags to enable adding intrinsics.
...
llvm-svn: 147262
2011-12-25 05:06:45 +00:00
Craig Topper
175543ac78
Add last of the AVX2 intrinsics except for gather.
...
llvm-svn: 147253
2011-12-24 17:20:15 +00:00
Craig Topper
9f00948a82
Add AVX2 permute intrinsics. Also add parentheses on some macro arguments in other intrinsic headers.
...
llvm-svn: 147241
2011-12-24 07:55:14 +00:00
Craig Topper
9479895928
Add AVX2 intrinsics for FP vbroadcast, vbroadcasti128, and vpblendd.
...
llvm-svn: 147239
2011-12-24 05:19:29 +00:00
Craig Topper
a6fdbd1807
Intrinsics for AVX2 unpack instructions.
...
llvm-svn: 147237
2011-12-24 03:58:43 +00:00
Craig Topper
f4bb952533
More AVX2 intrinsics for shift, psign, some shuffles, and psadbw.
...
llvm-svn: 147236
2011-12-24 03:28:57 +00:00
Craig Topper
235a365d58
Add AVX2 multiply intrinsics.
...
llvm-svn: 147219
2011-12-23 08:31:16 +00:00
Craig Topper
1f2460ad43
Add AVX2 intrinsics for max, min, sign extend, and zero extend.
...
llvm-svn: 147141
2011-12-22 09:18:58 +00:00
Craig Topper
a73baa8050
Add a few more AVX2 intrinsics and fix the type strings on a couple SSE intrinsics.
...
llvm-svn: 147048
2011-12-21 08:35:05 +00:00
Craig Topper
3fe5ac40db
Add AVX2 horizontal add/sub intrinsics.
...
llvm-svn: 147047
2011-12-21 08:17:40 +00:00
Craig Topper
a89747dd1e
Add AVX2 intrinsics for pavg, pblend, and pcmp instructions. Also remove unneeded builtins for SSE pcmp. Change SSE pcmpeqq and pcmpgtq to not use builtins and just use vector == and >.
...
llvm-svn: 146969
2011-12-20 09:55:26 +00:00
Craig Topper
a557e1c122
Add AVX2 intrinsics for and, andn, or, and xor.
...
llvm-svn: 146862
2011-12-19 09:03:48 +00:00
Craig Topper
94aba2c260
More AVX2 intrinsic support including saturating add/sub and palignr.
...
llvm-svn: 146857
2011-12-19 07:03:25 +00:00
Craig Topper
dec792ebb5
Begin adding AVX2 intrinsics. Necessitated increasing the number of bits used to store builtinID when serializing identifier table.
...
llvm-svn: 146855
2011-12-19 05:04:33 +00:00
Chad Rosier
7caca84ce4
Fix _mm_permute_ps and _mm256_permute_ps AVX intrinsics to use "I" (ICE)
...
markings. Fix avxintrin.h to take them into account.
Part of rdar://10595450
llvm-svn: 146810
2011-12-17 01:51:05 +00:00