From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: GNAT 4.8 atomic access to 64-bit objects Date: Fri, 15 Nov 2013 09:44:41 +0100 Organization: cbb software GmbH Message-ID: <17hrkmg61tzsa.10xsgmupjcz79$.dlg@40tude.net> References: <1neco99j6szmk$.ayjyo0uds8a5.dlg@40tude.net> <87k3gahgdp.fsf@ludovic-brenta.org> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: IenaDxMXK2hi7fvYcb+MlQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 1859 Xref: number.nntp.dca.giganews.com comp.lang.ada:183886 Date: 2013-11-15T09:44:41+01:00 List-Id: On Thu, 14 Nov 2013 21:34:26 +0100, Ludovic Brenta wrote: > "Dmitry A. Kazakov" 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