Re: Modern compilers for ye olde architectures

anton@mips.complang.tuwien.ac.at (Anton Ertl)
Wed, 06 Oct 2021 07:56:59 GMT

          From comp.compilers

Related articles
Modern compilers for ye olde architectures laguest@archeia.com (Luke A. Guest) (2021-10-05)
Re: Modern compilers for ye olde architectures david.brown@hesbynett.no (David Brown) (2021-10-05)
Re: Modern compilers for ye olde architectures DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2021-10-05)
Re: Modern compilers for ye olde architectures derek@NOSPAM-knosof.co.uk (Derek Jones) (2021-10-06)
Re: Modern compilers for ye olde architectures laguest@archeia.com (Luke A. Guest) (2021-10-06)
Re: Modern compilers for ye olde architectures anton@mips.complang.tuwien.ac.at (2021-10-06)
Re: Modern compilers for ye olde architectures theom+news@chiark.greenend.org.uk (Theo) (2021-10-06)
Re: Modern compilers for ye olde architectures laguest@archeia.com (Luke A. Guest) (2021-10-06)
Re: Modern compilers for ye olde architectures pkk@spth.de (Philipp Klaus Krause) (2021-10-06)
Re: Modern compilers for ye olde architectures anton@mips.complang.tuwien.ac.at (2021-10-15)
Re: Modern compilers for ye olde architectures pkk@spth.de (Philipp Klaus Krause) (2021-10-18)
Re: Modern compilers for ye olde architectures pkk@spth.de (Philipp Klaus Krause) (2021-10-18)
[4 later articles]
| List of all articles for this month |

From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.compilers
Date: Wed, 06 Oct 2021 07:56:59 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
References: 21-10-007
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

"Luke A. Guest" <laguest@archeia.com> 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/



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.