On 11/19/2009 10:33 AM, Steven Rostedt wrote: > > It has to align the entire stack? Why not just the variable within the > stack? >
Because if the stack pointer isn't aligned, it won't know where it can stuff the variable. It has to pad *somewhere*, and since you may have more than one such variable, the most efficient way -- and by far least complex -- is for the compiler to align the stack when it sets up the stack frame. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.