Session Type
Quick Talks
Date & Time
Wednesday, May 11, 2022, 12:15 PM - 12:25 PM
Name
LLVM-MOS 6502 Backend: Having a Blast in the Past
Abstract/s
LLVM-MOS is an out-of-tree Clang and LLVM backend for the MOS Technology 6502, the CPU behind the NES, Atari 2600/8-bit, BBC Micro, Commodore 64, and many more beloved devices. LLVM-MOS converts freestanding C/C++ into fairly efficient 6502 machine code, despite the 6502’s limited and heterogeneous registers, lack of stack-relative addressing modes, and 256-byte stack. This talk will explore the grab-bag of tricks that hoodwinked LLVM into supporting an almost 50-year-old architecture: "imaginary" registers, instruction set regularization, whole-program static stack allocation, and, of course, lots and lots of pseudo-instructions.
Location Name
Ballroom 1