Commit Graph

142 Commits

Author SHA1 Message Date
Chris Lattner 0afd3a23cd fix a bug in the _MM_TRANSPOSE4_PS definition, patch by Brian Sumner from
PR6138

llvm-svn: 94669
2010-01-27 07:54:50 +00:00
Chris Lattner 4debb32fdd _mm_xor_ps does a xor not a nxor. The other 'xor' builtins look fine,
but this one is wrong.  Thanks to Tanya for noticing this.

llvm-svn: 92881
2010-01-07 00:36:41 +00:00
Nate Begeman 67dfd4236a Revert mmx palignr to use an intrinsic, since mmx shuffle patterns are missing.
llvm-svn: 91269
2009-12-14 05:15:02 +00:00
Nate Begeman 72ec6bc6f4 Support x86's PALIGNR instruction without the use of a palignr intrinsic.
llvm-svn: 91264
2009-12-14 04:57:03 +00:00
Chris Lattner 399df12fb1 minimal fix for PR5743
llvm-svn: 91032
2009-12-10 01:38:15 +00:00
Douglas Gregor df72af5935 Pick up MB_LEN_MAX as defined by the system <limits.h>, when it's provided there
llvm-svn: 90879
2009-12-08 21:35:00 +00:00
Ken Dyck f540ae5ab3 Define SIG_ATOMIC_MIN and SIG_ATOMIC_MAX in terms of __SIG_ATOMIC_WIDTH__.
llvm-svn: 89598
2009-11-22 15:47:12 +00:00
Ken Dyck 33211d9658 Avoid unwanted expansion in macros that paste together INT<n>_C(v) and
UINT<n>_C(v) macros. 

llvm-svn: 89461
2009-11-20 16:49:10 +00:00
Ken Dyck 8dcc21420b Avoid unwanted expansion in macros that paste together INT<n>_MIN, INT<n>_MAX,
and UINT<n>_MAX defintions.

llvm-svn: 89460
2009-11-20 16:44:38 +00:00
Ken Dyck 764a5f3881 Avoid unwanted macro expansion in macros that paste together int<n>_t and
uint<n>_t definitions.

llvm-svn: 89459
2009-11-20 16:37:35 +00:00
Ken Dyck aff01ceb95 Define WCHAR_MIN and WCHAR_MAX in terms of __WCHAR_WIDTH__ for consistency with
other limit macros.

llvm-svn: 89355
2009-11-19 15:53:08 +00:00
Ken Dyck f0b343f5b7 Parameterize WINT_MIN and WINT_MAX with __WINT_WIDTH__ to support arbitrary
widths. This corrects the values of these definitions for MSP430 and PIC16.

llvm-svn: 89350
2009-11-19 14:35:19 +00:00
Ken Dyck 279ed5189c Construct definition of SIZE_MAX from __SIZE_WIDTH__ to support targets of
arbitrary widths.

llvm-svn: 89347
2009-11-19 14:03:24 +00:00
Ken Dyck 8af6035ac9 Construct the macro body of PTRDIFF_MAX and PTRDIFF_MIN from __PTRDIFF_WIDTH__.
llvm-svn: 89343
2009-11-19 12:33:01 +00:00
Ken Dyck 68fa5afada Construct INTPTR_MIN, INTPTR_MAX, and UINTPTR_MAX from the exact-width limit
macros corresponding to __INTPTR_WIDTH__.

llvm-svn: 89239
2009-11-18 20:36:29 +00:00
Ken Dyck 2d4371d666 Define intptr_t and uintptr_t in terms of their equivalent exact-width types.
llvm-svn: 89237
2009-11-18 20:24:13 +00:00
Ken Dyck ac11b7b625 Define INTMAX_C and UINTMAX_C in terms of the corresponding exact-width
INTn_C and UINTn_C macros.

llvm-svn: 89226
2009-11-18 19:42:57 +00:00
Ken Dyck 63c8ef8256 Define INTMAX_MIN, INTMAX_MAX, and UINTMAX_MAX in terms of the limit macros for
their corresponding exact-width type. 

llvm-svn: 89224
2009-11-18 19:22:15 +00:00
Ken Dyck 47181584f1 Define intmax_t and uintmax_t as the [u]intN_t type corresponding to
__INTMAX_WIDTH__.

llvm-svn: 89221
2009-11-18 18:57:04 +00:00
Ken Dyck 19ac306c2c Replace (-INT8_C(128)), which uses an illegally out-of-range argument for
INT8_C, with (-INT8_C(127)-1) in the definition of INT8_MIN. Apply similar
changes to the definitions of INT16_MIN and INT24_MIN.

llvm-svn: 89120
2009-11-17 18:29:12 +00:00
Ken Dyck f78dc738a5 Use the INTn_C integer constant macros to generate limit constants with correct
suffixes. This corrects the suffixes for the limit constants of the 32-bit
types on MSP430 and PIC16, and the 64-bit types on PPC64, SystemZ, X86_64.

llvm-svn: 89101
2009-11-17 16:26:27 +00:00
Ken Dyck e115235705 Remove unnecessary parens around the bodies of integer constant macros. C99
requires that their arguments be decimal, hex, octal constants---no signs
allowed---making the parens unnecessary.

llvm-svn: 89095
2009-11-17 13:54:02 +00:00
Ken Dyck 2dc8d5fa3e Parameterize the constant-generating macros in stdint.h with new built-in
__INTn_C_SUFFIX__ macros that are defined for types with corresponding
constant suffixes (i.e. long and long long).

llvm-svn: 88914
2009-11-16 16:36:33 +00:00
Chris Lattner 55c9877b66 Generalize stdint.h for non-8-bit-multiple types, patch by
Ken Dyck!

"This adds definitions for types of 8-bit multiples
from 8 to 64 to stdint.h and rationalizes the selection of types 
for the exact-width definitions in InitPreprocessor.cpp."

llvm-svn: 86977
2009-11-12 08:08:27 +00:00
Chris Lattner b0966de585 A simple reordering of the definitions in stdint.h and
introduces no new function changes.   Patch by Ken Dyck!

llvm-svn: 86062
2009-11-04 23:03:18 +00:00
John Thompson ac0b098d4d Added __has_include and __has_include_next.
llvm-svn: 85834
2009-11-02 22:28:12 +00:00
Oscar Fuentes 843c828ed5 CMake: Respect LLVM_LIBDIR_SUFFIX for clang-specific headers under
${libdir}/clang

Patch by Ingmar Vanhassel!

llvm-svn: 85308
2009-10-27 21:15:21 +00:00
Anders Carlsson 327c8df90c Make our char vector types not be explicitly signed to match GCC and to fix compilation with C++ and -fno-lax-vector-conversions
llvm-svn: 82254
2009-09-18 19:18:19 +00:00
Anders Carlsson dfa3117085 Fix PR4923.
Fix error in _mm_set_pd/_mm_setr_pd and add _mm_set_epi64x/_mm_set1_epi64x. Patch by Laurent Morichetti!

llvm-svn: 82228
2009-09-18 17:03:55 +00:00
Mike Stump b4bed3a497 Collapse more clang version numbers down into fewer places.
llvm-svn: 81983
2009-09-16 01:26:05 +00:00
Mike Stump e18856dad1 Back to 1.1 we go.
llvm-svn: 81944
2009-09-15 23:04:22 +00:00
Mike Stump 11289f4280 Remove tabs, and whitespace cleanups.
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Douglas Gregor 33870d908f CMake: Improve installation of Clang
- Install clang-cc into libexec
  - Install headers into lib/clang/<version>/include
  - Don't install other clang-based tools (clang-wpa, clang-index, etc.)

llvm-svn: 79827
2009-08-23 05:28:29 +00:00
Eli Friedman 5173349565 Switch some functions from using x86 builtins to using vector
operations.

llvm-svn: 76753
2009-07-22 17:08:01 +00:00
Douglas Gregor 9b5f9cd2f7 Make sure install Clang headers when building clang-cc
llvm-svn: 74163
2009-06-25 05:07:31 +00:00
Douglas Gregor 274a6b4f2d Update Clang to include the InitializeAllTargets and
InitializeAllAsmPrinters LLVM headers. Also includes some minor fixes
for the CMake-based build with Xcode.

llvm-svn: 73544
2009-06-16 20:13:51 +00:00
Eli Friedman 9d79bdaaad Following gcc, hide the hack to include the SSE2 intrinsics from
xmmintrin.h in an ifdef.

llvm-svn: 73200
2009-06-11 18:50:02 +00:00
Eli Friedman e9ff191459 Remove a few more vector builtins.
llvm-svn: 73022
2009-06-07 09:32:56 +00:00
Daniel Dunbar fcec758f4e xmmintrin needs to include emmintrin, Darwin system headers seem to depend on it
defining m128[id], at least.

llvm-svn: 73021
2009-06-07 08:33:23 +00:00
Eli Friedman 5a996fc0fc Now that LLVM CodeGen can handle the generic variations a bit better,
get rid of a few more clang vector builtins.

llvm-svn: 73015
2009-06-07 07:12:56 +00:00
Douglas Gregor e183993ffa CMake: Install Clang's headers into the right place in the build tree, for regression testing
llvm-svn: 73014
2009-06-07 07:09:23 +00:00
Eli Friedman 4d8d7d3263 Replace more calls to builtins with generic code.
llvm-svn: 72995
2009-06-06 08:08:06 +00:00
Eli Friedman f5f303f92f Fix obvious typo.
llvm-svn: 72994
2009-06-06 07:42:17 +00:00
Eli Friedman d00fd2885e Fix some casts to work without -flax-vector-conversions.
llvm-svn: 72981
2009-06-06 03:45:06 +00:00
Eli Friedman ebd9314f32 Misc fixes to MMX/SSE intrinsics: a few small bug fixes, and getting rid
of calls to builtins for constructs which can be expressed directly.

llvm-svn: 72979
2009-06-06 02:13:04 +00:00
Eli Friedman f83c258eae Add aliases for a couple of SSE intrinsics. Patch by Ed Schouten.
llvm-svn: 72717
2009-06-02 05:55:48 +00:00
Anders Carlsson 2081200b8c Add 'cmp' SSE builtins and get rid of a bunch of other builtins.
llvm-svn: 72032
2009-05-18 19:16:46 +00:00
Eli Friedman 7df3447c10 Fix for PR3841: follow gcc's example and fall back to the system
stdint.h unless we are freestanding.

Any suggestions here are welcome.

llvm-svn: 70806
2009-05-03 23:00:48 +00:00
Anders Carlsson 9603143c5d Fix tyop in SSSE3 header (6808876).
llvm-svn: 69623
2009-04-20 20:31:10 +00:00
Chris Lattner 61639745b6 glibc plays some weird games with multiple different definitions of
int8_t and games it with strange *_defined macros.  Emulate its weirdness
for better compatibility with linux etc.  Problem pointed out by anders 
johnson.

llvm-svn: 69458
2009-04-18 19:11:11 +00:00