[fpc-devel] Rules about record types and internal storage

Sven Barth pascaldragon at googlemail.com
Thu Apr 2 17:10:33 CEST 2020


J. Gareth Moreton <gareth at moreton-family.com> schrieb am Do., 2. Apr. 2020,
15:25:

> For standard record types (no "packed" modifier or compiler directives
> or anything), I'm wondering how many liberties that the compiler is
> allowed to take in storing its data.  Take the following example (from
> raybench.pas over here: http://runtimeterror.com/tools/raybench ):
>

With no explicit packing specified the compiler in general follows the
platform's C compiler for compatibility reasons.

>
P.S. Of course you can force it by forcing the vector to be an m128 type
> and specifying vectorcall for x86_64-win64, but not everyone will know
> to do that and it gets unwieldly rather quickly.  Speaking of
> vectorcall, I'm wondering if we can introduce 'fastcall' as an alias for
> 'ms_abi_default', mostly so if we follow Microsoft Visual C++'s example
> of automatically making all routines vectorcall (which is closer to the
> System V ABI used by linux and will make vectorisation easier), we can
> force the default one if we need a routine that, say, has to interface
> with a third-party library ('fastcall' under win32 is what the MS ABI is
> based off... first parameter in ECX, second in EDX and everything else
> on the stack).
>

Please provide a source for your statement that MSVC uses vectorcall by
default. Cause I highly doubt that as Microsoft is huge on backwards
compatibility especially regarding the lower level stuff.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20200402/3b28ff43/attachment.html>


More information about the fpc-devel mailing list