This is the mail archive of the cygwin mailing list for the Cygwin 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: gcc bug: convert_move -O3


Dave Korn schrieb:
2)  Also, the function call is through a
pointer-to-function-taking-stdargs, but the function itself is not a
stdargs function.  Given the wrong calling conventions, this is liable
to lead to both caller *and* callee cleaning the args off the stack.....

Calling conventions should be determined at run-time who will pop the
stack.

Sorry Reini, this sentence doesn't make sense to me. AFAIUI, who will pop the stack is determined at compiletime, according to whether the compiler outputs a plain "ret" or a ret with a size-to-pop at the end of the callee-function, and according to whether it emits code at the call site to adjust %esp or not.

Both DLL types should be able to be loaded.

Now you've really lost me. Are you saying that this particular dll gets built in two versions using different calling conventions? I don't understand here.

I'm talking about FFI's, for which this hack30 was invented and used. (30 for max 30 args)
FFI's need to call functions from stdcall and cdecl shared libs, so the FFI must provide both conventions. stdcall == WinAPI, cdecl e.g. most cygwin dll's.
But now we are way offtopic.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
http://phpwiki.org/


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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