Lecture 7: Procedures Sec 6 of x86-64 textbook supplement Sample code used in lecture to illustrate function call, return and register conventions Compiles for x86-64 -------------------------------------------------- fac.txt is a trimmed version of fac.s # generate fac.s gcc -O2 -S fac.c # generate fac gcc -O2 -o fac fac.c -------------------------------------------------- Compiles for x86 gcc -O2 -m32 -S fac32.c gcc -O2 -m32 -o fac32 fac32.c