[fpc-devel] Problems with MM types (__m128 etc).

J. Gareth Moreton gareth at moreton-family.com
Fri Apr 8 20:31:47 CEST 2022


On 08/04/2022 19:19, Jonas Maebe via fpc-devel wrote:
> On 08/04/2022 19:57, J. Gareth Moreton via fpc-devel wrote:
>> It looks like support for writing to arrays that are wholly stored in 
>> registers is a little limited and buggy
>
> Modifying individual elements of arrays stored in registers has never 
> been enabled nor supported in the compiler. That is why 
> tvecnode.pass_typecheck calls make_not_regable(left,[ra_addr_regable]);
>
> Enabling that will probably require quite a few changes in many 
> different places and possibly for several architectures all over the 
> compiler.
>
>
> Jonas
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
That might explain a few things.  The problem is that under vectorcall 
and the System V ABI (the default x86_64 calling convention for Linux), 
vector types are supposed to be fully supported, like an aligned array 
of 4 Singles should be passed in a single XMM register.

I had a feeling that the compiler didn't support it, and you directing 
me to pass_typecheck for tvecnode is very helpful - thanks.

I'll have to think about this one a bit since, currently, this is a 
feature specific to x86_64.  I'll have to double-check if there's 
anything special for AArch64 since that has vector registers too.

https://gitlab.com/freepascal.org/fpc/source/-/issues/39657

Gareth aka. Kit


-- 
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the fpc-devel mailing list