This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH]: Promote float args on i386 (attn Hurd, Cygwin, DJGPP...)


   Date: Fri, 12 May 2000 12:19:34 -0700
   From: Michael Snyder <msnyder@cygnus.com>

   Mark Kettenis wrote:

   > It's got nothing to do with the Linux version, and probably everything
   > with the compiler.  Could you post the assembler output that your compiler
   > generates for the following fragment:
   > 
   > extern int foo (float f, float g);
   > 
   > void
   > bar (void)
   > {
   >   foo (3.14, 2.72);
   > }

   As you'll see below, I get something completely different.

Not really.  The code looks (almost) equivalent to me (the only
difference is that in my case the floating point values are loaded via
the FPU, and in your case they're directly pushed onto the stack.
However, this is a different compiler than you reported before.  I
expect that on your RedHat system, the tests will pass without yout
patch (and fail with the patch), and that the GNUpro compiler
generates code that's incompatible with the System V ABI, and
therefore incompatible with virtually every i386 Unix.

Mark

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]