Brian Callahan <[email protected]> wrote: > Hi Omar -- > > On 4/13/2022 5:45 AM, Omar Polo wrote: > > 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. > > > > Thanks. Yes, I purposely didn't send the port I have of cproc because > cproc really does need to understand inline assembly before it can be > broadly useful on OpenBSD. Alternatively, you can add a patch to > machine/endian.h to make sure that cproc won't be able to see the inline > assembly and then cproc will be broadly useful. Here's the diff: > https://github.com/michaelforney/cproc/blob/master/.builds/openbsd.diff
thanks for the patch! to be honest i don't feel that confident to tweak endian.h (even if it seems an innocuous diff) > > 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. > > Sure, sounds like a good idea. New tarball attached. Thanks! I prefer to have those files installed :) ok op@ > ~Brian
