+ MMXSupport added to cpu unit

* mmx unit makes more use of cpu unit
This commit is contained in:
florian 2024-03-28 10:42:08 +01:00
parent 6c8acf28cd
commit 22e9033076
2 changed files with 31 additions and 22 deletions

View File

@ -46,9 +46,10 @@ type
{ returns the contents of the cr0 register }
function cr0 : longint;
function CMOVSupport : boolean;inline;
function InterlockedCompareExchange128Support : boolean;
function AESSupport : boolean;inline;
function MMXSupport: boolean;inline;
function CMOVSupport: boolean;inline;
function InterlockedCompareExchange128Support: boolean;
function AESSupport: boolean;inline;
function AVXSupport: boolean;inline;
function AVX2Support: boolean;inline;
function AVX512FSupport: boolean;inline;
@ -91,6 +92,7 @@ type
{$ASMMODE INTEL}
var
_MMXSupport,
_CMOVSupport,
_AESSupport,
_AVXSupport,
@ -267,6 +269,7 @@ type
begin
maxcpuidvalue:=CPUID(0).eax;
cpuid1:=CPUID(1);
_MMXSupport:=(cpuid1.edx and $800000)<>0;
_CMOVSupport:=(cpuid1.edx and $8000)<>0;
_AESSupport:=(cpuid1.ecx and $2000000)<>0;
_POPCNTSupport:=(cpuid1.ecx and $800000)<>0;
@ -330,6 +333,12 @@ type
end;
function MMXSupport: boolean;
begin
result:=_MMXSupport;
end;
function CMOVSupport : boolean;
begin
result:=_CMOVSupport;

View File

@ -87,7 +87,7 @@ unit mmx;
begin
{ a cpu with without cpuid instruction supports never mmx }
mmx_support:=cpuid_support and (CPUID(1).edx and (1 shl 23)<>0);
mmx_support:=MMXSupport;
end;
function amd_3d_support : boolean;