Jan Wilmans via llvm-dev
2016-Oct-12 18:23 UTC
[llvm-dev] LLVM z80 backend and llvm-dis missing?
If I understand correctly, this LLVM backend outputs C ? So for me purpose the process would work like : C++ -> clang -> LLVM-C-backend -> C -> SDCC -> z80 assembly? and I read that a current problem is that the 'volatile' keyword gets dropped, that last bit sound like it would actually defeat the whole purpose of the exercise ? volatile is kindof essential to working with the z80' memory-mapped-IOs? Anyway, thanks for your suggestion, I will definitely check it out! Greetings, Jan> The easiest to get C++17 on the Z80 is probably using the experimental > LLVM+SDCC toolchain: > https://sourceforge.net/p/sdcc/mailman/message/35382805/ > Though there is still some work to be done it should be much easier to > make useable for you than to get full Z80 support in LLVM itself. > > Philipp >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161012/2da9a213/attachment.html>
Philipp Klaus Krause via llvm-dev
2016-Nov-01 11:13 UTC
[llvm-dev] LLVM z80 backend and llvm-dis missing?
On 12.10.2016 20:23, Jan Wilmans via llvm-dev wrote:> If I understand correctly, this LLVM backend outputs C ?Yes.> So for me purpose the process would work like : > > C++ -> clang -> LLVM-C-backend -> C -> SDCC -> z80 assembly?Yes.> > and I read that a current problem is that the 'volatile' keyword gets > dropped, that last bit sound like it would actually defeat the whole > purpose of the exercise ? > volatile is kindof essential to working with the z80' memory-mapped-IOs?Well, the volatile issue is just a bug in the C backend that hasn't been fixed yet. Another issue that will take longer to fix is support for the separate address space of the Z80. I.e. the I/O that is not memory-mapped. Getting that one to work will be a bit harder. But since the resulting object files from the LLVM+SDCC toolchain can be freely linked with other object files generated by SDCC, you could have your I/O stuff in C files compiled by SDCC directly, while the rest of your program is passed through LLVM+SDCC and could use C++. Philipp P.S.: So far, I only tested LLVM+SDCC with C as input. P.P.S.: A short page on LLVM+SDCC: http://www.colecovision.eu/llvm+sdcc/