Daniël Mantione schrieb:
Within a certain calling convention, the behaviour of const is defined
and will not change. I.e. an int64 may be passed by value in one calling
convention and by ref in another, but once the calling convention is
fixed, future compatibily is maintained; your assembler routines can
safely assume the behaviour won't change.
The compiler has to implement correctly the ABI of every platform, for
compatibility with external functions. Assembler code has to be
rewritten for every target machine and ABI.
The language can only specify proprietary calling conventions (ABI),
that are bound to specific processors, so that assembler code can be
written once for every processor, regardless of the platform ABI.
The use of "const" parameters and generic types is nonsense with
assembler routines, because these are compiler specific implementation
details. I'd also ban their use in shared libraries (DLL/so), which must
have an immutable ABI. Here's another place for the "constref" modifier.
DoDi
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel