On 14/02/18 12:08, zhenzhong.duan wrote:
> > @@ -286,13 +286,13 @@
> > setz %dl
> > and %dl, STACK_CPUINFO_FIELD(use_shadow_spec_ctrl)(%r14)
> Is it safe to remove the 'xor %edx, %edx' above? setz set whole byte 1
> or 0.
It is safe, but it is not a good idea.
Using setz is an 8bit operation, which will suffer a register merge
stall in the pipeline as we know for certain at this point that the
upper bits of %edx are nonzero at this point. (An encoding which
allowed setz %eax would have been far more useful in 64bit code.)
Xen-devel mailing list