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: Sun, 20 Jul 2014 15:49:12 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <0e0b9ac2-e793-4cc5-8d8d-d3441ca28a58@googlegroups.com> <1j7b0m3yptffy$.1cztnkty8elrv$.dlg@40tude.net> Injection-Date: Sun, 20 Jul 2014 15:49:12 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="e458ff8b81bc0c159989eb0e36c6e372"; logging-data="31587"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+dxYNCjljz1O5Fw7w4odaF+w1Dc7gEX7c=" User-Agent: slrn/0.9.8.1 (VMS/Multinet) Cancel-Lock: sha1:CRrpjpsYAZ54bymZ/0q8xLwEwi0= Xref: news.eternal-september.org comp.lang.ada:21077 Date: 2014-07-20T15:49:12+00:00 List-Id: On 2014-07-20, MatthiasR wrote: > > So, if a C compiler is AAPCS-compliant, volatile bitfields should have the > desired behaviour. Whether a compiler is *really* AAPCS-compliant, is > another question. A well-known open source C compiler had bugs in this area > in several releases. Last year, attempts were made to repair it. I don't > know the current status. > That open source C compiler wouldn't be called gcc by any chance would it ? :-) I did some experiments with using bitfields instead of bitmasks in some bare metal ARM target C code a couple of years ago and ran into the exact same problems as the OP's Ada code, with gcc's generated code using ldrb instead of ldr. I haven't tried building a ARM cross compiler using the very latest versions of gcc however. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world