[llvm-dev] LLVM z80 backend and llvm-dis missing?

Philipp Klaus Krause via llvm-dev
2016-11-01T11:13:32Z

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/