On 03/02/19 17:12, J. Gareth Moreton wrote:
Fair enough.  What about calling functions like Int via assembly language, since it's currently impossible to do it either via the internal function or using the public symbol that maps to it, since "CALL int" just raises a linker error - I presume it's not as easy as copying some code from procedure-calling node generation:

"Error: Undefined symbol: SYSTEM_::=::\_INT$DOUBLE::=::\DOUBLE"

It's not possible because Int is not a function, but an intrinsic. This intrinsic can map to a one of several functions in the system unit or may be translated to machine instructions depending on the type of its argument and the target platform (no function for it may even exist in the system unit for certain platforms).

The compiler should give a better error when trying to call intrinsics from assembler code though.


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to