preserve eax in a "C++" void f(int* a); routine
- From: asetofsymbols@xxxxxxxxx
- Date: 30 Jun 2005 11:01:27 -0700
if I have the routine
void f(int* a);
I have to save eax or not: example
; void f(int* a);
; 0eax, 4Ra, 8 Pa
f:
push eax
mov eax, [esp+8]
mov dword [eax], 900
pop eax
ret
and
;void g(int* a);
; 0Ra, 4Pa
g:
mov eax, [esp+4]
mov dword [eax], 900
ret
If f() and g() are called from a C or a C++ programme,
It is better f() or g() ?
.
- Prev by Date: Re: Click...
- Next by Date: Re: Article about HLA on Linux Journal's website
- Previous by thread: Article about HLA on Linux Journal's website
- Next by thread: Re: HLA Adventure
- Index(es):
Relevant Pages
|