This preview shows page 1. Sign up to view the full content.
Unformatted text preview: o Don’t know if callee might alter, so save this that might • 2 nd approach: callee save registers o Only save what is altered ++ o Don’t know if save value is live – • Actual x86 conventioon o Mixture of callee and caller save: Caller save %eax, ecx, and edx Callee save ebx, esi, and edi o Perform save only when needed, based on local information • Eg. Move eax usage to ebx o Caller, callee save status is now one of the many considerations for what registers to use • Stack o How does it really work? • Other uses for stack o Passig parameters to subroutines o Local variables within subroutines Motivates stack frame, region of stack associated with a particular invocation of a function/subroutine o Top of stack always available via %esp o Stable reference relative to call %ebp (Called Frame Pointer)...
View Full Document
This note was uploaded on 12/05/2011 for the course ENGINEERIN 131 taught by Professor Cytron during the Spring '11 term at Washington University in St. Louis.
- Spring '11
- Computer Science