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]> Reviewed-by: Juergen Gross <[email protected]> Acked-by: "H. Peter Anvin" <[email protected]> Acked-by: Alexey Makhalov <[email protected]> Cc: Ajay Kaher <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Dave Hansen <[email protected]> --- arch/x86/include/asm/paravirt-spinlock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/paravirt-spinlock.h b/arch/x86/include/asm/paravirt-spinlock.h index 458b888aba84..7beffcb08ed6 100644 --- a/arch/x86/include/asm/paravirt-spinlock.h +++ b/arch/x86/include/asm/paravirt-spinlock.h @@ -45,7 +45,7 @@ static __always_inline void pv_queued_spin_unlock(struct qspinlock *lock) static __always_inline bool pv_vcpu_is_preempted(long cpu) { return PVOP_ALT_CALLEE1(bool, pv_ops_lock, vcpu_is_preempted, cpu, - "xor %%" _ASM_AX ", %%" _ASM_AX, + "xor %%eax, %%eax", ALT_NOT(X86_FEATURE_VCPUPREEMPT)); } -- 2.52.0

