Messages in this thread Patch in this message | | | Date | Wed, 26 Apr 2017 21:34:05 +0300 | From | Alexey Dobriyan <> | Subject | [PATCH 4/5] x86_64: clobber "cc" in inlined clear_page() |
| |
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@gmail.com> ---
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);
| |