fpc/tests/test/units/cpu/tcpu1.pp
2014-03-27 09:41:59 +00:00

40 lines
577 B
ObjectPascal

{ %cpu=x86_64,i386}
uses
cpu;
begin
write('AVX support: ');
if AVXSupport then
begin
writeln('yes');
asm
vpxor %xmm0,%xmm0,%xmm0
end;
end
else
writeln('no');
write('AVX2 support: ');
if AVX2Support then
begin
writeln('yes');
asm
vpxor %ymm0,%ymm0,%ymm0
end;
end
else
writeln('no');
write('FMA support: ');
if FMASupport then
begin
writeln('yes');
asm
pxor %xmm0,%xmm0
vfmadd132SS %xmm0,%xmm0,%xmm0
end;
end
else
writeln('no');
end.