patch-2.4.21 linux-2.4.21/arch/x86_64/lib/clear_page.S
Next file: linux-2.4.21/arch/x86_64/lib/copy_page.S
Previous file: linux-2.4.21/arch/x86_64/kernel/x8664_ksyms.c
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
2003-06-13 07:51:32.000000000 -0700
- Orig file:
linux-2.4.20/arch/x86_64/lib/clear_page.S
- Orig date:
2002-11-28 15:53:12.000000000 -0800
diff -urN linux-2.4.20/arch/x86_64/lib/clear_page.S linux-2.4.21/arch/x86_64/lib/clear_page.S
@@ -1,16 +1,18 @@
- #include <linux/linkage.h>
/*
* Zero a page.
* rdi page
*/
-ENTRY(clear_page)
+ .globl clear_page
+ .p2align 4
+clear_page:
xorl %eax,%eax
- movl $4096/128,%ecx
- movl $128,%edx
-loop:
+ movl $4096/64,%ecx
+ .p2align 4
+.Lloop:
+ decl %ecx
#define PUT(x) movq %rax,x*8(%rdi)
- PUT(0)
+ movq %rax,(%rdi)
PUT(1)
PUT(2)
PUT(3)
@@ -18,17 +20,8 @@
PUT(5)
PUT(6)
PUT(7)
- PUT(8)
- PUT(9)
- PUT(10)
- PUT(11)
- PUT(12)
- PUT(13)
- PUT(14)
- PUT(15)
- addq %rdx,%rdi
- decl %ecx
- jnz loop
- sfence
+ leaq 64(%rdi),%rdi
+ jnz .Lloop
+ nop
ret
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)