Path: utzoo!mnetor!uunet!husc6!necntc!ima!johnl
From: atbowler@orchid.waterloo.edu (Alan T. Bowler [SDG])
Newsgroups: comp.compilers
Subject: Re: Compilers producing assembly language
Message-ID: <781@ima.ISC.COM>
Date: 9 Dec 87 03:45:36 GMT
References: <765@ima.UUCP> <26100001@nixpbe.UUCP>
Sender: johnl@ima.ISC.COM
Reply-To: atbowler@orchid.waterloo.edu (Alan T. Bowler [SDG])
Organization: U. of Waterloo, Ontario
Lines: 29
Approved: compilers@ima.UUCP

I have 2 major objections to using the assembler as the object deck
writer.
1) Efficiency.  It just takes time to run the 2 or 3 passes of
   the assembler through all that ASCII text so that it can
   recompute a binary number (i.e. the instruction value)
   that the compiler knew when it wrote the text.
   In practice, I've found you can write a set of routines to
   emit code and build an object deck, and use the same set of
   routines to write your assembler.  This way you still only
   write the routines that know the object deck format once,
   but you get the faster compiler.
2) If you do go the route of writing assembler input, you are
   under tremendous presure to make the assembler "fast".  This
   usually results in a lot of things like a good macro processor
   and multiple user defined relocation counters being left out.
   The result is a fast assembler that is very difficult to use
   as for actual assembler programming because its primary mission
   is to be the object deck writer for the compiler instead of
   a tool for the programmer.  If the assembler is only used to
   process the small percentage of code written by programmers
   in assembler, you can afford to let it be somewhat slower
   and support the features that allow a programmer to avoid
   the error prone dog work.

--
Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.ARPA
Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | bbn}!ima
Please send responses to the originator of the message -- I cannot forward
mail accidentally sent back to compilers.  Meta-mail to ima!compilers-request