comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Help with Atomic_Components and whole array assignment
Date: 30 Jan 2001 21:30:03 +0000
Date: 2001-01-30T21:30:03+00:00	[thread overview]
Message-ID: <x7vsnm0vick.fsf@smaug.pushface.org> (raw)
In-Reply-To: 9570vu$fv0$1@nnrp1.deja.com

Robert Dewar <robert_dewar@my-deja.com> writes:

> In article <3A76E455.AABF2490@averstar.com>,
>   Tucker Taft <stt@averstar.com> wrote:
> > I don't agree with Robert on this.  Have you tried writing it
> > as a loop rather than an aggregate assignment.  I suspect
> > that all Ada compilers would use separate assignments,
> > including GNAT.
> 
> True enough
> 
> > In any case, I believe they should use separate assignments.
> 
> Yes, this article of faith has been discussed in a previous
> message but I see nothing in the RM to justify this statement.
> 
> > > Package Machine_Code here we come...
> >
> > This is not necessarily the right conclusion in my view.
> > Most device drivers are written without dropping into machine
> > code these days.  Ada of all languages should not change
> > that.
> 
> If specific instructions are required (as is often the case
> with device drivers), then there is nothing in the C, or
> Ada (or any other) standard that guarantees that a particular
> instruction will be generated. If you are counting on this,
> and it just happens that your compiler let's you get away
> with it, you are writing implementation dependendent bogus
> code, and I think this should be avoided.

If it were another compiler provider, I would be tempted to read this
whole discussion as "it would cost us a bundle to implement this, so
let's dig our heels in". I don't for one moment believe that that's
the case here.

If the intent is to ensure that the RM be modified (advised) so that
Ada will be at least as useful as C for writing device drivers, great!

I'm very very far from the expert on memory-mapped device management
(I know only one, a VME device), but it seems hard to conceive of
devices where you *must* do other than read or write a byte/a short/a
word at once??? can't we come up with an interpretation that does at
least that? then someone who needs to do (say) bit accesses can be
sure they're out on a limb ..

-- 
Simon Wright                       Work Email: simon.j.wright@amsjv.com
Alenia Marconi Systems                        Voice: +44(0)23-9270-1778
Integrated Systems Division                     FAX: +44(0)23-9270-1800



  reply	other threads:[~2001-01-30 21:30 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-22 11:22 Help with Atomic_Components and whole array assignment r_c_chapman
2001-01-22 12:51 ` Stuart Palin
2001-01-22 14:16   ` mark_lundquist
2001-01-22 16:09     ` Pat Rogers
2001-01-22 16:29     ` Robert Dewar
2001-01-22 19:52       ` Mark Lundquist
2001-01-30 15:54       ` Tucker Taft
2001-01-30 18:20         ` Robert Dewar
2001-01-31  5:08           ` DuckE
2001-01-31  5:57             ` Robert Dewar
2001-02-01  3:31               ` DuckE
2001-02-02 21:38               ` Mark Lundquist
2001-02-02 23:08                 ` Robert Dewar
2001-02-03  1:39                 ` tmoran
2001-01-22 16:21 ` Robert Dewar
2001-01-22 16:39   ` r_c_chapman
2001-01-30 15:57     ` Tucker Taft
2001-01-30 18:26       ` Robert Dewar
2001-01-30 21:30         ` Simon Wright [this message]
2001-02-01  6:11           ` Robert Dewar
2001-02-06  0:32         ` Richard Kenner
2001-02-06  3:15           ` Robert Dewar
2001-01-31 10:09       ` Rod Chapman
2001-01-31 21:41         ` Tucker Taft
2001-02-01  5:33           ` Robert Dewar
2001-02-01  9:42           ` Rod Chapman
2001-02-01 18:10             ` Robert Dewar
2001-02-01 13:14           ` SPARK flow analysis (was Help with Atomic_Components and whole array assignment) Stuart Palin
2001-02-01 23:38           ` Help with Atomic_Components and whole array assignment Nick Roberts
2001-02-02  3:45             ` Robert Dewar
2001-02-07 21:40           ` Nick Williams
replies disabled

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