--- /dev/null
+--- 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},
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
%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)