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:26:55 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <0e0b9ac2-e793-4cc5-8d8d-d3441ca28a58@googlegroups.com> Injection-Date: Tue, 1 Jul 2014 17:26:55 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="e458ff8b81bc0c159989eb0e36c6e372"; logging-data="23882"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/S2w5fIlKTCW5FxB02RiCdoLIidIGIKCQ=" User-Agent: slrn/0.9.8.1 (VMS/Multinet) Cancel-Lock: sha1:65zP5PjVfJ5NWfMGYhaMXjZxUy8= Xref: news.eternal-september.org comp.lang.ada:20668 Date: 2014-07-01T17:26:55+00:00 List-Id: On 2014-07-01, Niklas Holsti wrote: > On 14-07-01 15:06 , Simon Clubley wrote: >> On 2014-06-30, Jeffrey Carter wrote: >>> On 06/30/2014 03:11 PM, daniel.dmk@googlemail.com wrote: >>>> >>>> Does anyone know how I can force GNAT to generate the appropriate >>>> instructions? >>> >>> If you need specific machine instructions, you should use a machine-code insertion. >>> >> >> The issue here is that Pragma Atomic should have given him the guarantee >> he needs. > > Perhaps pragma Atomic did not work because the record actually had only > 2 significant bits, fitting in one octet, and the Size = 32 bits clause > did not make GNAT treat all 32 bits as atomic? I'm not sure if that > would be a bug -- does a Size clause determine the extent of pragma Atomic? > I suppose it's possible, but then again according to the OP it did work when using a temporary record. > The OP should try to add components to fill all 32 bits, and also use > pragma Atomic. If that doesn't work, then it is a GNAT bug, methinks. > Filling out to 32-bits would be an interesting test (and allows the OP to set them to a known value if performing a simple 32-bit store instead of a R/M/W operation.) Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world