3 ms·
It's in the frame pointer. Edit: You're right, optimized code might not save the frame pointer and this wouldn't provide any benefit if your frame had unknown
by jedbrown 17y ago
It's in the frame pointer.
Edit: You're right, optimized code might not save the frame pointer and this wouldn't provide any benefit if your frame had unknown size. But usually the preamble saves the old ESP in EBP and it is restored at the end. Maybe there is another alternative.
- ssp 17y agoHmm, I was actually about to edit my comment to say that you are right because usually you'll store the old stack pointer as the new base pointer. I guess the answer is that realigning at runtime costs a register, but most code has to pay that cost anyway.