Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.compilers Subject: Re: Modern compilers for ye olde architectures Date: Wed, 06 Oct 2021 07:56:59 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 32 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <21-10-012@comp.compilers> References: <21-10-007@comp.compilers> Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="44290"; mail-complaints-to="abuse@iecc.com" Keywords: history, architecture Posted-Date: 06 Oct 2021 11:04:44 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:2720 "Luke A. Guest" writes: >I have a Z80 project in mind and would like to build a compiler for a >Z80. I was wondering if modern backend techniques can be applied >successfully for these old CPU's, i.e. SSA. SSA can certainly be used in a compiler for the Z80, but SSA is not a back-end technique; it's a way to represent data flow in the intermediate representation. As for the back-end, it seems to me that the major problem with the Z80 is that it does not have general-purpose registers; instead, many instructions deal with specific registers. Many early architectures were like that, and assembly programmers could puzzle out good register assignments, but compilers were not particularly good at it. So eventually computer architects introduced machines with general-purpose registers like the PDP-11, the VAX, and the RISCs; and compiler writers developed techniques like graph colouring to make good use of these architectures. Maybe with the increased memory and processing power available now, one could do better, but given that special-purpose registers are mostly a thing of the past, there has not been much research into that, that I am aware of. Maybe the puzzle-solving approach to register allocation can help, but I am not familiar enough with that to say for sure. - anton -- M. Anton Ertl anton@mips.complang.tuwien.ac.at http://www.complang.tuwien.ac.at/anton/