From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: GNAT 4.8 atomic access to 64-bit objects
Date: Thu, 14 Nov 2013 21:34:26 +0100
Date: 2013-11-14T21:34:26+01:00 [thread overview]
Message-ID: <87k3gahgdp.fsf@ludovic-brenta.org> (raw)
In-Reply-To: 1neco99j6szmk$.ayjyo0uds8a5.dlg@40tude.net
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
> The following does not compile anymore for 32-bit Linux targets, e.g. under
> Debian:
>
> procedure Test is
> type T is mod 2**64;
> X : T;
> pragma Atomic (X); -- Error
> begin
> null;
> end Test;
>
> The above seems no more legal, because the compiler does not support
> atomic access to X.
>
> Is there a way to change this without machine code insertions?
Even with machine code insertions, I fail to see how a 32-bit processor
can accept 64-bit integers as atomic.
I'd suggest you use 64-bit floating-point registers instead; i386
processors have them, I think. That has been a useful trick for a
decade or so :)
--
Ludovic Brenta.
next prev parent reply other threads:[~2013-11-14 20:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 15:57 GNAT 4.8 atomic access to 64-bit objects Dmitry A. Kazakov
2013-11-14 20:34 ` Ludovic Brenta [this message]
2013-11-15 8:44 ` Dmitry A. Kazakov
2013-11-15 19:25 ` Georg Bauhaus
2013-11-15 21:33 ` Dmitry A. Kazakov
2013-11-16 10:08 ` Georg Bauhaus
2013-11-16 12:02 ` Dmitry A. Kazakov
2013-11-15 19:08 ` Stefan.Lucks
2013-11-15 21:19 ` Dmitry A. Kazakov
2013-11-22 0:30 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox