SSSE3 detection

This commit is contained in:
Søren Sandmann 2013-11-14 08:33:16 -05:00
parent 6f53fc5a12
commit a45305add6
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From 8487dfbcd056eff066939dc253fcf361b391592a Mon Sep 17 00:00:00 2001
From: Jakub Bogusz <qboosh@pld-linux.org>
Date: Tue, 12 Nov 2013 12:59:42 -0800
Subject: [PATCH] Fix the SSSE3 CPUID detection.
SSSE3 is detected by bit 9 of ECX, but we were checking bit 9 of EDX
which is APIC leading to SSSE3 routines being called on CPUs without
SSSE3.
Reviewed-by: Matt Turner <mattst88@gmail.com>
---
pixman/pixman-x86.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pixman/pixman-x86.c b/pixman/pixman-x86.c
index 6527760..05297c4 100644
--- a/pixman/pixman-x86.c
+++ b/pixman/pixman-x86.c
@@ -170,7 +170,7 @@ detect_cpu_features (void)
features |= X86_SSE;
if (d & (1 << 26))
features |= X86_SSE2;
- if (d & (1 << 9))
+ if (c & (1 << 9))
features |= X86_SSSE3;
/* Check for AMD specific features */
--
1.8.3.1

View File

@ -3,7 +3,7 @@
Name: pixman
Version: 0.32.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Pixel manipulation library
Group: System Environment/Libraries
@ -15,6 +15,7 @@ URL: http://cgit.freedesktop.org/pixman/
# if no revision specified, makes a new one from HEAD.
Source0: http://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.bz2
Source1: make-pixman-snapshot.sh
Patch0: 0001-Fix-the-SSSE3-CPUID-detection.patch
BuildRequires: automake autoconf libtool pkgconfig
@ -32,6 +33,7 @@ Development library for pixman.
%prep
%setup -q
%patch0 -p1 -b .ssse3
%build
%configure \
@ -62,6 +64,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%{_libdir}/pkgconfig/pixman-1.pc
%changelog
* Thu Nov 14 2013 Soren Sandmann <ssp@redhat.com> 0.32.0-2
- Add patch to fix SSSE3 detection
* Sun Nov 10 2013 Soren Sandmann <ssp@redhat.com> 0.32.0-1
- pixman 0.32.0