Re: [Xen-devel] [PATCH] x86: use tzcnt instead of bsf

2015-01-26 Thread Andrew Cooper
On 23/01/15 16:39, Jan Beulich wrote: > Following a compiler change done in 2012, make use of the fact that for > non-zero input BSF and TZCNT produce the same numeric result (EFLAGS > setting differs), and that CPUs not knowing of TZCNT will treat the > instruction as BSF (i.e. ignore what looks l

[Xen-devel] [PATCH] x86: use tzcnt instead of bsf

2015-01-23 Thread Jan Beulich
Following a compiler change done in 2012, make use of the fact that for non-zero input BSF and TZCNT produce the same numeric result (EFLAGS setting differs), and that CPUs not knowing of TZCNT will treat the instruction as BSF (i.e. ignore what looks like a REP prefix to them). The assumption here