Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Theo Newsgroups: comp.compilers Subject: Re: Modern compilers for ye olde architectures Date: 06 Oct 2021 10:36:29 +0100 (BST) Organization: University of Cambridge, England Lines: 21 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <21-10-013@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="44639"; mail-complaints-to="abuse@iecc.com" Keywords: architecture, history Posted-Date: 06 Oct 2021 11:05:31 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:2721 Luke A. Guest wrote: > 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. > > I know GCC has backends for some older architectures, but these do weird > gymnastics such as implementing a virtual cpu in rtl and then lowering > further. There is, it seems, an LLVM backend for Z80: https://github.com/jacobly0/llvm-project (see the 'z80' branch) It appears TI calculators are the main use case. I don't know the current status/functionality, but it would be fun to see what the various LLVM passes do to the generated code. It seems like there's been some work done on Rust for Z80 (and 6502): https://github.com/jacobly0/llvm-project/issues/15 Theo