Re: Stack frame question on x86 code generation

2005-04-25 Thread James E Wilson
Gang-Ryung Uh wrote: Could anyone help me understand what is the gcc strategy to prepare the stack frame? You didn't mention the gcc version, or the gcc target. Different gcc versions and targets will give different answers. Even different x86 targets work differently. printf("0x%x=return a

Stack frame question on x86 code generation

2005-04-23 Thread Gang-Ryung Uh
Could anyone help me understand what is the gcc strategy to prepare the stack frame? For the following function, void function(int a, int b, int c) { char buffer1[5]; char buffer2[10]; int *ret; ret = &buffer1[0]+28; printf("0x%x=return address, *ret); } I compiled with gcc -O0 -S