This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Handle various cache size


Hi,

sysdeps/i386/i686/multiarch/memset-sse2.S doesn't work with odd shared
cache size, like 1258291. This patch fixes it.  It is needd for both
trunk and 2.12 branch.


H.J.
----
2010-09-06  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/i386/i686/multiarch/memset-sse2.S: Handle various
	cache size.

diff --git a/sysdeps/i386/i686/multiarch/memset-sse2.S b/sysdeps/i386/i686/multiarch/memset-sse2.S
index 09d2ea8..2211d69 100644
--- a/sysdeps/i386/i686/multiarch/memset-sse2.S
+++ b/sysdeps/i386/i686/multiarch/memset-sse2.S
@@ -347,6 +347,10 @@ L(128bytesless_L2_normal):
 	RESTORE_EBX_STATE
 L(128bytesormore_nt_start):
 	sub	%ebx, %ecx
+	mov	%ebx, %eax
+	and	$0x7f, %eax
+	add	%eax, %ecx
+	movd	%xmm0, %eax
 	ALIGN (4)
 L(128bytesormore_shared_cache_loop):
 	prefetcht0	0x3c0(%edx)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]