]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Fix memset on x86-64
authorAndi Kleen <ak@muc.de>
Fri, 2 Jan 2004 12:57:06 +0000 (04:57 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Fri, 2 Jan 2004 12:57:06 +0000 (04:57 -0800)
The memset for C stepping K8 was broken. This broke mainly CONFIG_SLAB_DEBUG
because memset(...., 0, ...) still worked correctly.

Thanks to Manfred Spraul for giving me the right cue.

arch/x86_64/lib/memset.S

index f0a7bca375c771e71b559c6adb728a2342dae420..4b4c40638640ee8128510155b36dc5550044098a 100644 (file)
@@ -113,7 +113,7 @@ memset_c:
        /* expand byte value  */
        movzbl %sil,%esi
        movabs $0x0101010101010101,%rax
-       mul    %esi             /* with rax, clobbers rdx */
+       mulq   %rsi             /* with rax, clobbers rdx */
        rep
        stosq   
        movl %r8d,%ecx