[PATCH 4/5] x86_64: clobber "cc" in inlined clear_page()

From: Alexey Dobriyan
Date: Wed Apr 26 2017 - 14:34:21 EST


Both REP variants clobber flags because of "xor eax, eax" instructions.
While they can be changed to "mov eax, 0", generic version probably
can not because it has to do comparison at some point.

And it is kind of not worth it to not clobber flags anyway.

Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
---

arch/x86/include/asm/page_64.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/include/asm/page_64.h
+++ b/arch/x86/include/asm/page_64.h
@@ -46,7 +46,7 @@ static inline void clear_page(void *page)
clear_page_rep_stosb, X86_FEATURE_ERMS,
"=D" (page),
"0" (page)
- : "memory", "rax", "rcx");
+ : "cc", "memory", "rax", "rcx");
}

void copy_page_mov(void *to, void *from);