This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use plain old %f format specifier for doubles


Anthony Green skrev 2012-03-21 15:13:
> On Wed, Mar 21, 2012 at 4:59 AM, Peter Rosin <peda@lysator.liu.se> wrote:
>> ---
>>  ChangeLog                        |    6 ++++++
>>  testsuite/libffi.call/float_va.c |   14 +++++++-------
>>  2 files changed, 13 insertions(+), 7 deletions(-)
>>
>> Hi!
>>
>> Another trivial patch, fixes testsuite failures on MinGW, which
>> has different sizes for double and long double.
> 
> Thanks Peter.
> 
> I've committed this and your other patches.

Cool, thanks! BTW, why is all the quilt-stuff in the git repo? Seems a
bit like double work to me... Anyway, do you want me to generate patches
that include the quilt bits?

> The only failures I'm seeing on cygwin now are related to __thiscall
> not being a keyword in the GCC version I'm using.  Ideally we would
> have a configure test for this.

Yes, that's the only issue left on the Cygwin front.  However, my MinGW-gcc
is newer (4.6.2) and has __thiscall, but the closure_thiscall.c test fails
there as well.  The rest is fine, but I have to create a xgcc file with
	#!/bin/sh
	gcc -posix "$@"
to get the printf with the working %lf from the mingwex library.

Anyway, thiscall fails like this (5 times, slightly different first value):

FAIL: libffi.call/closure_thiscall.c output pattern test, is 4199769 0 1 2: 4199775
res: 4199775
stack pointer match
? should match 0 1 2 3: 9
?es: 9
stack pointer match

And, when looking at src/x86/win32.S, thiscall seems to be handled much
like cdecl.  But I was under the impression that on Windows thiscall was
like stdcall with the twist that ecx is 'this'.  It appears as if the
libffi code assumes that thiscall is like cdecl with 'this' pushed last.
Question is if MinGW (and Cygwin) implements thiscall à la Microsoft
or à la Linux?

Cheers,
Peter


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