[cfe-commits] r131268 - in /cfe/trunk/lib/Headers: emmintrin.h xmmintrin.h
Bill Wendling
isanbard at gmail.com
Thu May 12 17:11:40 PDT 2011
Author: void
Date: Thu May 12 19:11:39 2011
New Revision: 131268
URL: http://llvm.org/viewvc/llvm-project?rev=131268&view=rev
Log:
Represent the unaligned loads natively. These are converted into a call to the
correct unaligned load.
Modified:
cfe/trunk/lib/Headers/emmintrin.h
cfe/trunk/lib/Headers/xmmintrin.h
Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=131268&r1=131267&r2=131268&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Thu May 12 19:11:39 2011
@@ -466,7 +466,10 @@
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
_mm_loadu_pd(double const *dp)
{
- return __builtin_ia32_loadupd(dp);
+ struct __loadu_pd {
+ __m128d v;
+ } __attribute__((packed));
+ return ((struct __loadu_pd*)dp)->v;
}
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
@@ -1011,7 +1014,10 @@
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
_mm_loadu_si128(__m128i const *p)
{
- return (__m128i)__builtin_ia32_loaddqu((char const *)p);
+ struct __loadu_si128 {
+ __m128i v;
+ } __attribute__((packed));
+ return ((struct __loadu_si128*)p)->v;
}
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
Modified: cfe/trunk/lib/Headers/xmmintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/xmmintrin.h?rev=131268&r1=131267&r2=131268&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/xmmintrin.h (original)
+++ cfe/trunk/lib/Headers/xmmintrin.h Thu May 12 19:11:39 2011
@@ -539,7 +539,10 @@
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
_mm_loadu_ps(const float *p)
{
- return __builtin_ia32_loadups(p);
+ struct __loadu_ps {
+ __m128 v;
+ } __attribute__((packed));
+ return ((struct __loadu_ps*)p)->v;
}
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
More information about the cfe-commits
mailing list