comp.lang.ada
 help / color / mirror / Atom feed
* Re: Portable "asm" (Was: The D Programming Language)
       [not found]           ` <7401@brl-smoke.ARPA>
@ 1988-03-04 14:09             ` David Collier-Brown
  0 siblings, 0 replies; only message in thread
From: David Collier-Brown @ 1988-03-04 14:09 UTC (permalink / raw)



In article <7401@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>)
writes:
[re a discussion of "asm" in C]
| A properly-designed system programming language should not have such
| a feature at all.  (It is not guaranteed in C, either.)  The interface
| between the optimized code produced for the HLL and the in-line
| assembly code is quite problematic.  Also, the compiler should not be
| forced to have an assembler built-in just to handle such stuff...

    The interfaces are hard, but within state-of-practice (I hate the
idea of assembler escapes for other reasons).

    As an example, in Honeywell's experimental ADAsil (an incomplete
implementation of Ada[tm]), one could specify the interface to
either a procedure or instruction, and whether its was to be placed
inline or not.  The compiler, having been informed about the
restrictions on parameters via a pragma, arranged to do any register
allocations and transfers required to execute the code.
    Specifically, one coded system calls by producing an object file
containing the instruction (a trap), and placing the restrictions,
the request to put it in-line and the requirements in pragmas
preceding the call.  The compiler would then insert the instruction,
and make sure the registers were used properly around the
instruction.

  Yes, its hard.  But it was claimed to have been harder to write
the pragma interpreter to find out what to do than to write the
optimizer code to do it.

--dave c-b
ps: Corrections re difficulty and exact details welcome: this was some
    years ago! (Ada is old?)

-- 
 David Collier-Brown.                 {mnetor yunexus utgpu}!geac!daveb
 Geac Computers International Inc.,   |  Computer Science loses its
 350 Steelcase Road,Markham, Ontario, |  memory (if not its mind) 
 CANADA, L3R 1B3 (416) 475-0525 x3279 |  every 6 months.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1988-03-04 14:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <11702@brl-adm.ARPA>
     [not found] ` <243@eagle_snax.UUCP>
     [not found]   ` <2245@geac.UUCP>
     [not found]     ` <1988Feb25.203425.8925@utzoo.uucp>
     [not found]       ` <689@l.cc.purdue.edu>
     [not found]         ` <2738@mmintl.UUCP>
     [not found]           ` <7401@brl-smoke.ARPA>
1988-03-04 14:09             ` Portable "asm" (Was: The D Programming Language) David Collier-Brown

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