Using bt,bts

Ian Lance Taylor iant@google.com
Wed Sep 26 23:21:00 GMT 2012


On Wed, Sep 26, 2012 at 10:34 AM, Ondřej Bílka <neleai@seznam.cz> wrote:

> is there a reason why for example
> x=x|(1<<11);
> is not expanded into
> bts rax,11
> ?

The bts instruction is never faster than the corresponding or
instruction.  There's no reason to use it when setting a bit in the
low 32 bits.

Ian



More information about the Gcc-help mailing list