Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 ----- > > From: "Nick Kurshev" > To: "cgf AT cygnus DOT com" > Subject: Issues about cygwin > Date: Fri, 09 Jun 2000 15:01:48 +0000 (:) > Reply-To: "Nick Kurshev" > 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 -----