Messages in this thread | | | Date | Tue, 18 Nov 2008 19:35:20 +0800 | From | "jidong xiao" <> | Subject | What's the difference between clear_page and clear_page_c? |
| |
Hi, All,
I saw there are clear_page and clear_page_c defined in arch/x86/lib/clear_page_64.S, but what's the difference between these two function? In addition, look at below lines copied from linux-2.6.27-rc2, particularly line 16, is it a typo? I feel it should be ENDPROC(clear_page_c) other than ENDPROC(clear_page), isn't it??
4 /* 5 * Zero a page. 6 * rdi page 7 */ 8 ALIGN 9 clear_page_c: 10 CFI_STARTPROC 11 movl $4096/8,%ecx 12 xorl %eax,%eax 13 rep stosq 14 ret 15 CFI_ENDPROC 16 ENDPROC(clear_page) 17 18 ENTRY(clear_page) 19 CFI_STARTPROC 20 xorl %eax,%eax 21 movl $4096/64,%ecx 22 .p2align 4 23 .Lloop: 24 decl %ecx 25 #define PUT(x) movq %rax,x*8(%rdi) 26 movq %rax,(%rdi) 27 PUT(1) 28 PUT(2) 29 PUT(3) 30 PUT(4) 31 PUT(5) 32 PUT(6) 33 PUT(7) 34 leaq 64(%rdi),%rdi 35 jnz .Lloop 36 nop 37 ret 38 CFI_ENDPROC 39 .Lclear_page_end: 40 ENDPROC(clear_page)
Regards Jason
| |