David Blaikie
5bb700360c
Readd an open paren that was lost while reformatting code.
...
llvm-svn: 172669
2013-01-16 23:13:42 +00:00
David Blaikie
3302f2bd46
PR14964: intrinsic headers using non-reserved identifiers
...
Several of the intrinsic headers were using plain non-reserved identifiers.
C++11 17.6.4.3.2 [global.names] p1 reservers names containing a double
begining with an underscore followed by an uppercase letter for any use.
I think I got them all, but open to being corrected. For the most part I
didn't bother updating function-like macro parameter names because I don't
believe they're subject to any such collission - though some function-like
macros already follow this convention (I didn't update them in part because
the churn was more significant as several function-like macros use the double
underscore prefixed version of the same name as a parameter in their
implementation)
llvm-svn: 172666
2013-01-16 23:08:36 +00:00
Benjamin Kramer
696651429d
unwind.h: Add include guards and don't mess with visibility if HIDE_EXPORTS is specified.
...
For GCC compatibility.
llvm-svn: 171991
2013-01-09 19:54:57 +00:00
Logan Chien
4d401b47d1
Code cleanup: Remove trailing whitespace in unwind.h.
...
llvm-svn: 167915
2012-11-14 06:33:58 +00:00
Michael Liao
625a875f05
Add clang support of RTM from TSX
...
- New options '-mrtm'/'-mno-rtm' are added to enable/disable RTM feature
- Builtin macro '__RTM__' is defined if RTM feature is enabled
- RTM intrinsic header is added and introduces 3 new intrinsics, namely
'_xbegin', '_xend', and '_xabort'.
- 3 new builtins are added to keep compatible with gcc, namely
'__builtin_ia32_xbegin', '__builtin_ia32_xend', and '__builtin_ia32_xabort'.
- Test cases for pre-defined macro and new intrinsic codegen are added.
llvm-svn: 167665
2012-11-10 05:17:46 +00:00
Douglas Gregor
dc779abb8b
Split the instrinsic header wmmintrin.h into AES and PCLMUL parts, so
...
that we can model them as separate submodules.
llvm-svn: 167420
2012-11-05 23:30:26 +00:00
Douglas Gregor
10b4f2a20c
Fix module map for SSE4a builtins
...
llvm-svn: 167399
2012-11-05 20:41:30 +00:00
Douglas Gregor
4c69859b56
Make cpuid.h actually work with -std=c99 <rdar://problem/12552716>.
...
While we're here, extend the module map to cover most of the
newly-added instrinsic headers. Only wmmintrin.h is missing, because
it needs to be split into AES/PCLMUL subheaders (as a separate commit).
llvm-svn: 167398
2012-11-05 20:11:10 +00:00
Ulrich Weigand
9936f137eb
Add "static" to some functions in altivec.c where it was missing.
...
llvm-svn: 167148
2012-10-31 18:17:07 +00:00
Manman Ren
5750c1c07e
X86 SSE Intrinsics: update header for sqrt_ss, rsqrt_ss and rcp_ss.
...
There intrinsics pass through the upper FP values from the input.
rdar://12558838
llvm-svn: 166743
2012-10-26 00:25:10 +00:00
NAKAMURA Takumi
16ff8fdb57
clang/lib/Headers/CMakeLists.txt: Add f16cintrin.h.
...
llvm-svn: 165688
2012-10-11 01:10:04 +00:00
Manman Ren
a45358c284
X86: add F16C support in Clang
...
Support the following intrinsics:
_mm_cvtph_ps, _mm256_cvtph_ps, _mm_cvtps_ph, _mm256_cvtps_ph
rdar://12407875
llvm-svn: 165685
2012-10-11 00:59:55 +00:00
Michael Liao
4a7f8c23e0
Add intrinsic of MULX in BMI2 header
...
llvm-svn: 165325
2012-10-05 18:50:09 +00:00
Logan Chien
774442162d
Add struct keyword before _Unwind_Context.
...
In the C programming language, we have to add the
"struct" keyword. Otherwise, the compiler will
emit error message.
llvm-svn: 164665
2012-09-26 06:35:17 +00:00
Benjamin Kramer
a43b6999ff
Add _rdrand{16,32,64}_step intrinsics to immintrin.h
...
llvm-svn: 160118
2012-07-12 09:33:03 +00:00
Craig Topper
6490bdcf72
Rename tzcnt intrinsics to match gcc.
...
llvm-svn: 159515
2012-07-02 06:52:51 +00:00
Douglas Gregor
158dec5d20
std::nullptr_t support in MS headers, from João Matos.
...
llvm-svn: 159448
2012-06-29 18:28:41 +00:00
Manman Ren
f865ba0c0e
X86: add more GATHER intrinsics in Clang
...
Support the following intrinsics:
_mm_i32gather_pd, _mm256_i32gather_pd,
_mm_i64gather_pd, _mm256_i64gather_pd,
_mm_i32gather_ps, _mm256_i32gather_ps,
_mm_i64gather_ps, _mm256_i64gather_ps,
_mm_i32gather_epi64, _mm256_i32gather_epi64,
_mm_i64gather_epi64, _mm256_i64gather_epi64,
_mm_i32gather_epi32, _mm256_i32gather_epi32,
_mm_i64gather_epi32, _mm256_i64gather_epi32
llvm-svn: 159410
2012-06-29 05:19:13 +00:00
Manman Ren
86c3250b82
X86: add more GATHER intrinsics in Clang
...
Corrected type for index of _mm256_mask_i32gather_pd
from 256-bit to 128-bit
Corrected types for src|dst|mask of _mm256_mask_i64gather_ps
from 256-bit to 128-bit
Support the following intrinsics:
_mm_mask_i32gather_epi64, _mm256_mask_i32gather_epi64,
_mm_mask_i64gather_epi64, _mm256_mask_i64gather_epi64,
_mm_mask_i32gather_epi32, _mm256_mask_i32gather_epi32,
_mm_mask_i64gather_epi32, _mm256_mask_i64gather_epi32
llvm-svn: 159403
2012-06-29 00:54:35 +00:00
Manman Ren
add5e9e289
X86: add GATHER intrinsics (AVX2) in Clang
...
Support the following intrinsics:
_mm_mask_i32gather_pd, _mm256_mask_i32gather_pd, _mm_mask_i64gather_pd
_mm256_mask_i64gather_pd, _mm_mask_i32gather_ps, _mm256_mask_i32gather_ps
_mm_mask_i64gather_ps, _mm256_mask_i64gather_ps
llvm-svn: 159222
2012-06-26 19:55:09 +00:00
NAKAMURA Takumi
f500be025a
Headers/xopintrin.h: Try to fix r158492. Did you mean, mm256?
...
llvm-svn: 158521
2012-06-15 13:37:44 +00:00
Craig Topper
9e28bf9345
Add XOP frcz instrinsics.
...
llvm-svn: 158492
2012-06-15 06:33:42 +00:00
Craig Topper
db0fbf0a50
Add XOP permute intrinsics.
...
llvm-svn: 158351
2012-06-12 06:03:35 +00:00
Craig Topper
ce8dbaadb6
Add XOP shift and compare intrinsics.
...
llvm-svn: 158300
2012-06-11 07:01:43 +00:00
Craig Topper
a3c5fbf54b
Add XOP vprot* instruction intrinsics
...
llvm-svn: 158292
2012-06-10 07:47:32 +00:00
Craig Topper
02b3d81a97
More XOP intrinsics
...
llvm-svn: 158287
2012-06-10 02:46:15 +00:00
Craig Topper
33b6d5e20b
Begin adding XOP intrinsics
...
llvm-svn: 158286
2012-06-10 00:39:38 +00:00
Craig Topper
2b1eda344a
Add fma3 intrinsic header file.
...
llvm-svn: 157913
2012-06-04 03:42:47 +00:00
Craig Topper
3f122a7636
Add builtin for pclmulqdq instruction.
...
llvm-svn: 157733
2012-05-31 05:18:48 +00:00
Craig Topper
9fd12db1c0
Update FIXME. ABM is already covered by LZCNT and POPCNT.
...
llvm-svn: 157676
2012-05-30 04:49:49 +00:00
Benjamin Kramer
1ab16ba501
Install ammintrin.h in the cmake build.
...
llvm-svn: 157639
2012-05-29 19:36:17 +00:00
Benjamin Kramer
ba6e2528fa
Add an ammintrin.h header for SSE4a intrinsics.
...
This is a clean-room implementation based on public documentation and
I tried to validate it as much as possible against gcc.
llvm-svn: 157638
2012-05-29 19:10:17 +00:00
Chandler Carruth
4496c44e5f
Remove the 'intrin.h' builtin header file and its tests for now.
...
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.
llvm-svn: 156322
2012-05-07 20:46:58 +00:00
Chad Rosier
87622b8b84
Get rid of storelv4si builtin as it can be expressed directly. This is general
...
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
llvm-svn: 155924
2012-05-01 18:11:51 +00:00
Nico Weber
cb93142e1f
Expand #include_next in float.h from mingw to _msc_ver.
...
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.
llvm-svn: 155507
2012-04-24 23:43:40 +00:00
Nico Weber
1d725ecf93
Let NULL and MSVC headers coexist better.
...
Fixes the two issues mentioned in PR12146.
llvm-svn: 155490
2012-04-24 21:27:01 +00:00
Aaron Ballman
0ae8c946a4
Adding information about what intrinsics still need to be implemented for MSVC compatibility.
...
llvm-svn: 155441
2012-04-24 12:30:37 +00:00
Chandler Carruth
ff90611253
Fix a typo spotted by Matt.
...
llvm-svn: 155427
2012-04-24 05:59:48 +00:00
Chandler Carruth
3dfb6d84c6
Introduce an initial sketch of a MSVC compatible 'intrin.h' builtin
...
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.
llvm-svn: 155425
2012-04-24 05:23:54 +00:00
Craig Topper
26e74e50b6
Convert vperm2f128 and vperm2i128 intrinsics back to using llvm intrinsics. Unfortunately, these instructions have behavior that can't be modeled with shuffle vector.
...
llvm-svn: 154906
2012-04-17 05:16:56 +00:00
Craig Topper
8e57855ea0
Change _mm256_permute4x64_epi64 and _mm256_permute4x64_pd to use builtin_shufflevector instead of specific builtins. Old builtins will be removed from llvm now that vpermq/vpermpd are supported by shuffle lowering code.
...
llvm-svn: 154777
2012-04-15 22:18:10 +00:00
Chad Rosier
2c5154224b
Fix the signatures for the _mm256_storeu2_* intrinsics.
...
PR12532
llvm-svn: 154591
2012-04-12 16:29:08 +00:00
Craig Topper
74c17c65e4
Correctly check argument types for some vector macros in smmintrin.h. Put parentheses around uses of vector macro arguments.
...
llvm-svn: 153732
2012-03-30 07:01:17 +00:00
Craig Topper
97f042f2d6
Add _mm_minpos_epu16 to smmintrin.h. Fixes PR12399.
...
llvm-svn: 153726
2012-03-30 05:41:28 +00:00
Craig Topper
678a53c350
Fix shuffle vector calculation for mm_permute_ps. Fixes PR 12401.
...
llvm-svn: 153724
2012-03-30 05:09:18 +00:00
Rafael Espindola
c31d004ece
unwind.h fix for -fvisibility=hidden users. This fixes firefox build in a system
...
with libunwind installed.
Patch by Jeffrey Yasskin!
llvm-svn: 153633
2012-03-29 03:37:17 +00:00
Chad Rosier
f8df4f4e3b
[avx] Define the _mm256_loadu2_xxx and _mm256_storeu2_xxx intrinsics.
...
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
llvm-svn: 153091
2012-03-20 16:40:00 +00:00
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
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
Bob Wilson
16c4195548
Fix obvious error in _mm_test_all_zeros. PR11565.
...
Patch by Mathias Gaunard!
llvm-svn: 146565
2011-12-14 17:17:16 +00:00
Chandler Carruth
222c66db38
Fix a blatant typo or cut/paste-o reported by users of this header.
...
llvm-svn: 146251
2011-12-09 09:23:55 +00:00
Rafael Espindola
7a284b2e78
Use default visibility in the the symbols declared in unwind.h. This matches
...
the behavior of gcc's unwind.h.
llvm-svn: 146208
2011-12-09 00:08:01 +00:00
Rafael Espindola
18c7920d6b
Add a minimal unwind.h that knows how to forward to the system one in systems
...
that have it in /usr/include (only OS X Lion so far).
llvm-svn: 146140
2011-12-08 05:01:39 +00:00
Daniel Dunbar
e946e361ab
Headers: wmmintrin.h only needs xmmintrin.h.
...
- Fixes <rdar://problem/10261246> clang -maes option is not sufficient to
include <wmmintrin.h>
llvm-svn: 145939
2011-12-06 16:17:54 +00:00
Rafael Espindola
488ea473db
Install cpuid.h when building with cmake too.
...
llvm-svn: 145935
2011-12-06 15:46:47 +00:00
Rafael Espindola
49118520de
Fix comment.
...
llvm-svn: 145271
2011-11-28 20:05:27 +00:00
Rafael Espindola
0618d14edf
Error on non x86 architectures.
...
llvm-svn: 145185
2011-11-27 15:21:33 +00:00
Rafael Espindola
fd03d0b733
Fix file name in comments.
...
llvm-svn: 145184
2011-11-27 15:13:54 +00:00
Rafael Espindola
d086573a4d
Add the minimum implementation of cpuid.h. This works on "modern" intel cpus
...
and on clang, which seams to handled "=b" correctly even when ebx is the
PIC register.
llvm-svn: 145149
2011-11-26 20:53:19 +00:00
Eli Friedman
f16beb3942
Fix some additional x86 intrinsics to use "I" (ICE) markings. Fix *mmintrin.h to take them into account.
...
<rdar://problem/10341145>
llvm-svn: 144246
2011-11-10 00:11:13 +00:00
Eli Friedman
9586cdb01e
Misc fixes to pcmp*stri.
...
llvm-svn: 144073
2011-11-08 04:13:51 +00:00
Bob Wilson
c9b97cc1da
Fix vector macros to correctly check argument types. <rdar://problem/10261670>
...
llvm-svn: 143792
2011-11-05 06:08:06 +00:00
Eli Friedman
89c11337ba
Add _mm_comige_sd to emmintrin.h, since I apparently forgot to do this in r138769.
...
<rdar://problem/10230751>
llvm-svn: 141310
2011-10-06 20:31:50 +00:00
Peter Collingbourne
d937a99465
Clang-side build system infrastructure for multiple tblgens.
...
llvm-svn: 141267
2011-10-06 01:52:10 +00:00
Peter Collingbourne
2f3cf4b158
Add support for alignment-specifiers in C1X and C++11, remove
...
support for the C++0x draft [[align]] attribute and add the C1X
standard header file stdalign.h
llvm-svn: 140796
2011-09-29 18:04:28 +00:00
Eli Friedman
9bb51adcce
Tweak *mmintrin.h so that they don't make any bad assumptions about alignment (which probably has little effect in practice, but better to get it right). Make the load in _mm_loadh_pi and _mm_loadl_pi a single LLVM IR instruction to make optimizing easier for CodeGen.
...
rdar://10054986
llvm-svn: 139874
2011-09-15 23:15:27 +00:00
Eric Christopher
bd202c0496
Remove WCHAR_MIN and WCHAR_MAX from limits.h. According to posix and c99
...
these should be in stdint.h - and they already are.
Fixes rdar://10097036.
llvm-svn: 139332
2011-09-08 23:25:25 +00:00
Eli Friedman
f8cb480528
Add missing function _mm_ucomige_sd to emmintrin.h. PR10803.
...
llvm-svn: 138769
2011-08-29 21:26:24 +00:00
Bruno Cardoso Lopes
7a98a7e681
Fix _mm256_shuffle_ps mask! Example, for mask=203, Instead of:
...
<i32 3, i32 2, i32 8, i32 11, i32 3, i32 6, i32 12, i32 15>
generate:
<i32 3, i32 2, i32 8, i32 11, i32 7, i32 6, i32 12, i32 15>
llvm-svn: 138411
2011-08-23 23:29:45 +00:00
Howard Hinnant
854a3966d4
http://llvm.org/bugs/show_bug.cgi?id=10472
...
llvm-svn: 135927
2011-07-25 18:09:56 +00:00
Nick Lewycky
c3218637bd
Fix typo.
...
llvm-svn: 135473
2011-07-19 08:48:08 +00:00
Alexis Hunt
8cb46bb51c
Implement a __WCHAR_UNSIGNED__ macro and use it to include WCHAR_MIN and
...
WCHAR_MAX in limits.h, thus solving the problem where the system header
thinks it knows better.
llvm-svn: 135455
2011-07-19 00:50:57 +00:00
NAKAMURA Takumi
a185c78d4d
lib/Headers/mm_malloc.h: Use __mingw_aligned_malloc() in _mm_malloc() on mingw.
...
By default, mingw does not have _mm_alloc() nor _aligned_malloc().
llvm-svn: 135388
2011-07-18 11:13:50 +00:00
Douglas Gregor
c9c40ce861
Teach Clang's <float.h> to also include MinGW's <float.h>, which provides additional system definitions, from Ruben Van Boxem
...
llvm-svn: 134407
2011-07-05 14:17:04 +00:00
Douglas Gregor
21ad5dfc69
Define va_copy when in C++0x mode; C++0x picked it up from C99.
...
llvm-svn: 133438
2011-06-20 15:03:22 +00:00
Bill Wendling
03e7e430c3
Add 'may_alias' attribute. Noticed by Eli.
...
llvm-svn: 131278
2011-05-13 01:24:00 +00:00
Bill Wendling
502931fad9
Represent the unaligned loads natively. These are converted into a call to the
...
correct unaligned load.
llvm-svn: 131268
2011-05-13 00:11:39 +00:00
Bill Wendling
e106c34817
LLVM doesn't always optimize away the four loads from this:
...
(__m128){ p[0], p[1], p[2], p[3] }
which produces really bad code. This could be done in instcombine, but it's
probably better to do it in the front-end instead.
<rdar://problem/9424836>
llvm-svn: 131237
2011-05-12 19:02:15 +00:00
Eli Friedman
8ba29d8e7f
PR9866: Fix the implementation of _mm_loadl_pd and _mm_loadh_pd to not make
...
bad assumptions about the alignment of the double* argument.
llvm-svn: 131052
2011-05-07 18:59:31 +00:00
Eli Friedman
cb59baaa20
PR9849: Fix _mm_setr_pi32 and friends to actually work correctly. They broke with the MMX rewrite a while back.
...
llvm-svn: 130945
2011-05-05 20:21:54 +00:00
Eli Friedman
fe0739dffb
Some small improvements to the builtin (-ffreestanding) stdint.h; in
...
particular, make sure to handle WCHAR_MIN correctly.
llvm-svn: 130618
2011-04-30 19:02:59 +00:00
Chris Lattner
f03406f103
don't use compound literals in MM macros, since they will be instantiated
...
into user code which may warn about them with -pedantic. Patch by Jonathan Sauer!
llvm-svn: 130149
2011-04-25 20:42:40 +00:00
Eli Friedman
4547752402
PR9772: Fix the definition of WINT_MIN and WINT_MAX on Linux -ffreestanding.
...
llvm-svn: 129907
2011-04-21 05:45:45 +00:00
Michael J. Spencer
1737c9e0b5
Add mm3dnow.h.
...
llvm-svn: 129572
2011-04-15 15:11:21 +00:00
Chris Lattner
57540c5be0
fix a bunch of comment typos found by codespell. Patch by
...
Luis Felipe Strano Moraes!
llvm-svn: 129559
2011-04-15 05:22:18 +00:00
Bill Wendling
2c1c33552d
Remove comment that snuck in there.
...
llvm-svn: 129434
2011-04-13 10:05:14 +00:00
Bill Wendling
b9c9e34cb3
Just use a native "load" instead of translating the builtin later. Clang can
...
take it!
I wasn't able to get __builtin_ia32_loaddqu to transform into an unaligned
load...I'll have to look into it further.
llvm-svn: 129427
2011-04-13 05:58:17 +00:00
John McCall
91a528841b
Implement the AVX cmp builtins as macros instead of static inlines.
...
Patch by Syoyo Fujita! Reviewed by Chris Lattner! Checked in by me!
llvm-svn: 128984
2011-04-06 03:37:51 +00:00
Ted Kremenek
f49e1dd86d
Add '#ifndef _PTRDIFF_T' guard around definition of ptrdiff_t. Fixes <rdar://problem/9210154>.
...
llvm-svn: 128578
2011-03-30 21:43:52 +00:00
NAKAMURA Takumi
1a780ee8a9
lib/Headers/mm_malloc.h: On Windows, we can expect _mm_malloc would be provided as macro by <malloc.h>.
...
llvm-svn: 127654
2011-03-15 02:32:43 +00:00
Oscar Fuentes
6401523405
CMake: updated list of installable header files. PR9321.
...
llvm-svn: 126572
2011-02-27 13:33:31 +00:00
Oscar Fuentes
15fe190027
Put targets on folders, if the IDE supports the feature.
...
Requires CMake 2.8.3 or newer.
llvm-svn: 126094
2011-02-20 22:06:44 +00:00
Oscar Fuentes
6f72540e46
New function for tablegenning: clang_tablegen.
...
llvm-svn: 126093
2011-02-20 22:06:32 +00:00
Anton Yartsev
b9734cd4eb
Optimized IR for vec_splat
...
llvm-svn: 120610
2010-12-01 21:59:31 +00:00
Chandler Carruth
45c2fb1e69
Undo part of my previous commit to mm_malloc.h, going back to the use of
...
stdlib.h. There were numerous problems with forward declaring 'malloc' and
'free', but the most important is that these are reserved by POSIX and may be
implemented via a function-like macro.
As suggested by Dale Johannesen, I'm instead guarding the only include of this
in our builtin headers with __STDC_HOSTED__, and I've removed the include of
the header from the test suite. I'll discuss with folks whether we want to have
a hosted section of the test suite or not, and add it (and perhaps other tests)
back there if that's the direction.
llvm-svn: 119958
2010-11-22 08:06:31 +00:00
Anton Yartsev
f2a1345a34
turned pointers into pointers to const in function parameters in all functions/builtins accepting pointers to a const-qualified type according to PIM and "Language Extensions for CBEA"
...
llvm-svn: 119376
2010-11-16 20:09:36 +00:00