[fpc-devel] Question on updating FPC packages
J. Gareth Moreton
gareth at moreton-family.com
Tue Oct 29 15:44:28 CET 2019
On 29/10/2019 14:24, Michael Van Canneyt wrote:
>
>
> On Tue, 29 Oct 2019, J. Gareth Moreton wrote:
>
>> Please note that only Marco's e-mails are making the list. I don't
>> see Michael's responses.
>
> That's probably because I am not responding ;-)
>
> Michael.
Yep, just noticed that Marco was responding to your messages from a few
days ago! Perception fail!
In regards to passing everything into XMM0, try running
"tests/test/cg/tvectorcall1.pp" on Linux. It's a bit of a weird test
because there's a lot of Win64 stuff that's not compiled since it tests
aggregates, something that only vectorcall takes advantage of.
Nevertheless, if you get an error such as 'FAIL:
HorizontalAddSingle(HVA) has the vector in the wrong register.', then
the System V ABI is not passing the __m128 type properly. The way it
tests this is via a pair of functions, one in Pascal and one in assembler:
function HorizontalAddSingle(V: TM128): Single; vectorcall;
begin
HorizontalAddSingle := V.M128_F32[0] + V.M128_F32[1] + V.M128_F32[2]
+ V.M128_F32[3];
end;
function HorizontalAddSingle_ASM(V: TM128): Single; vectorcall;
assembler; nostackframe;
asm
HADDPS XMM0, XMM0
HADDPS XMM0, XMM0
end;
If the results are not equal, then the entire vector isn't in XMM0. I
haven't tested it on Linux as much as I would like because I have to
boot into a virtual machine to do so, and I'm still a bit of a Linux
novice. I'm curious to know what the assembler dump is though.
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