[fpc-devel] Problems with MM types (__m128 etc).
Jonas Maebe
jonas at freepascal.org
Wed Apr 6 23:00:10 CEST 2022
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
More information about the fpc-devel
mailing list