mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Willy Tarreau <willy@w.ods.org>
Cc: Antonio Vargas <wind@cocodriloo.com>,
	"Richard B. Johnson" <root@chaos.analogic.com>,
	"J.A. Magallon" <jamagallon@able.es>,
	Lista Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [2.4] gcc3 warns about type-punned pointers ?
Date: Sat, 30 Aug 2003 12:31:28 +0100	[thread overview]
Message-ID: <20030830113128.GA18793@mail.jlokier.co.uk> (raw)
In-Reply-To: <20030830095625.GN734@alpha.home.local>

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

  reply	other threads:[~2003-08-30 11:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-28 22:35 J.A. Magallon
2003-08-29 15:24 ` Antonio Vargas
2003-08-29 18:48   ` J.A. Magallon
2003-08-29 19:41     ` Richard B. Johnson
2003-08-30  6:27       ` Antonio Vargas
2003-08-30  9:56         ` Willy Tarreau
2003-08-30 11:31           ` Jamie Lokier [this message]
2003-08-30  2:37 ` insecure
2003-08-30 12:33   ` Mikulas Patocka
2003-08-30 13:09     ` Gabriel Paubert
2003-08-30 23:27     ` insecure
2003-08-31  1:27 ` J.A. Magallon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030830113128.GA18793@mail.jlokier.co.uk \
    --to=jamie@shareable.org \
    --cc=jamagallon@able.es \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.com \
    --cc=willy@w.ods.org \
    --cc=wind@cocodriloo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®