Is the parameters stored on the stack preserved across function calls or volatile in the ABI of intel386 & amd64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Is the parameters stored on the stack preserved across function calls or
volatile in the ABI of intel386 & amd64?

I think the answer should be 'volatile' because gcc sometimes did modify
them in the callee but couldn't found any description about it in the
specifications of Sys V ABI intel386 & amd64.

Example:

void* get(void* i){ void**p = &i; *p=(void*)0; return p; }

gcc yields:(elf32-i386)

push   ebp
mov    ebp,esp
sub    esp,0x10
lea    eax,[ebp+0x8]
mov    DWORD PTR [ebp-0x4],eax
mov    eax,DWORD PTR [ebp-0x4]
mov    DWORD PTR [eax],0x0
mov    eax,DWORD PTR [ebp-0x4]
leave
ret

Thanks a lot.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux