summaryrefslogtreecommitdiff
path: root/x11/pixman/patches/patch-ah
blob: 04974c67d1812d0cfbbdf447b8a3d18c37592d6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$NetBSD: patch-ah,v 1.1 2008/10/15 00:56:45 bjs Exp $


1c5de7b05831b3d66821707276b71974a232f5c7

Move _mm_empty() to correct place

The "fbComposeSetupSSE2()" function is guarding most of its code
depending on the capabilities of the CPU, but unfortunately the call
to "_mm_empty()" is not part of this code path but executed
unconditionally.  This results in a "illegal instruction" crash on
non-MMX / non-SSE capable CPUs caused by the the "emms" instruction
(embedded in "_mm_empty()").

Fix bug 17729.

--- pixman/pixman-sse2.c.orig	2008-09-17 09:50:49.000000000 -0400
+++ pixman/pixman-sse2.c
@@ -2357,11 +2357,11 @@ fbComposeSetupSSE2(void)
         pixman_composeFunctions.combineC[PIXMAN_OP_ADD] = sse2CombineAddC;
 
         pixman_composeFunctions.combineMaskU = sse2CombineMaskU;
+
+	_mm_empty();
     }
 
     initialized = TRUE;
-
-    _mm_empty();
 }