Compiler basics (5): LLVM system calls

Compiler basics (5): LLVM system calls

Previously in compiler basics:

Compiler basics (1): lisp to assembly

Compiler basics (2): user-defined functions and variables

Compiler basics (3): LLVM

Compiler basics (4): LLVM conditionals and compiling fibonacci

In this post we’ll extend the ulisp compiler’s LLVM backend to support printing integers to stdout. Under the hood LLVM will likely optimize this into a local variable reference instead of first pushing to the stack. Since LLVM IR is typed, the value representing the address of a local variable will be a pointer type.

Source: notes.eatonphil.com