mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-06 23:00:52 +01:00
40 lines
577 B
ObjectPascal
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.
|
|
|