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!goblin2!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Clubley Newsgroups: comp.lang.ada Subject: Re: Modified proposals for Ada-Comment Date: Sat, 12 Jul 2014 21:24:24 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Date: Sat, 12 Jul 2014 21:24:24 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="d8085654192ae55367f4bc4f4fbf8c5b"; logging-data="22196"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+iKnoV1v2cf7BhvwJRj+dsPiy0kTghgY=" User-Agent: slrn/0.9.9p1 (Linux) Cancel-Lock: sha1:53QoxRIK418yLoBNF9/k5QUTlvI= Xref: number.nntp.dca.giganews.com comp.lang.ada:187543 Date: 2014-07-12T21:24:24+00:00 List-Id: On 2014-07-12, Simon Wright wrote: > Simon Clubley writes: > >> was defined as Atomic. However, the generated code showed that when a >> bitfield, instead of the record as a whole, was referenced, GNAT used >> ldrb/strb (byte level access instructions) instead of ldr/str (32 bit >> access instructions) when the bitfield was within the first 8 bits >> of the record. > > Likewise when the bitfield was in the MS 8 bits. I haven't tried with > bitfields of length greater than 1. > Oops. :-) I missed that bit. (And I already pointed it out in response to your other posting and had made a mental note to edit it at that time. :-)) >> C.6(15) states: >> >> For an atomic object (including an atomic component) all reads and >> updates of the object as a whole are indivisible. >> >> There are conflicting opinions about the above rule in comp.lang.ada. >> The words "as a whole" in C.6(15) were used to justify the position >> that access to this single bitfield is not required to be in units of >> the record size which on the surface seemed reasonable. > > I think the problem is with the phrase "as a whole". If it means that > partial access need not be indivisible it probably needs to spell it out > better, because that is completely at odds with what I would expect of > "atomic". > Oh, I agree. It will be interesting to see what Randy and company have to say. >> However, other opinions are that C.6(15) does apply when accessing >> this single bitfield. > > I think that the "other opinions" are that "as a whole" is a mistake, so > that C.6(15) should say > > For an atomic object (including an atomic component) all reads and > updates of the object are indivisible. > > > Aside from these niggles, a useful pair of proposals. Thanks. I'll wait another day or so for further comments and then submit the proposals. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world