Re: [2.4] gcc3 warns about type-punned pointers ?

From: J.A. Magallon
Date: Fri Aug 29 2003 - 13:53:44 EST



On 08.29, Antonio Vargas wrote:
> On Fri, Aug 29, 2003 at 12:35:11AM +0200, J.A. Magallon wrote:
[...]
> >
> > A collateral question: why is the reason for this function ?
> > long long assignments are not atomic in gcc ?
>
> On x86, long long int == 64 bits but the chip is 32 bits wide,
> so it uses 2 separate memory accesses. There are 64bit-wide
> instructions which do bus-locking so that the are atomic,
> but gcc will not use them directly.
>

I know, my question was why gcc does not generate cmpxchg8b on
a 64 bits assign. Or it should not ?

--
J.A. Magallon <jamagallon@xxxxxxx> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.22-jam1m (gcc 3.3.1 (Mandrake Linux 9.2 3.3.1-1mdk))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/