Y
Yan
Hi.
I found weird gcc/vc behaviour when generating functions code.
According to the docs I read, C functions don't save any registers
except ebp (on x86), but I see that both gcc and cl (VC++) seem
to save ebx, esi and edi while inside functions - even with
optimizations. I wonder if this is one of the "language extensions"
that these compilers offer, or is it some part of standard C behaviour
I overlooked in docs?
The way I know there should be stack frames (push ebp, mov ebp, esp ...)
in functions, but both gcc and cl don't create those, so is this register
saving thing part of that "non-standard" behaviour?
Yan
I found weird gcc/vc behaviour when generating functions code.
According to the docs I read, C functions don't save any registers
except ebp (on x86), but I see that both gcc and cl (VC++) seem
to save ebx, esi and edi while inside functions - even with
optimizations. I wonder if this is one of the "language extensions"
that these compilers offer, or is it some part of standard C behaviour
I overlooked in docs?
The way I know there should be stack frames (push ebp, mov ebp, esp ...)
in functions, but both gcc and cl don't create those, so is this register
saving thing part of that "non-standard" behaviour?
Yan