This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: stack frame of gcc?
- To: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Subject: RE: stack frame of gcc?
- From: "Wang, Freeman (Xiaoguang)" <Freeman dot Wang at Marconi dot com>
- Date: Thu, 16 Aug 2001 19:19:13 -0400
One of the functions has following disaseembly:
<xyz+2> inl $0x83, %eax
<xyz+4> inb (%dx), %al
<xyz+5> adcb %dl, 0x53(%esi)
<xyz+2> movl 0x8(%ebp), %esi //load the first parameter to esi?
function xyz is defined as
int xyz(xyz_handle_t* xyzh, int flags)
{
int retval;
if(xyzh->field1 == 0){
sub1(1,2,3);
sub2(4,5,6);
....
}
}
Why no %ebp and %esp reservation here?
Thanks
Freeman
-----Original Message-----
From: Wang, Freeman (Xiaoguang)
Sent: Thursday, August 16, 2001 6:56 PM
To: 'gcc@gcc.gnu.org'
Subject: stack frame of gcc?
Hi,
What controls the stack frame of functions when compiled with gcc?
I found in some code that most of the functions follow the same convention:
pushl %ebp
movl %esp,%ebp
but there are still some functions have a strange header.
If the options are : -fno-defer-pop -funsigned-char -fdollars-in-identifiers
-nostdinc -fno-builtin -fvolatile -O2 -pipe -march=pentium, -DCPU=PENTIUM,
which kinds of functions will be assigned the conventional header?
How many variations?
Thanks
Freeman