Brian Callahan <[email protected]> wrote: > Hi ports -- > > Attached is a new port, lang/qbe. QBE is a small, quick compiler backend. > > --- > pkg/DESCR: > QBE is a compiler backend. It aims to be a pure C embeddable backend > that provides 70% of the performance of advanced compilers in 10% of the > code. Its small size serves both its aspirations of correctness and our > ability to understand, fix, and improve it. It also serves its users by > providing trivial integration and great flexibility. > --- > > All tests pass on amd64. > > I marked this port ONLY_FOR_ARCHS=amd64 arm64 riscv64. While QBE > probably builds on all archs, it only generates assembly for these three > archs. I notated this in the Makefile. Like LLVM, you always get all > three assembly generators in the qbe executable. > > This is a neat little program for amateur compiler writers: you can > write your frontend to target QBE and end up with pretty decently > optimized assembly code. > > OK? > > ~Brian
I played a bit with your brainfuck compiler and cproc, everything works fine! Compiling even an hello world with cproc wasn't exactly easy, it doesn't really like the inline assembly in machine/endian.h, but it's not difficoult either and it works fine with qbe. It's ok for me to import. Just a question thought: what about installing doc/*.txt too? il.txt is quite interesting to read, especially given that there isn't other documentation in the source tarball AFAICS.
