I've sorta-finished a PDP-11 back-end,* which can be downloaded via
there is plenty there to offend both lcc experts *and* PDP-11 experts.
Operations on char/short/int (2 byte) types seem complete and
functional - I've compiled and run several test programs via
RT-11/MACRO-11, anyway :) I'm impressed with the code quality so far
but it's certainly not perfect; some compromises are due to lcc
itself, but the machine description can undoubtedly be improved. There
is at least one bug lurking however; consider this a beta release.
There is no support (yet) for long or float types. I am hoping to add
these, but lcc seems to have major difficulty with the small register
set (e.g. for long temporaries). DIV/MUL/ASH instructions are assumed.
There's a bunch of commentary there which I'm hoping might help anyone
else attempting a target. Better still, those who are more experienced
than me can give me some pointers on improving this effort. In getting
this far I found out how much I *don't* know about lcc. :)
*Yes, I know there was another PDP-11 back-end at one time. I presume
that was for lcc 3.x, and it doesn't seem to be available anywhere.
Besides, I needed the practice.