comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP>
Subject: Re: Modified proposals for Ada-Comment
Date: Sat, 12 Jul 2014 21:24:24 +0000 (UTC)
Date: 2014-07-12T21:24:24+00:00	[thread overview]
Message-ID: <lps928$llk$1@dont-email.me> (raw)
In-Reply-To: ly8unyxpfv.fsf@pushface.org

On 2014-07-12, Simon Wright <simon@pushface.org> wrote:
> Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> 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


  reply	other threads:[~2014-07-12 21:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-12 18:45 Modified proposals for Ada-Comment Simon Clubley
2014-07-12 21:00 ` Simon Wright
2014-07-12 21:24   ` Simon Clubley [this message]
2014-07-12 21:50 ` Niklas Holsti
2014-07-12 22:19   ` Simon Clubley
2014-07-13  0:06     ` Simon Clubley
2014-07-17 21:15   ` Simon Clubley
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox