LLVM-Z80 offers a powerful LLVM fork tailored for Zilog Z80 microprocessors, bringing modern capabilities to vintage hardware. Although still experimental, it focuses on optimized code generation, supporting a range of Z80 and compatible CPUs. This project is a unique opportunity to leverage LLVM's potential in resource-constrained environments.
LLVM-Z80 is an innovative fork of the LLVM compiler infrastructure specifically designed to support the Zilog Z80 microprocessors and their related architectures. Recognized for its high-performance features, LLVM-Z80 offers a rich set of capabilities aimed at developers looking to harness the power of modern compilation techniques for retro computing.
ld.lld linker or use the SDCC toolchain with sdasz80 and sdldz80 for other assembly requirements.LLVM-Z80 is compatible with a variety of binary-compatible CPUs including:
Developers can leverage LLVM-Z80 with several programming languages:
ELF Toolchain (Default):
clang --target=z80 -O1 input.c -o output.elf
llvm-objcopy -O binary output.elf output.bin
z88dk-ticks -trace output.bin
SDCC Toolchain:
clang --target=z80-unknown-none-sdcc -O1 input.c -o output.ihx
# Execute with z88dk-ticks for simulation
makebin output.ihx output.bin
z88dk-ticks -trace output.bin
These simple commands illustrate how to compile Z80 applications using LLVM-Z80, empowering developers to create efficient programs for legacy systems.
It is important to note that LLVM-Z80 is currently in an experimental phase and may not be suitable for production environments at this time. Developers seeking a stable Z80 C compiler for production purposes are advised to consider the Small Device C Compiler (SDCC).
Further resources and documentation can be found within the repository, including details on tests, utilities, and FAQs for a clearer understanding.
This project is not officially affiliated with or endorsed by the LLVM Foundation or the LLVM project, positioning itself as a community-driven effort aimed at enhancing Z80 programming.
No comments yet.
Sign in to be the first to comment.