[packages/xorg-driver-video-sis] - added x32 patch, release 2

qboosh qboosh at pld-linux.org
Sun Sep 6 12:43:29 CEST 2015


commit 512be1d7b4f50c712ce563c46d5eed14b7bc4883
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Sep 6 12:44:54 2015 +0200

    - added x32 patch, release 2

 xorg-driver-video-sis-x32.patch | 51 +++++++++++++++++++++++++++++++++++++++++
 xorg-driver-video-sis.spec      |  4 +++-
 2 files changed, 54 insertions(+), 1 deletion(-)
---
diff --git a/xorg-driver-video-sis.spec b/xorg-driver-video-sis.spec
index 4b61936..5c598f8 100644
--- a/xorg-driver-video-sis.spec
+++ b/xorg-driver-video-sis.spec
@@ -2,11 +2,12 @@ Summary:	X.org video driver for SiS and XGI video chips
 Summary(pl.UTF-8):	Sterownik obrazu X.org dla układów graficznych SiS i XGI
 Name:		xorg-driver-video-sis
 Version:	0.10.8
-Release:	1
+Release:	2
 License:	MIT
 Group:		X11/Applications
 Source0:	http://xorg.freedesktop.org/releases/individual/driver/xf86-video-sis-%{version}.tar.bz2
 # Source0-md5:	c173c4ce572eb19db5dfdc8a858c6c67
+Patch0:		%{name}-x32.patch
 URL:		http://xorg.freedesktop.org/
 BuildRequires:	Mesa-libGL-devel
 BuildRequires:	autoconf >= 2.60
@@ -57,6 +58,7 @@ XGI Volari Z7 (zwanych serią 315/330/340).
 
 %prep
 %setup -q -n xf86-video-sis-%{version}
+%patch0 -p1
 
 # https://bugs.freedesktop.org/show_bug.cgi?id=18304
 # (not used anyway when xserver uses libpciaccess)
diff --git a/xorg-driver-video-sis-x32.patch b/xorg-driver-video-sis-x32.patch
new file mode 100644
index 0000000..db648ea
--- /dev/null
+++ b/xorg-driver-video-sis-x32.patch
@@ -0,0 +1,51 @@
+--- xf86-video-sis-0.10.8/src/sis_memcpy.c.orig	2015-08-30 01:34:25.000000000 +0200
++++ xf86-video-sis-0.10.8/src/sis_memcpy.c	2015-09-06 12:40:43.927962132 +0200
+@@ -392,7 +392,8 @@
+ #undef SiS_haveProc
+ #undef SiS_haveBuiltInMC
+ 
+-#if defined(__i386__) /* ***************************************** i386 */
++#define IS_X86_64 (defined(__AMD64__) || defined(__amd64__) || defined(__x86_64__))
++#if defined(__i386__) || (IS_X86_64 && defined(_ILP32)) /* ***************************************** i386 or x32 */
+ 
+ #define SiS_checkosforsse 	/* Does this cpu support sse and do we need to check os? */
+ #define SiS_canBenchmark	/* Can we perform a benchmark? */
+@@ -475,10 +476,17 @@
+     unsigned int eax;
+ 
+     __asm__ volatile (
++#if IS_X86_64
++		" pushq %%rbx\n"
++		" cpuid\n"
++		" rdtsc\n"
++		" popq %%rbx\n"
++#else
+ 		" pushl %%ebx\n"
+ 		" cpuid\n"
+ 		" rdtsc\n"
+ 		" popl %%ebx\n"
++#endif
+ 		: "=a" (eax)
+ 		: "0" (0)
+ 		: "ecx", "edx", "cc");
+@@ -486,7 +494,7 @@
+     return(eax);
+ }
+ 
+-#elif defined(__AMD64__) || defined(__amd64__) || defined(__x86_64__) /***************** AMD64 */
++#elif IS_X86_64 /***************** AMD64 */
+ 
+ #define SiS_checkosforsse	/* Does this cpu support sse and do we need to check os? */
+ #define SiS_canBenchmark	/* Can we perform a benchmark? */
+@@ -1016,7 +1024,11 @@
+ 
+ #elif defined(__AMD64__) || defined(__amd64__) || defined(__x86_64__) /* AMD64 specific ***** */
+ 
++#  if defined(_ILP32)
++PREFETCH_FUNC(SiS_sse,SSE,SSE,,FENCE,small_memcpy_i386)
++#  else
+ PREFETCH_FUNC(SiS_sse,SSE64,SSE,,FENCE,small_memcpy_amd64)
++#  endif
+ 
+ static SISMCFuncData MCFunctions_AMD64[] = {
+     {SiS_libc_memcpy,   "libc",      SIS_CPUFL_LIBC, 2,  2, FALSE},
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-sis.git/commitdiff/512be1d7b4f50c712ce563c46d5eed14b7bc4883



More information about the pld-cvs-commit mailing list