QBE – Compiler Back End
smartmic
88 points
24 comments
May 08, 2026
Related Discussions
Found 5 related stories in 92.3ms across 8,303 title embeddings via pgvector HNSW
- Writing a C Compiler, in Zig (2025) tosh · 150 pts · April 23, 2026 · 53% similar
- A Compiler Writing Journey ibobev · 58 pts · March 24, 2026 · 52% similar
- Want to write a compiler? Just read these two papers (2008) downbad_ · 479 pts · April 15, 2026 · 49% similar
- TurboQuant: Building a Sub-Byte KV Cache Quantizer from Paper to Production wizzense · 13 pts · March 27, 2026 · 49% similar
- SBCL: the ultimate assembly code breadboard (2014) yacin · 138 pts · May 20, 2026 · 49% similar
Discussion Highlights (9 comments)
superdisk
Cool project, and FWIW it's like one Claude prompt to add MIPS support to this. I did that and then was able to compile my little custom language to the N64.
graemeg
Do you know if there is ongoing work to support x86_64 on Windows?
lucrbvi
I really like QBE but I hope they will make it a true library because I don't want to launch a subprocess to compile a program.
Tiberium
Also relevant: https://git.sr.ht/~mcf/cproc is a C compiler on top of QBE
anthk
A, c9x among codemadness, cool people, among gopher://bitreich.org https://codemadness.org/git/ Tons of these tools I use are from these guys (among 2f30). Small, predictable, usable, such as pointtools and catpoint. Sfeed for RSS, scc for gopher and so on, and smu for markdown from git repos > html.
sylware
Combined with cproc, I get 70% of gcc -O2, for a small fraction of the code... and a plain and simple C coded compiler.
cestith
Related, there’s Blaise which is a new Object Pascal that uses QBE as its backend. https://news.ycombinator.com/item?id=48058644 There’s also cproc which has a few HN posts about it. https://news.ycombinator.com/item?id=24076603 https://news.ycombinator.com/item?id=28242024 https://news.ycombinator.com/item?id=32466098 https://news.ycombinator.com/item?id=25273918
fweimer
IR description here: https://c9x.me/git/qbe.git/tree/doc/il.txt It looks like it doesn't have native support for identifying GC roots, so it's either conservative GC or explicit stack management. I would really like to see something that is (mostly) memory-safe and has string-as-bytes. It's a bit wild that people use Chez Scheme as a target IR for lack of better options.
stevefolta
Looks like a new 1.3 release is coming very soon. I love QBE, but it does have its limitations: - It handles the ABIs for passing and returning structures in registers, but only with superfluous copies to and from the stack. - Can't generate debug info for data. This is probably due to lack of assembler support and/or complexity in the DWARF format. - The line number debug info directives are currently undocumented and don't support inlined functions. But it's smol, effective, and it doesn't make you deal with phi nodes!