Say I have void f(int a, int b, int c) { g(a, b, c); h(a, b, c); }
in x86 assembly like this:
section .text
f:
pop dword [res_1]
call g ; g(a, b, c)
call h ; h(a, b, c)
push dword [res_1]
ret
section .bss
res_1:
resd 1
If g
follows the cdecl calling convention, am I guaranteed that g
will not alter the parameters passed to it in stack?