I'll just say that it's all a can of worms.
Are you compiling caller and callee on the same box? Congratulations, it will work and you don't need to know the details.
Are you calling a closed source routine? Then you have to know the game rules.
I just got through interfacing with some stuff where you didn't know what they were doing.
Since it was "Pascal" convention (callee cleans up) then you just need to call with a fistful of args and see how the stack is when the callee returns.
One of the functions apparently used one more arg than I was thinking of, ergo, it was a "hidden arg" for a pointer to the return value.
The return value was an array of two floats.
But it could have been delivered in two FPU regs or whatever.
You don't know until you try.