diff options
author | Matt Turner <mattst88@gmail.com> | 2011-09-22 15:28:00 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2011-09-27 13:13:22 -0400 |
commit | d1313febbec2124ee175cd323a338caa3c1a8fc2 (patch) | |
tree | 29816fb66b9b96130b864daa99c8f36b11fb922a | |
parent | 7ab94c5f99cc524ddfbbcedca4304ec7943f74e1 (diff) |
mmx: optimize unaligned 64-bit ARM/iwmmxt loads
Signed-off-by: Matt Turner <mattst88@gmail.com>
-rw-r--r-- | pixman/pixman-mmx.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c index 801ae32..f848ab4 100644 --- a/pixman/pixman-mmx.c +++ b/pixman/pixman-mmx.c @@ -314,6 +314,13 @@ static __inline__ uint64_t ldq_u(uint64_t *p) #ifdef USE_X86_MMX /* x86's alignment restrictions are very relaxed. */ return *p; +#elif defined USE_ARM_IWMMXT + int align = (uintptr_t)p & 7; + __m64 *aligned_p; + if (align == 0) + return *p; + aligned_p = (__m64 *)((uintptr_t)p & ~7); + return _mm_align_si64 (aligned_p[0], aligned_p[1], align); #else struct __una_u64 { uint64_t x __attribute__((packed)); }; const struct __una_u64 *ptr = (const struct __una_u64 *) p; |