"Under the register convention, up to three parameters are passed in CPU registers, and the rest (if any) are passed on the stack. The parameters are passed in order of declaration (as with the pascal convention), and the first three parameters that qualify are passed in the EAX, EDX, and ECX registers, in that order. Real, method-pointer, variant, Int64, and structured types do not qualify as register parameters, but all other parameters do. If more than three parameters qualify as register parameters, the first three are passed in EAX, EDX, and ECX, and the remaining parameters are pushed onto the stack in order of declaration."
So, when I have a function in Delphi declared like this:
function proc2(val1:single; val2:integer; val3:integer; val4:integer):single; register; external;
As is now, in ASM I would have to declare it like this:
proc2 proc public Val2:dword, Val3:dword, Val4:dword, Val1:real4
and not like this:
proc2 proc public Val1:real4, Val2:dword, Val3:dword, Val4:dword
because the compiler does not see Val1 does not qualify to come in a register.