aboutsummaryrefslogtreecommitdiff
path: root/pixman/test/utils-prng.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-12-12 08:39:09 +0100
committermarha <marha@users.sourceforge.net>2012-12-12 08:39:09 +0100
commitc648afe73ef43a15094508d2dd439e05738735bf (patch)
tree6d69f2726eb57d22395ffbe0b7733eebc16d1bb1 /pixman/test/utils-prng.c
parent853b3fc8ee9a4e7f26f87334655a3f5c772502b7 (diff)
parentb395c3c85251d4e8761704d8e3a3c9f9fa5b45cc (diff)
downloadvcxsrv-c648afe73ef43a15094508d2dd439e05738735bf.tar.gz
vcxsrv-c648afe73ef43a15094508d2dd439e05738735bf.tar.bz2
vcxsrv-c648afe73ef43a15094508d2dd439e05738735bf.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig mesa pixman xkeyboard-config git update 12 dev 2012
Diffstat (limited to 'pixman/test/utils-prng.c')
-rw-r--r--pixman/test/utils-prng.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/pixman/test/utils-prng.c b/pixman/test/utils-prng.c
index 7c2dd6a9a..967b8989a 100644
--- a/pixman/test/utils-prng.c
+++ b/pixman/test/utils-prng.c
@@ -27,6 +27,10 @@
#include "utils.h"
#include "utils-prng.h"
+#if defined(GCC_VECTOR_EXTENSIONS_SUPPORTED) && defined(__SSE2__)
+#include <xmmintrin.h>
+#endif
+
void smallprng_srand_r (smallprng_t *x, uint32_t seed)
{
uint32_t i;
@@ -77,6 +81,14 @@ store_rand_128_data (void *addr, prng_rand_128_data_t *d, int aligned)
*(uint8x16 *)addr = d->vb;
return;
}
+ else
+ {
+#ifdef __SSE2__
+ /* workaround for http://gcc.gnu.org/PR55614 */
+ _mm_storeu_si128 (addr, _mm_loadu_si128 ((__m128i *)d));
+ return;
+#endif
+ }
#endif
/* we could try something better for unaligned writes (packed attribute),
* but GCC is not very reliable: http://gcc.gnu.org/PR55454 */