Just came across this on Wikipedia (hence needs to be checked)

If this is how gcc ++ works then it is clear why there is a mis-match
with fpc (instance variable in %rdi) and IMaster.GetVersion (instance
variable expected on stack with caller cleanup).


      /thiscall/

//

/This calling convention is used for calling C++ non-static member
functions. There are two primary versions of //*thiscall*//used
depending on the compiler and whether or not the function uses variable
arguments./

//

/For the GCC compiler, //*thiscall*//is almost identical to //*cdecl*//:
The caller cleans the stack, and the parameters are passed in
right-to-left order. The difference is the addition of the //*this*
pointer
<http://en.wikipedia.org/wiki/This_%28computer_programming%29>//, which
is pushed onto the stack last, as if it were the first parameter in the
function prototype./


On 14/08/14 13:08, Tony Whyman wrote:
> It would be interesting to see what the c++ compiler expected, but my
> guess is that it does not use %rdi for the instance variable

------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to