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

J. Gareth Moreton gareth at moreton-family.com
Wed Apr 6 23:26:59 CEST 2022

That's fair.  Looks like I'm going to have to explore and experiment a 
lot more to see if I can 'unbreak' some things.  What was meant to be a 
simple alignment fix has kind of ballooned into much more.

Gareth aka. Kit

On 06/04/2022 22:00, Jonas Maebe via fpc-devel wrote:
> On 06/04/2022 22:58, J. Gareth Moreton via fpc-devel wrote:
>> On 06/04/2022 21:16, Jonas Maebe via fpc-devel wrote:
>>> On 06/04/2022 19:20, J. Gareth Moreton via fpc-devel wrote:
>>>> I recently made a merge request that initally just fixed the 
>>>> incorrect memory alignment for __m128 and similar types, but doing 
>>>> so revealed a whole plethora of other bugs.  First, when I fixed 
>>>> it, __m128 etc were no longer recognised as a valid SIMD or 
>>>> aggregate type due to the wrong alignment field being checked at 
>>>> one point, and some tests with vectorcall revealed some bad code 
>>>> being generated in places.
>>> Note that the ado_IsVector flag until now was only added to be able 
>>> to define arrays as vector types for the purpose of the LLVM 
>>> backend. There is absolutely no support for vector types based on 
>>> this flag anywhere in the code generator.
>> I used it because it was easy to hot-swap the constructor in the 
>> definition of __m128 and the like, and it was a quick and convenient 
>> way to ensure the alignment was correct.
> I mainly meant that some of the bugs you are encountering may be 
> because of that change itself, because it has not been tested/used at 
> all with the regular code generator before.
> Jonas
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

This email has been checked for viruses by Avast antivirus software.

More information about the fpc-devel mailing list