Re:LLVM-MOS 6502 Back end [pdf]
by nuc1e0n on Sunday November 13, 2022 @11:49AM
(#33584779)
I think this is the 8th separate attempt I've seen to get LLVM to output 6502 binaries. The others involved a presentation showing the issues involved and how the creator has got it mostly working and made a hello world app or simple game with it. After that the project disappears. Hopefully this time it'll be different.
[ Parent
| on HN ]
It is. It works and compiles relatively non-trivial programs correctly (I tried a PDP-8 emulator and a printf library) with surprising optimisations in spots. On -O3 it turned a print loop over a string array with a mask applied to each character, into applying the mask to the constant at compile-time with a sequence of unrolled LDA#/JSR. Very impressive.