comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: GNAT 4.8 atomic access to 64-bit objects
Date: Fri, 15 Nov 2013 09:44:41 +0100
Date: 2013-11-15T09:44:41+01:00	[thread overview]
Message-ID: <17hrkmg61tzsa.10xsgmupjcz79$.dlg@40tude.net> (raw)
In-Reply-To: 87k3gahgdp.fsf@ludovic-brenta.org

On Thu, 14 Nov 2013 21:34:26 +0100, Ludovic Brenta wrote:

> "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.

  movq ?

(the target is not an i386)

> 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 :)

Using unchecked union or unchecked conversion?

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2013-11-15  8:44 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
2013-11-15  8:44   ` Dmitry A. Kazakov [this message]
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