x86_64 zero extends 32bit operations, so for 64bit operands,
XOR r32,r32 is functionally equal to XOR r64,r64, but avoids
a REX prefix byte when legacy registers are used.

Signed-off-by: Uros Bizjak <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: Ajay Kaher <[email protected]>
Cc: Alexey Makhalov <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
---
 arch/x86/include/asm/paravirt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index 4f6ec60b4cb3..59aec695ae5f 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -577,7 +577,7 @@ static __always_inline void pv_kick(int cpu)
 static __always_inline bool pv_vcpu_is_preempted(long cpu)
 {
        return PVOP_ALT_CALLEE1(bool, lock.vcpu_is_preempted, cpu,
-                               "xor %%" _ASM_AX ", %%" _ASM_AX,
+                               "xor %%eax, %%eax",
                                ALT_NOT(X86_FEATURE_VCPUPREEMPT));
 }
 
-- 
2.51.1


Reply via email to