This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Using bt,bts
- From: Ian Lance Taylor <iant at google dot com>
- To: Ondřej Bílka <neleai at seznam dot cz>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 26 Sep 2012 16:20:52 -0700
- Subject: Re: Using bt,bts
- References: <20120926173459.GA13098@domone.kolej.mff.cuni.cz>
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