On Mon, 2018-03-05 at 16:34 +0800, Wanpeng Li wrote: > 2018-01-04 6:31 GMT+08:00 Jim Mattson <jmattson@xxxxxxxxxx>: > [...] > > > > + "xor %%r8d, %%r8d \n\t" > > + "xor %%r9d, %%r9d \n\t" > > + "xor %%r10d, %%r10d \n\t" > > + "xor %%r11d, %%r11d \n\t" > > + "xor %%r12d, %%r12d \n\t" > > + "xor %%r13d, %%r13d \n\t" > > + "xor %%r14d, %%r14d \n\t" > > + "xor %%r15d, %%r15d \n\t" > Why just the low 32-bit of the R8~R15? In 64-bit mode, 32-bit writes to GPRs implicitly clear the upper 32-bits of the GPR. Using a 32-bit op size versus a 64-bit op size saves one byte per instr since REX.W is not required. And it's not just R8-R15, Jim's patch also performs 32-bit XORs for EAX, EBX, EDI and ESI. > > Regards, > Wanpeng Li