This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: atomic accesses
- From: "Marty Leisner" <linux at rochester dot rr dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: GCC List <gcc at gcc dot gnu dot org>, linux at rochester dot rr dot com
- Date: Thu, 06 Mar 2008 02:18:46 -0500
- Subject: Re: atomic accesses
- References: <7a2009f68ad10e2c5b9b232a31eab9eb@kernel.crashing.org>
Segher Boessenkool <segher@kernel.crashing.org> writes on Tue, 04 Mar
2008 01:25:33 +0100
> The Linux kernel, and probably some user-space applications and
> libraries
> as well, depend on GCC guaranteeing (a variant of) the following:
>
> "any access to a naturally aligned scalar object in memory
> that is not a bit-field will be performed by a single machine
> instruction whenever possible"
>
> and it seems the current compiler actually does work like this.
>
> I propose we add this text to the GCC manual (where?), so at least they
> are right if/when they blame us for breaking that promise :-)
>
> Comments? Flames?
>
>
> Segher
And how is "whenever possible" a guarantee?
Does this make a difference with the -O level?
marty