fix PR6187: various load functions in xmmintrin.h were missing 'const'.
emmintrin looks ok.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94998 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Headers/xmmintrin.h b/lib/Headers/xmmintrin.h
index efb74e4..b59c7e8 100644
--- a/lib/Headers/xmmintrin.h
+++ b/lib/Headers/xmmintrin.h
@@ -462,7 +462,7 @@
}
static inline __m128 __attribute__((__always_inline__, __nodebug__))
-_mm_loadh_pi(__m128 a, __m64 const *p)
+_mm_loadh_pi(__m128 a, const __m64 *p)
{
__m128 b;
b[0] = *(float*)p;
@@ -471,7 +471,7 @@
}
static inline __m128 __attribute__((__always_inline__, __nodebug__))
-_mm_loadl_pi(__m128 a, __m64 const *p)
+_mm_loadl_pi(__m128 a, const __m64 *p)
{
__m128 b;
b[0] = *(float*)p;
@@ -480,13 +480,13 @@
}
static inline __m128 __attribute__((__always_inline__, __nodebug__))
-_mm_load_ss(float *p)
+_mm_load_ss(const float *p)
{
return (__m128){ *p, 0, 0, 0 };
}
static inline __m128 __attribute__((__always_inline__, __nodebug__))
-_mm_load1_ps(float *p)
+_mm_load1_ps(const float *p)
{
return (__m128){ *p, *p, *p, *p };
}
@@ -494,19 +494,19 @@
#define _mm_load_ps1(p) _mm_load1_ps(p)
static inline __m128 __attribute__((__always_inline__, __nodebug__))
-_mm_load_ps(float *p)
+_mm_load_ps(const float *p)
{
return *(__m128*)p;
}
static inline __m128 __attribute__((__always_inline__, __nodebug__))
-_mm_loadu_ps(float *p)
+_mm_loadu_ps(const float *p)
{
return __builtin_ia32_loadups(p);
}
static inline __m128 __attribute__((__always_inline__, __nodebug__))
-_mm_loadr_ps(float *p)
+_mm_loadr_ps(const float *p)
{
__m128 a = _mm_load_ps(p);
return __builtin_shufflevector(a, a, 3, 2, 1, 0);