From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ef33c33c4f98bde1 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Compiler for Z80/6510 Date: 1999/11/27 Message-ID: <81nmu0$e2n$1@nnrp1.deja.com>#1/1 X-Deja-AN: 553509734 References: <383c6fed.458467@news.fiam.net> <81k67s$47l$1@nnrp1.deja.com> <383DC86C.19A6F176@australia.boeing.com> <81m4m4$ci0$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x43.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Sat Nov 27 04:33:03 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-11-27T00:00:00+00:00 List-Id: In article , Robert A Duff wrote: > Do you completely redo the hand-crafted register allocation > (which indeed is very efficient)? Or do you minimize the amount of code > that has to be changed, thereby reducing the probability of bugs? > In many cases, it's irresponsible to do the former. Well the answer is that if you are aiming at optimal code, you certainly redo the register allocation. I remember one incident when Ken Belcher and I were writing SPITBOL/370 which is entirely in BAL. There was a bug that needed fixing in a routine that was maybe 100 lines long, and we both kept putting it off. Finally I came in one day, and said "I fixed that bug .... but there is an extra LR in the middle of the routine" Ken answered immediately "Oh well if you are willing to leave in junk code like that the fix is trivial", and we both new without discussion EXACTLY the issue, namely that the register allocation had to be completely redone for the entire routine to avoid this one register-register move in the middle of it. Eventually it got fixed properly :-) But this is not to suggest for a moment that ANYTHING should be written at this level these days, we can afford to waste some machine time to avoid the maintenance nightmares that Bob quite rightly alludes to! Still it was amazing what could be achieved (the SPITBOL lexer and parser used the TRT instruction extensively, and SPITBOL compiles at millions of lines a minute on a modern mainframe). Sent via Deja.com http://www.deja.com/ Before you buy.