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 X-Received: by 2002:a0c:c96a:: with SMTP id v39mr2185720qvj.121.1562329187349; Fri, 05 Jul 2019 05:19:47 -0700 (PDT) X-Received: by 2002:a9d:76ce:: with SMTP id p14mr2574661otl.342.1562329187033; Fri, 05 Jul 2019 05:19:47 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!m24no9108814qtm.0!news-out.google.com!a5ni38qtd.0!nntp.google.com!m24no9108811qtm.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 5 Jul 2019 05:19:46 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.204.137.153; posting-account=9DmjiwoAAAD-KD7MAll0qPzDsSqXm2Qs NNTP-Posting-Host: 85.204.137.153 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Odd AVR-Ada code generation issue with constant record type From: Per Jakobsen Injection-Date: Fri, 05 Jul 2019 12:19:47 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2129 X-Received-Body-CRC: 2720552042 Xref: reader01.eternal-september.org comp.lang.ada:56820 Date: 2019-07-05T05:19:46-07:00 List-Id: > First of all you are using an old compiler... Maybe upgrading the compiler (if possible) would help. It might, although I *am* using the newest avr-ada version I can find. If there is a newer I will certainly try!? > I would (in the following order): > 1) declare the registers as Atomic (or Atomic and Volatile but that doesn't matter as Atomic implies Volatile). Declaring the registers Atomic certainly helped a lot - No more run-time "calculations", although all constants are put into SRAM (like Reg_C above), instead of pure "LDI" instructions (Reg_B). > 2) define constants for the values you are assigning. Does not help - Exactly the same behavior. Thanks for the Atomic hint! Anyone knows if there is a newer version of avr-ada out there? Or have instructions on how to create a new?