aboutsummaryrefslogtreecommitdiff
path: root/pixman
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-10-18 11:59:15 +0200
committermarha <marha@users.sourceforge.net>2013-10-18 11:59:15 +0200
commitb821fe861f33d7e8a39fe4c7d885b7ff379dc476 (patch)
tree7b3c0b22d35eadf598cff3965413a96c76d5ad39 /pixman
parent56e12b1310b1b52d00bc27e919d915255af5bf03 (diff)
parentb8a77c943fa53005b6cdb1ab792acf5ff0a131be (diff)
downloadvcxsrv-b821fe861f33d7e8a39fe4c7d885b7ff379dc476.tar.gz
vcxsrv-b821fe861f33d7e8a39fe4c7d885b7ff379dc476.tar.bz2
vcxsrv-b821fe861f33d7e8a39fe4c7d885b7ff379dc476.zip
Merge remote-tracking branch 'origin/released'
* origin/released: mesa pixman git update 18 okt 2013 Conflicts: mesalib/include/GL/glext.h mesalib/include/GL/glxext.h
Diffstat (limited to 'pixman')
-rw-r--r--pixman/pixman/pixman-glyph.c6
-rw-r--r--pixman/test/utils.c32
2 files changed, 36 insertions, 2 deletions
diff --git a/pixman/pixman/pixman-glyph.c b/pixman/pixman/pixman-glyph.c
index 2f7ea940b..60eb10914 100644
--- a/pixman/pixman/pixman-glyph.c
+++ b/pixman/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,
diff --git a/pixman/test/utils.c b/pixman/test/utils.c
index 0cd982e73..281f6b4e2 100644
--- a/pixman/test/utils.c
+++ b/pixman/test/utils.c
@@ -641,6 +641,32 @@ draw_checkerboard (pixman_image_t *image,
}
}
+static uint32_t
+call_test_function (uint32_t (*test_function)(int testnum, int verbose),
+ int testnum,
+ int verbose)
+{
+ uint32_t retval;
+
+#if defined (__GNUC__) && (defined (__i386) || defined (__i386__))
+ __asm__ (
+ /* Deliberately avoid aligning the stack to 16 bytes */
+ "pushl %1\n\t"
+ "pushl %2\n\t"
+ "call *%3\n\t"
+ "addl $8, %%esp\n\t"
+ : "=a" (retval)
+ : "r" (verbose),
+ "r" (testnum),
+ "r" (test_function)
+ : "edx", "ecx"); /* caller save registers */
+#else
+ retval = test_function (testnum, verbose);
+#endif
+
+ return retval;
+}
+
/*
* A function, which can be used as a core part of the test programs,
* intended to detect various problems with the help of fuzzing input
@@ -710,7 +736,9 @@ fuzzer_test_main (const char *test_name,
else if (argc >= 2)
{
n2 = atoi (argv[1]);
- checksum = test_function (n2, 1);
+
+ checksum = call_test_function (test_function, n2, 1);
+
printf ("%d: checksum=%08X\n", n2, checksum);
return 0;
}
@@ -726,7 +754,7 @@ fuzzer_test_main (const char *test_name,
#endif
for (i = n1; i <= n2; i++)
{
- uint32_t crc = test_function (i, 0);
+ uint32_t crc = call_test_function (test_function, i, 0);
if (verbose)
printf ("%d: %08X\n", i, crc);
checksum += crc;