summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2013-10-11 00:49:44 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2013-10-12 15:34:38 -0400
commit4978392c6d6d6e69bef3bb66ea53f41a58e8eafc (patch)
tree42de8102d4db718bc428a3b5761f4bac3af77b2c
parent0af87fb62db8d718ee0d5f8c8ca52826d90aa530 (diff)
pixman-glyph.c: Add __force_align_arg_pointer to composite functionsstackrealign3
The functions pixman_composite_glyphs_no_mask() and pixman_composite_glyphs() can call into code compiled with -msse2, which requires the stack to be aligned to 16 bytes. Since the ABIs on Windows and Linux for x86-32 don't provide this guarantee, we need to use this attribute to make GCC generate a prologue that realigns the stack. This fixes the crash introduced in the previous commit and also https://bugs.freedesktop.org/show_bug.cgi?id=70348 and https://bugs.freedesktop.org/show_bug.cgi?id=68300
-rw-r--r--pixman/pixman-glyph.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pixman/pixman-glyph.c b/pixman/pixman-glyph.c
index 5a271b64..96a349ab 100644
--- a/pixman/pixman-glyph.c
+++ b/pixman/pixman-glyph.c
@@ -391,6 +391,9 @@ box32_intersect (pixman_box32_t *dest,
return dest->x2 > dest->x1 && dest->y2 > dest->y1;
}
+#if defined(__GNUC__) && !defined(__x86_64__) && !defined(__amd64__)
+__attribute__((__force_align_arg_pointer__))
+#endif
PIXMAN_EXPORT void
pixman_composite_glyphs_no_mask (pixman_op_t op,
pixman_image_t *src,
@@ -630,6 +633,9 @@ out:
* - Trim the mask to the destination clip/image?
* - Trim composite region based on sources, when the op ignores 0s.
*/
+#if defined(__GNUC__) && !defined(__x86_64__) && !defined(__amd64__)
+__attribute__((__force_align_arg_pointer__))
+#endif
PIXMAN_EXPORT void
pixman_composite_glyphs (pixman_op_t op,
pixman_image_t *src,