FP Register Calling Convention



Hi

Somebody told us that C++ Builder transferred FP variables on the FPU stack.
I wrote a little code to see for myself and it does not look like it does.

double Square(double X)
{
return X*X;
}
void __fastcall TForm1::Button1Click(TObject *Sender)
{
double X = 6;
double Y = Square(X);
Edit1->Text = FloatToStr(Y);
}

Unit1.cpp.25: double Y = Square(X);
00401BFF FF75D4 push dword ptr [ebp-$2c]
00401C02 FF75D0 push dword ptr [ebp-$30]
00401C05 E8CAFFFFFF call Square(double)
00401C0A DD5DC8 fstp qword ptr [ebp-$38]

Best regards
Dennis Kjaer Christensen


.