+ store also ecx and edx after cpuid call with eax=7

+ test VNNI and BIGALG instructions
This commit is contained in:
florian 2022-02-07 21:21:08 +01:00
parent 1e77901452
commit 79cf1dd9cf
3 changed files with 8 additions and 4 deletions

View File

@ -253,6 +253,8 @@ unit cpu;
movl $0,%ecx
cpuid
movl %ebx,_ebx
movl %ecx,_ecx
movl %edx,_edx
popl %ebx
end;
_AVX2Support:=_AVXSupport and ((_ebx and $20)<>0);

View File

@ -228,6 +228,8 @@ unit cpu;
movl $0,%ecx
cpuid
movl %ebx,_ebx
movl %ecx,_ecx
movl %edx,_edx
end ['rax','rbx','rcx','rdx'];
_AVX2Support:=_AVXSupport and ((_ebx and $20)<>0);
_AVX512FSupport:=(_ebx and $10000)<>0;

View File

@ -40,8 +40,8 @@ begin
begin
writeln('yes');
asm
// vpxor %ymm0,%ymm0,%ymm0
// vaddpd %zmm0,%zmm0,%zmm0
vpxor %ymm0,%ymm0,%ymm0
vpdpbusd %zmm0,%zmm0,%zmm0
end;
end
else
@ -51,8 +51,8 @@ begin
begin
writeln('yes');
asm
//vpxor %ymm0,%ymm0,%ymm0
//vaddpd %zmm0,%zmm0,%zmm0
vpxor %ymm0,%ymm0,%ymm0
vpopcntb %zmm0,%zmm0
end;
end
else