Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site petrus.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!bellcore!petrus!hammond From: hammond@petrus.UUCP Newsgroups: net.arch,net.micro.68k Subject: Re: M680*0 "small model" Message-ID: <375@petrus.UUCP> Date: Mon, 17-Jun-85 07:30:07 EDT Article-I.D.: petrus.375 Posted: Mon Jun 17 07:30:07 1985 Date-Received: Tue, 18-Jun-85 07:42:39 EDT References: <167@mot.UUCP> <1069@peora.UUCP> <1071@peora.UUCP> Organization: Bell Communications Research, Inc Lines: 32 Xref: watmath net.arch:1409 net.micro.68k:926 > Joel Upchurch writes: > It sounds to me like what the 68000 needs is an optimizing assembler. > On Perkin-Elmer 3200 series computers there are several addressing > modes, using from 2 to 6 bytes per instruction. The assembler > automatically figures the best addressing mode and generates the > appropiate object code. ... to which J. Eric Roskos responds: > Actually the better 8086 assemblers do this. And in the days back when I > used to write 8086 assemblers I used an algorithm very similar to the one > you're describing to do it. It is fairly complicated to do, because the > iterative algorithm can loop forever in pathological cases if you don't > keep track of what you're doing. ... a) See Communications of the ACM April 1978, (Vol. 21, No.4) which has "Assembling Code for Machines with Span-Dependent Instructions" by Thomas G. Szymanski. It provides a nice terminating algorithm for the job. I used it in an assembler for the Series/1 and it worked. Of course, unless all your code is in 1 assembler file, you'll miss some optimizations and be forced to make worse case assumptions about some other cases. b) As far as the need for optimizations, I think an appropriate comment was made by Steve Johnson (PCC author) during a class at BTL on the pcc. The comment was in reference to the optimizations done by typical IBM compilers versus those done by typical C compilers and he said (I paraphrase here) "When you've committed yourself to an architecture like IBM's, you'd better become the world's expert in optimizing compiler technology." The same comment is applicable to Intel in the micro world. Rich Hammond, [ucbvax,decvax,allegra]!bellcore!hammond