gcc-4.5/gcc/config/i386/i386.md:
;; %%% bts, btr, btc, bt.
;; In general these instructions are *slow* when applied to memory,
;; since they enforce atomic operation. When applied to registers,
I haven't found documented confirmation that these instructions are atomic
without a lock prefix,
ha
> ;; %%% bts, btr, btc, bt.
> ;; In general these instructions are *slow* when applied to memory,
> ;; since they enforce atomic operation. When applied to registers,
>
> I haven't found documented confirmation that these instructions are atomic
> without a lock prefix,
> having checked Intel and
> Subject: Re: atomicity of x86 bt/bts/btr/btc?
> From: foxmuldrsterm
> To: jay.krell
> CC: gcc@gcc.gnu.org
> Date: Tue, 19 Oct 2010 02:52:34 -0500
>
> > ;; %%% bts, btr, btc, bt.
> > ;; In general these instructions are
> > They do not automatically lock the bus. They will lock the bus with the
> > explicit LOCK prefix, and BTS is typically used for an atomic read/write
> > operation.
> Thanks Rick.
> I'll go back to using them.
> I'm optimizing mainly for size.
> The comment should perhaps be amended.
> The "sin
> Subject: RE: atomicity of x86 bt/bts/btr/btc?
> From: foxmuldrster
> To: jay
> CC: gcc
> Date: Tue, 19 Oct 2010 03:05:26 -0500
>
> > > They do not automatically lock the bus. They will lock the bus with the
> > &
Jay K writes:
> It might be nice if optimizing for size would use them with code like e.g.:
I encourage you to file a missed-optimization bug at
http://gcc.gnu.org/bugzilla , so that this is not forgotten.
Ian