Align the stack in _pixman_implementation_create_sse2()
authorSøren Sandmann Pedersen <sandmann@redhat.com>
Sat, 18 Jul 2009 21:59:43 +0000 (17:59 -0400)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Mon, 20 Jul 2009 02:50:04 +0000 (22:50 -0400)
When compiled without optimization, GCC will place various temporaries
on the stack. Since Firefox sometimes causes the stack to be aligned
to four bytes, this causes movdqa to generate faults.

pixman/pixman-sse2.c

index cb3daf2..6ee333f 100644 (file)
@@ -629,8 +629,7 @@ core_combine_over_u_sse2 (uint32_t*       pd,
     cache_prefetch ((__m128i*)pm);
 
     /* Align dst on a 16-byte boundary */
-    while (w &&
-           ((unsigned long)pd & 15))
+    while (w && ((unsigned long)pd & 15))
     {
        d = *pd;
        s = combine1 (ps, pm);
@@ -5625,6 +5624,9 @@ sse2_fill (pixman_implementation_t *imp,
     return TRUE;
 }
 
+#if defined(__GNUC__) && !defined(__x86_64__) && !defined(__amd64__)
+__attribute__((__force_align_arg_pointer__))
+#endif
 pixman_implementation_t *
 _pixman_implementation_create_sse2 (void)
 {