Microsoft was very silent on this issue.
This is because stdcall is only used for WinAPI calls.
And no WinAPI call that I know accepts floating point parameters.
According to all the documentation, I can find that all parameters are pushed onto the stack.
This includes floating point options.
If I compile the following code snippet in my compiler, it confirms this:
void __stdcall test3(double a, double b, double c) { }; ..... test3(a,b,c); ..... //This produces the following code as per the stdcall convention. 004182B4 55 push ebp 004182B5 8BEC mov ebp,esp 004182B7 83C4E8 add esp,-$18 004182BA FF75EC push dword ptr [ebp-$14] 004182BD FF75E8 push dword ptr [ebp-$18] 004182C0 FF75F4 push dword ptr [ebp-$0c] 004182C3 FF75F0 push dword ptr [ebp-$10] 004182C6 FF75FC push dword ptr [ebp-$04] 004182C9 FF75F8 push dword ptr [ebp-$08] 004182CC E8ABFFFFFF call Test3
Note that the returned floating point value is returned in ST(0) .
source share