[cfe-commits] r94998 - /cfe/trunk/lib/Headers/xmmintrin.h
Chris Lattner
sabre at nondot.org
Mon Feb 1 12:14:14 PST 2010
Author: lattner
Date: Mon Feb 1 14:14:14 2010
New Revision: 94998
URL: http://llvm.org/viewvc/llvm-project?rev=94998&view=rev
Log:
fix PR6187: various load functions in xmmintrin.h were missing 'const'.
emmintrin looks ok.
Modified:
cfe/trunk/lib/Headers/xmmintrin.h
Modified: cfe/trunk/lib/Headers/xmmintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/xmmintrin.h?rev=94998&r1=94997&r2=94998&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/xmmintrin.h (original)
+++ cfe/trunk/lib/Headers/xmmintrin.h Mon Feb 1 14:14:14 2010
@@ -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);
More information about the cfe-commits
mailing list