Just enough Assembly for Compiler Explorer
summary
Covers concrete x86_64 details you can use on Compiler Explorer: the System V AMD64 calling convention puts integer args in RDI/RSI, return values in RAX/EAX, and functions preserve RB P while reserving stack space by subtracting from RSP. Shows exact instructions used — mov, add, lea, push/pop, cmp/test and conditional jumps — walks through a sum and a times2 example compiled with GCC 9.1 and -O1 demonstrating inlining and leaving out needless moves. Advises making a single-file reproduction for experimentation.
AI-written summary · about
chapters (13)
- 0:00Introduction to assembly
- 3:02Understanding registers
- 6:17Basic instructions
- 9:16Memory and the stack
- 12:28Memory addressing
- 15:32Data types and sizes
- 18:43Arrays and addressing
- 23:11Control flow
- 27:25Loops in assembly
- 30:06Function calling convention
- 36:42Function calls and scope
- 41:46Compiler optimizations
- 49:25Best practices for analysis
related talks
36mExploiting Buffer Overflows on RISC-V
01h 04mCompiler Bugs And Bug Compilers
36mExploiting Buffer Overflows on RISC-V
01h 27mDangerous Optimizations! in C++ - Part Deux
21mDemystify Today's Binary Disassembling and How Modern ABI Makes it Easier
57mReturn Oriented Programming, an introduction
01h 34mA Little Introduction to Control Flow Integrity in C++
57mReturn Oriented Programming, an introduction
