summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/Headers
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Headers')
-rw-r--r--contrib/llvm/tools/clang/lib/Headers/avxintrin.h48
-rw-r--r--contrib/llvm/tools/clang/lib/Headers/emmintrin.h24
-rw-r--r--contrib/llvm/tools/clang/lib/Headers/stddef.h14
-rw-r--r--contrib/llvm/tools/clang/lib/Headers/stdint.h47
-rw-r--r--contrib/llvm/tools/clang/lib/Headers/xopintrin.h4
5 files changed, 99 insertions, 38 deletions
diff --git a/contrib/llvm/tools/clang/lib/Headers/avxintrin.h b/contrib/llvm/tools/clang/lib/Headers/avxintrin.h
index 412d284..0683a65 100644
--- a/contrib/llvm/tools/clang/lib/Headers/avxintrin.h
+++ b/contrib/llvm/tools/clang/lib/Headers/avxintrin.h
@@ -1078,78 +1078,78 @@ _mm256_setzero_si256(void)
/* Cast between vector types */
static __inline __m256 __attribute__((__always_inline__, __nodebug__))
-_mm256_castpd_ps(__m256d __in)
+_mm256_castpd_ps(__m256d __a)
{
- return (__m256)__in;
+ return (__m256)__a;
}
static __inline __m256i __attribute__((__always_inline__, __nodebug__))
-_mm256_castpd_si256(__m256d __in)
+_mm256_castpd_si256(__m256d __a)
{
- return (__m256i)__in;
+ return (__m256i)__a;
}
static __inline __m256d __attribute__((__always_inline__, __nodebug__))
-_mm256_castps_pd(__m256 __in)
+_mm256_castps_pd(__m256 __a)
{
- return (__m256d)__in;
+ return (__m256d)__a;
}
static __inline __m256i __attribute__((__always_inline__, __nodebug__))
-_mm256_castps_si256(__m256 __in)
+_mm256_castps_si256(__m256 __a)
{
- return (__m256i)__in;
+ return (__m256i)__a;
}
static __inline __m256 __attribute__((__always_inline__, __nodebug__))
-_mm256_castsi256_ps(__m256i __in)
+_mm256_castsi256_ps(__m256i __a)
{
- return (__m256)__in;
+ return (__m256)__a;
}
static __inline __m256d __attribute__((__always_inline__, __nodebug__))
-_mm256_castsi256_pd(__m256i __in)
+_mm256_castsi256_pd(__m256i __a)
{
- return (__m256d)__in;
+ return (__m256d)__a;
}
static __inline __m128d __attribute__((__always_inline__, __nodebug__))
-_mm256_castpd256_pd128(__m256d __in)
+_mm256_castpd256_pd128(__m256d __a)
{
- return __builtin_shufflevector(__in, __in, 0, 1);
+ return __builtin_shufflevector(__a, __a, 0, 1);
}
static __inline __m128 __attribute__((__always_inline__, __nodebug__))
-_mm256_castps256_ps128(__m256 __in)
+_mm256_castps256_ps128(__m256 __a)
{
- return __builtin_shufflevector(__in, __in, 0, 1, 2, 3);
+ return __builtin_shufflevector(__a, __a, 0, 1, 2, 3);
}
static __inline __m128i __attribute__((__always_inline__, __nodebug__))
-_mm256_castsi256_si128(__m256i __in)
+_mm256_castsi256_si128(__m256i __a)
{
- return __builtin_shufflevector(__in, __in, 0, 1);
+ return __builtin_shufflevector(__a, __a, 0, 1);
}
static __inline __m256d __attribute__((__always_inline__, __nodebug__))
-_mm256_castpd128_pd256(__m128d __in)
+_mm256_castpd128_pd256(__m128d __a)
{
__m128d __zero = _mm_setzero_pd();
- return __builtin_shufflevector(__in, __zero, 0, 1, 2, 2);
+ return __builtin_shufflevector(__a, __zero, 0, 1, 2, 2);
}
static __inline __m256 __attribute__((__always_inline__, __nodebug__))
-_mm256_castps128_ps256(__m128 __in)
+_mm256_castps128_ps256(__m128 __a)
{
__m128 __zero = _mm_setzero_ps();
- return __builtin_shufflevector(__in, __zero, 0, 1, 2, 3, 4, 4, 4, 4);
+ return __builtin_shufflevector(__a, __zero, 0, 1, 2, 3, 4, 4, 4, 4);
}
static __inline __m256i __attribute__((__always_inline__, __nodebug__))
-_mm256_castsi128_si256(__m128i __in)
+_mm256_castsi128_si256(__m128i __a)
{
__m128i __zero = _mm_setzero_si128();
- return __builtin_shufflevector(__in, __zero, 0, 1, 2, 2);
+ return __builtin_shufflevector(__a, __zero, 0, 1, 2, 2);
}
/* SIMD load ops (unaligned) */
diff --git a/contrib/llvm/tools/clang/lib/Headers/emmintrin.h b/contrib/llvm/tools/clang/lib/Headers/emmintrin.h
index e18fae4..56c6c22 100644
--- a/contrib/llvm/tools/clang/lib/Headers/emmintrin.h
+++ b/contrib/llvm/tools/clang/lib/Headers/emmintrin.h
@@ -1379,39 +1379,39 @@ _mm_movemask_pd(__m128d __a)
__builtin_shufflevector(__a, __b, (i) & 1, (((i) & 2) >> 1) + 2); })
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
-_mm_castpd_ps(__m128d __in)
+_mm_castpd_ps(__m128d __a)
{
- return (__m128)__in;
+ return (__m128)__a;
}
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
-_mm_castpd_si128(__m128d __in)
+_mm_castpd_si128(__m128d __a)
{
- return (__m128i)__in;
+ return (__m128i)__a;
}
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
-_mm_castps_pd(__m128 __in)
+_mm_castps_pd(__m128 __a)
{
- return (__m128d)__in;
+ return (__m128d)__a;
}
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
-_mm_castps_si128(__m128 __in)
+_mm_castps_si128(__m128 __a)
{
- return (__m128i)__in;
+ return (__m128i)__a;
}
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
-_mm_castsi128_ps(__m128i __in)
+_mm_castsi128_ps(__m128i __a)
{
- return (__m128)__in;
+ return (__m128)__a;
}
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
-_mm_castsi128_pd(__m128i __in)
+_mm_castsi128_pd(__m128i __a)
{
- return (__m128d)__in;
+ return (__m128d)__a;
}
static __inline__ void __attribute__((__always_inline__, __nodebug__))
diff --git a/contrib/llvm/tools/clang/lib/Headers/stddef.h b/contrib/llvm/tools/clang/lib/Headers/stddef.h
index 5296224..6a64d6d 100644
--- a/contrib/llvm/tools/clang/lib/Headers/stddef.h
+++ b/contrib/llvm/tools/clang/lib/Headers/stddef.h
@@ -42,11 +42,25 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
typedef __SIZE_TYPE__ size_t;
#endif
+/* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
+ * enabled. */
+#if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \
+ !defined(_RSIZE_T)) || __has_feature(modules)
+/* Always define rsize_t when modules are available. */
+#if !__has_feature(modules)
+#define _RSIZE_T
+#endif
+typedef __SIZE_TYPE__ rsize_t;
+#endif
+
#ifndef __cplusplus
/* Always define wchar_t when modules are available. */
#if !defined(_WCHAR_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WCHAR_T
+#if defined(_MSC_EXTENSIONS)
+#define _WCHAR_T_DEFINED
+#endif
#endif
typedef __WCHAR_TYPE__ wchar_t;
#endif
diff --git a/contrib/llvm/tools/clang/lib/Headers/stdint.h b/contrib/llvm/tools/clang/lib/Headers/stdint.h
index 6f1a876..11529c0 100644
--- a/contrib/llvm/tools/clang/lib/Headers/stdint.h
+++ b/contrib/llvm/tools/clang/lib/Headers/stdint.h
@@ -30,7 +30,48 @@
*/
#if __STDC_HOSTED__ && \
defined(__has_include_next) && __has_include_next(<stdint.h>)
+
+// C99 7.18.3 Limits of other integer types
+//
+// Footnote 219, 220: C++ implementations should define these macros only when
+// __STDC_LIMIT_MACROS is defined before <stdint.h> is included.
+//
+// Footnote 222: C++ implementations should define these macros only when
+// __STDC_CONSTANT_MACROS is defined before <stdint.h> is included.
+//
+// C++11 [cstdint.syn]p2:
+//
+// The macros defined by <cstdint> are provided unconditionally. In particular,
+// the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in
+// footnotes 219, 220, and 222 in the C standard) play no role in C++.
+//
+// C11 removed the problematic footnotes.
+//
+// Work around this inconsistency by always defining those macros in C++ mode,
+// so that a C library implementation which follows the C99 standard can be
+// used in C++.
+# ifdef __cplusplus
+# if !defined(__STDC_LIMIT_MACROS)
+# define __STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS_DEFINED_BY_CLANG
+# endif
+# if !defined(__STDC_CONSTANT_MACROS)
+# define __STDC_CONSTANT_MACROS
+# define __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG
+# endif
+# endif
+
# include_next <stdint.h>
+
+# ifdef __STDC_LIMIT_MACROS_DEFINED_BY_CLANG
+# undef __STDC_LIMIT_MACROS
+# undef __STDC_LIMIT_MACROS_DEFINED_BY_CLANG
+# endif
+# ifdef __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG
+# undef __STDC_CONSTANT_MACROS
+# undef __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG
+# endif
+
#else
/* C99 7.18.1.1 Exact-width integer types.
@@ -626,6 +667,12 @@ typedef __UINTMAX_TYPE__ uintmax_t;
#define PTRDIFF_MAX __INTN_MAX(__PTRDIFF_WIDTH__)
#define SIZE_MAX __UINTN_MAX(__SIZE_WIDTH__)
+/* ISO9899:2011 7.20 (C11 Annex K): Define RSIZE_MAX if __STDC_WANT_LIB_EXT1__
+ * is enabled. */
+#if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1
+#define RSIZE_MAX (SIZE_MAX >> 1)
+#endif
+
/* C99 7.18.2.5 Limits of greatest-width integer types. */
#define INTMAX_MIN __INTN_MIN(__INTMAX_WIDTH__)
#define INTMAX_MAX __INTN_MAX(__INTMAX_WIDTH__)
diff --git a/contrib/llvm/tools/clang/lib/Headers/xopintrin.h b/contrib/llvm/tools/clang/lib/Headers/xopintrin.h
index d107be4..9a5824c 100644
--- a/contrib/llvm/tools/clang/lib/Headers/xopintrin.h
+++ b/contrib/llvm/tools/clang/lib/Headers/xopintrin.h
@@ -1,4 +1,4 @@
-/*===---- xopintrin.h - FMA4 intrinsics ------------------------------------===
+/*===---- xopintrin.h - XOP intrinsics -------------------------------------===
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -22,7 +22,7 @@
*/
#ifndef __X86INTRIN_H
-#error "Never use <fma4intrin.h> directly; include <x86intrin.h> instead."
+#error "Never use <xopintrin.h> directly; include <x86intrin.h> instead."
#endif
#ifndef __XOPINTRIN_H
OpenPOWER on IntegriCloud