Hacker News new | ask | show | jobs
by fiveop 3033 days ago
SBCL is mostly written in Common Lisp. It has a compiler that can compile itself. Part of that compiler are definitions of building blocks (VOPs or virtual operations) that describe snippets of assembly code. So as always, you use the tools provided by Lisp to create a DSL that allows you to write code as is practical for your use case.

For an example look at https://github.com/sbcl/sbcl/blob/master/src/compiler/x86-64...

You can find similar code for other ISAs in neighbouring directories.