Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site mcnc.mcnc.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!mcnc!jnw From: jnw@mcnc.UUCP (John White) Newsgroups: net.arch,net.micro.68k Subject: Re: M680*0 "small model" Message-ID: <587@mcnc.mcnc.UUCP> Date: Mon, 17-Jun-85 22:30:40 EDT Article-I.D.: mcnc.587 Posted: Mon Jun 17 22:30:40 1985 Date-Received: Wed, 19-Jun-85 04:53:34 EDT References: <167@mot.UUCP> <1069@peora.UUCP> Organization: Microelectronics Center of NC; RTP, NC Lines: 22 Xref: watmath net.arch:1422 net.micro.68k:934 > > The M680*0 small model is not generally supported in M680*0 systems ... > It sounds to me like what the 68000 needs is an optimizing assembler. ... > It seems to me that such an optimizer could be used as a post-processor > for the compiler allowing all languages to use this technique. There is a problem in doing this. Since several files can be compiled seperatly and then linked together, there is no way the compiler can know what data can be fit into the area of memory accessed by "short" instructions. Only the linker can know where each piece of data will be put. I have seen a compiler (on a time-sharing system) that could be given a "shortstatic=number" switch. All variables shorter than "number" bytes whould be put in a seperate partition that the linker whould put within the first 32k of memory. Now the compiler would be able to generate short absolute addreses instead of long absolute addreses. Everything except the biggest arrays could usually be fit in this short partition. In fact, the savings from the shortstatic switch were about as large as from the -O switch, only the shortstatic switch didn't slow the compiler down. The -O and shortstatic switches were independant, so they could be used together for even greater savings. - John N. White {duke, mcnc}!jnw