Re: [PATCH v1 2/8] x86/entry/clearregs: Add infrastructure to clear registers

From: Andi Kleen
Date: Thu Jan 11 2018 - 15:10:14 EST


> > + .macro CLEAR_ALL_REGS
> > + CLEAR_R8_TO_R15
> > + xorl %eax, %eax
> > + xorl %ebx, %ebx
>
> How come you use xorl vs xorq?

64bit always zero extends 32->64, and xorl is one byte
shorter because it doesn't need a REX prefix.

-Andi