+ TSCSupport

This commit is contained in:
florian 2024-06-29 22:32:16 +02:00
parent 9ce7fbeef0
commit 567187d4ba
2 changed files with 26 additions and 17 deletions

View File

@ -46,6 +46,7 @@ type
{ returns the contents of the cr0 register }
function cr0 : longint;
function TSCSupport: boolean;inline;
function MMXSupport: boolean;inline;
function CMOVSupport: boolean;inline;
function InterlockedCompareExchange128Support: boolean;
@ -92,6 +93,7 @@ type
{$ASMMODE INTEL}
var
_TSCSupport,
_MMXSupport,
_CMOVSupport,
_AESSupport,
@ -269,6 +271,7 @@ type
begin
maxcpuidvalue:=CPUID(0).eax;
cpuid1:=CPUID(1);
_TSCSupport:=(cpuid1.edx and $20)<>0;
_MMXSupport:=(cpuid1.edx and $800000)<>0;
_CMOVSupport:=(cpuid1.edx and $8000)<>0;
_AESSupport:=(cpuid1.ecx and $2000000)<>0;
@ -333,6 +336,12 @@ type
end;
function TSCSupport: boolean;
begin
result:=_TSCSupport;
end;
function MMXSupport: boolean;
begin
result:=_MMXSupport;