This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Handle various cache size
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 6 Sep 2010 22:13:58 -0700
- Subject: PATCH: Handle various cache size
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
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)