comp.lang.ada
 help / color / mirror / Atom feed
From: "Samuel T. Harris" <samuel_t_harris@Raytheon.com>
Subject: Re: asm in ada
Date: Wed, 06 Sep 2000 17:03:28 -0500
Date: 2000-09-06T17:03:28-05:00	[thread overview]
Message-ID: <39B6BF30.D5DD7FE@Raytheon.com> (raw)
In-Reply-To: 39B64BC6.DF9ECCCC@maths.unine.ch

Gautier de Montmollin wrote:
> 
> Robert Dewar:
> 
> > It is often better to either try to avoid the use of ASM
> > completely (it would be interesting to know why you are using
> > it, so often there are ways to do what you want in Ada after
> > all), or to write a small assembler routine (which surprisingly
> > is likely to be more portable than writing asm inserts).
> 
> Apart of hardware-oriented instructions, asm code seems to me
> useless if the compiler provides advanced optimizations, like GNAT.
> It is in general useless to try to outperform it.

When our hardware vendor gave us some machine code to do
semaphores which outperforms an Ada task for the same purpose,
and that semaphore is used hundreds of times a second, then
we use a machine code subprogram.

I would say it is usually useless to try to outperform the
compiler. But the thoughful developer will recognize the
appropriate opportunities and exploit them.

-- 
Samuel T. Harris, Principal Engineer
Raytheon, Aerospace Engineering Services
"If you can make it, We can fake it!"



      reply	other threads:[~2000-09-06 22:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Ihps5.149$xr6.264251@nnrp6.proxad.net>
2000-09-06  3:35 ` asm in ada William J. Thomas
2000-09-06 12:41   ` Robert Dewar
2000-09-06 13:51     ` Gautier de Montmollin
2000-09-06 22:03       ` Samuel T. Harris [this message]
replies disabled

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