Mail Archives: cygwin-developers/2000/06/12/19:16:49
It appears the Visual C generates code that assumes that the EBX
register is preserved across function calls. From the Visual C doco:
----------------
Argument Passing and Naming Conventions
All arguments are widened to 32 bits when they are passed. Return values
are also widened to 32 bits and returned in the EAX register, except for
8-byte structures, which are returned in the EDX:EAX register pair.
Larger structures are returned in the EAX register as pointers to hidden
return structures. Parameters are pushed onto the stack from right to
left.
The compiler generates prolog and epilog code to save and restore the
ESI, EDI, EBX, and EBP registers, if they are used in the function.
----------------
"cgf AT cygnus DOT com" wrote:
>
> Does anyone know if this is necessary. Is there actually code out there which
> relies on ebx being saved?
>
> As a side note, does anyone understand the fascination some people have with
> exclamation points?
>
> cgf
> ----- Forwarded message from Nick Kurshev <nickols_k AT mail DOT ru> -----
>
> From: "Nick Kurshev" <nickols_k AT mail DOT ru>
> To: "cgf AT cygnus DOT com" <cgf AT cygnus DOT com>
> Subject: Issues about cygwin
> Date: Fri, 09 Jun 2000 15:01:48 +0000 (:)
> Reply-To: "Nick Kurshev" <nickols_k AT mail DOT ru>
> Priority: Normal
>
> Hello!
>
> I have done some tests of my project under Win32. As suggestions I want
> to tell you, that win32 dll's is not always save register ebx! Better to
> recompile cygwin with -fcall-used-ebx key! It some grow size of code,
> but produced most reliable code under Win32!
>
> Best regards! Nick
>
> ----- End forwarded message -----
- Raw text -