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
Chad Rosier
93375d5fa5
Revert r146797, which was a partial revert of r146791; It was correct in the
...
first place. The permutevar_* (note the *var*) intrinsics use ymm/mem.
llvm-svn: 146807
2011-12-17 01:39:56 +00:00
Chad Rosier
0adfe7aa2f
Fix _mm256_extractf128_* AVX intrinsics to use "I" (ICE) markings. Fix
...
avxintrin.h to take them into account.
Part of rdar://10595450
llvm-svn: 146804
2011-12-17 01:22:27 +00:00
Chad Rosier
3648646b2b
Partial revert of r146791; vpermilps/vpermilpd instructions accepts ymm/mem/imm8.
...
llvm-svn: 146797
2011-12-17 00:50:42 +00:00
Chad Rosier
060d03be1c
Fix _mm256_round_pd, _mm256_round_ps, _mm_permute_pd and _mm256_permute_pd AVX
...
intrinsics to use "I" (ICE) markings. Fix avxintrin.h to take them into
account.
Part of rdar://10595450
llvm-svn: 146791
2011-12-17 00:15:26 +00:00
Chad Rosier
33d22d8def
Fix vinsertf128_* AVX intrinsics to use "I" (ICE) markings. Fix avxintrin.h to
...
take them into account.
rdar://10590282
llvm-svn: 146758
2011-12-16 21:40:31 +00:00
Chad Rosier
9138fea25e
Fix vperm2f128_* AVX intrinsics to use "I" (ICE) markings. Fix avxintrin.h to
...
take them into account.
rdar://10576962
llvm-svn: 146757
2011-12-16 21:07:34 +00:00