delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/06/12/19:16:49

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Message-ID: <39456FF4.5238FC6F@vet.com.au>
Date: Tue, 13 Jun 2000 09:19:16 +1000
From: Trevor Yann <TYann AT vet DOT com DOT au>
Organization: Computer Associates International, Inc
X-Mailer: Mozilla 4.72 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: EBX use (was Issues about cygwin)
References: <20000609160955 DOT A5550 AT cygnus DOT com>

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019