Just Enough Assembly for Compiler Explorer
summary
Promise: 50 minutes to decode Compiler Explorer output into concrete actions and reasons. Live emulation of an x86-64 CPU walks through registers, push/pop, memory addressing, LEA trick, compares and conditional jumps, calling convention and returns, and how optimization collapses stack traffic. Examples use GCC 12.2 assembly, show inlining vs call, and run in Compiler Explorer’s execute box. Slides include a tiny stack visualizer and practical tips for reproducing and comparing compilers.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 0:57What is Compiler Restore
- 3:43Assembly
- 7:36Memory
- 11:14Address Memory
- 14:17Register Sizes
- 16:00Ins
- 17:35Arrays
- 23:05Conditionals
- 26:48Compare
- 29:26Loops
- 32:02Example
- 33:25Calling Convention
- 41:20Procedural Programming
- 48:35Optimization
- 50:59Implementation
- 56:53Assembly Documentation
- 58:48Questions
related talks
01h 03mJust Enough Assembly for Compiler Explorer
01h 16m“What Has My Compiler Done for Me Lately? Unbolting the Compiler's Lid”
10mA quick view into a compiler
46mWhat C and C++ can do and when do you need Assembly?
01h 25mPeeking Into Your Compiler
01h 04mCompiler Bugs And Bug Compilers
52mUnderstanding Compiler Optimization
59mCompilers can be surprising
