lkml.org 
[lkml]   [2003]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [2.4] gcc3 warns about type-punned pointers ?
Willy Tarreau wrote:
> On Sat, Aug 30, 2003 at 08:27:44AM +0200, Antonio Vargas wrote:
> > That was my fault for introducing an exchange instruction
> > into an assignement discussion, but I don't know of any
> > x86 instruction which can load 64bits to memory atomically,
> > is there any???
>
> perhaps "pusha", but it will load fare more than you need, and I don't know
> if it's lockable.

"pusha" does not promise 64 bit writes. It can't be interrupted, but
I see nothing that ensures the multiple 32 bit words are combined into
atomic 64 bit writes as seen by other CPUs or peripherals.

> Some MMX instruction might do it too, although not sure.

Yes, if you want a 64 bit write and don't want to use cmpxchg8b, MMX
will do it.

You can also do it with the floating-point "fistpll" instruction (also
called "fistpq").

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.036 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site