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: border1.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin2!goblin.stu.neva.ru!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Forcing GNAT to use 32-bit load/store instructions on ARM? Date: Tue, 01 Jul 2014 18:44:28 +0300 Organization: Tidorum Ltd Message-ID: References: <0e0b9ac2-e793-4cc5-8d8d-d3441ca28a58@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net S8ps5pfqfQao/jhu8VgBHwfsTmFCNgv8uu2QIYI6meHG+/Fes4 Cancel-Lock: sha1:DXqUExNF+q60uYiO4A9JBfhJGwE= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: Xref: number.nntp.dca.giganews.com comp.lang.ada:187309 Date: 2014-07-01T18:44:28+03:00 List-Id: 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? 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. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .