comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Package Logical performance optimizations
Date: 1997/06/15
Date: 1997-06-15T00:00:00+00:00	[thread overview]
Message-ID: <dewar.866375898@merv> (raw)
In-Reply-To: 01bc78c6$2245f8c0$02899dc0@dorje.east.aonix.com


Ed said

<<Yes, they' re in all the Intel targeted versions of ObjectAda.
>>


(talking of the x86 intrinsics).

That's nice to hear, since as I said I think that was a nice design. One
thing to realize however, is that whenever you use such facilities, you
are introducing not just machine dependence, but also compiler dependence.

As I noted before, there is no standardization of the Machine_Code package
or equivalent intrinsics, even on a particular target, and different
compilers may differ very widely.

GNAT also provides a complete implementation of package Machine_Code and
machine code intrinsics on all targets, but at a quite different level,
which has advantages and disadvantages.

The Object Ada facility is basically raw assembly language, the code generator
does not really know what you are doing, and it is up to you to generate an
appropriate set of instructions which fits in with what is going on around
the code. The advantage of this approach is that it really is very similar
to just writing assembler, and so if you know ASM and Ada well, you can easily
use this facility.

GNAT on the other hand, uses the gcc facilities for machine code. These hook
into the gcc code generator, since basically you are generating RTL, and for
example, you can use symbolic registers, and have the code generator pick the
right registers, fitting in with other use (and optimization) going on around.
You can control absolute registers if you want on a machine like the x86,
where all registers are different, but you don't have to. This approach is
a little more flexible, but it requires a fair amount of understanding of how
machine instructions are represented at the RTL level, which means you have to
know something about GCC, as well as about ASM and Ada.






      reply	other threads:[~1997-06-15  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-09  0:00 Package Logical performance optimizations Al Niessner
1997-06-10  0:00 ` Robert Dewar
1997-06-10  0:00   ` Richard Kenner
1997-06-14  0:00   ` Ed Falis
1997-06-15  0:00     ` Robert Dewar [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