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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Clubley Newsgroups: comp.lang.ada Subject: Re: Forcing GNAT to use 32-bit load/store instructions on ARM? Date: Tue, 1 Jul 2014 17:00:45 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <0e0b9ac2-e793-4cc5-8d8d-d3441ca28a58@googlegroups.com> <1j7b0m3yptffy$.1cztnkty8elrv$.dlg@40tude.net> Injection-Date: Tue, 1 Jul 2014 17:00:45 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="e458ff8b81bc0c159989eb0e36c6e372"; logging-data="4371"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Ka6N/IGQ+W32fDaZaYwdPGZs2oZiT7uU=" User-Agent: slrn/0.9.8.1 (VMS/Multinet) Cancel-Lock: sha1:IFgW9MyoXduUe1fP+XYPdV+M76Q= Xref: news.eternal-september.org comp.lang.ada:20666 Date: 2014-07-01T17:00:45+00:00 List-Id: On 2014-07-01, Dmitry A. Kazakov wrote: > On Tue, 1 Jul 2014 12:09:36 +0000 (UTC), Simon Clubley wrote: > >> On 2014-07-01, Dmitry A. Kazakov wrote: >>> On Mon, 30 Jun 2014 15:11:31 -0700 (PDT), daniel.dmk@googlemail.com wrote: >>>> Things I have tried: >>>> 1) Using the Atomic aspect on the record type and CR object had no effect >>>> on the code generated. >>> >>> Yes, I hope they will fix this for this and other platforms, e.g. 64-bit >>> atomic load/store for i686. >> >> Are you saying Pragma Atomic is known to be broken in GNAT ? > > It is not broken. The problem I know is that it is rejected on machines > that do support atomic load and store. > That's not great, but at least you know there's a problem at compile time. In the OP's case (according to the problem description), pragma Atomic was been accepted, but the generated code was not using a 32-bit store and was using an 8-bit store into a 32-bit field instead. If for some reason the compiler could not generate a 32-bit str opcode instead of an 8-bit strb opcode, the pragma Atomic should have caused an error during compilation. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world