Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!mit-eddie!genrad!decvax!wanginst!ulowell!page From: page@ulowell.UUCP (Bob Page) Newsgroups: comp.sys.amiga Subject: Re: More bugs... (fixed in V3.30e) Message-ID: <836@ulowell.UUCP> Date: Mon, 8-Dec-86 23:42:26 EST Article-I.D.: ulowell.836 Posted: Mon Dec 8 23:42:26 1986 Date-Received: Wed, 10-Dec-86 03:32:16 EST References: <723@watmum.UUCP> Reply-To: page@ulowell.UUCP (Bob Page) Distribution: net Organization: University of Lowell Lines: 58 rmariani@watmum.UUCP (Rico Mariani) wrote in article <723@watmum.UUCP>: some INCREDIBLY horrible C code. Rico, where the hell do you get such ugly code? Anyway, on with our regularly scheduled article: >main() >{ > int box[1], i; > > (box+i)[0] = > (box+i)[0] = > (box+i)[0] = > (box+i*i)[0] = 0; >} The Manx V3.30e (beta version) compiler and assembler like this code. Witness the difference between V3.20a and V3.30e (please excuse any little typos; I'm typing this in by hand): Old (V3.20a) code: New (V3.30e) code: ----------------- ----------------- move.l -8(a5),d3 move.l -8(a5),d1 asl.l #2,d3 move.l -8(a5),d0 jsr .mulu# lea -4(a5),a6 move.l -8(a5),d2 asl.l #2,d2 asl.l #2,d0 lea -4(a5),a1 lea -4(a5),a0 clr.l (a0,d0.l) move.l -8(a5),d1 move.l -8(a5),d2 asl.l #2,d1 asl.l #2,d2 lea -4(a5),a0 lea -4(a5),a1 clr.l (a1,d2.l) move.l -8(a5),d0 move.l -8(a5),d3 move.l d1,-(sp) move.l -8(a5),d1 jsr .mulu# asl.l #2,d0 asl.l #2,d3 move.l a6,-(sp) lea -4(a5),a6 lea -4(a5),a6 clr.l (a6,d0.l) clr.l (a6,d3.l) clr.l (a0,.l) clr.l (a1,d2.l) move.l (sp)+,a6 move.l (sp)+,d1 move.l -8(a5),d3 asl.l #2,d3 lea -4(a5),a6 clr.l (a6,d3.l) clr.l (a6,d3.l) The new Manx compiler (at least the beta version) is producing much tighter code these days. And in this case, better code too. We've seen some problems with the libraries (some types that should be 16-bit values are in the libraries as 32-bit values), but the compiler itself seems to be doing pretty well. ..Bob (beta testing the Manx compiler, if you hadn't guessed) -- Bob Page, U of Lowell CS Dept. ulowell!page, page@ulowell.CSNET