An x86 assembler routine typically begins with the following prologue:
push ebp ; Save ebp
mov ebp, esp ; Set stack frame pointer
sub esp, localbytes ; Allocate space for locals
push <registers> ; Save registers
I have seen functions push anywhere from 1 to 4 registers.
Besides pushing ebp, which is required, what determines whether you push edi, esi, and/or ebx as well?
Should you always push them? I can't find a reference to settle this issue for me.