mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 18:03:29 +02:00
+ TSCSupport
This commit is contained in:
parent
9ce7fbeef0
commit
567187d4ba
@ -46,6 +46,7 @@ type
|
|||||||
{ returns the contents of the cr0 register }
|
{ returns the contents of the cr0 register }
|
||||||
function cr0 : longint;
|
function cr0 : longint;
|
||||||
|
|
||||||
|
function TSCSupport: boolean;inline;
|
||||||
function MMXSupport: boolean;inline;
|
function MMXSupport: boolean;inline;
|
||||||
function CMOVSupport: boolean;inline;
|
function CMOVSupport: boolean;inline;
|
||||||
function InterlockedCompareExchange128Support: boolean;
|
function InterlockedCompareExchange128Support: boolean;
|
||||||
@ -92,6 +93,7 @@ type
|
|||||||
|
|
||||||
{$ASMMODE INTEL}
|
{$ASMMODE INTEL}
|
||||||
var
|
var
|
||||||
|
_TSCSupport,
|
||||||
_MMXSupport,
|
_MMXSupport,
|
||||||
_CMOVSupport,
|
_CMOVSupport,
|
||||||
_AESSupport,
|
_AESSupport,
|
||||||
@ -269,6 +271,7 @@ type
|
|||||||
begin
|
begin
|
||||||
maxcpuidvalue:=CPUID(0).eax;
|
maxcpuidvalue:=CPUID(0).eax;
|
||||||
cpuid1:=CPUID(1);
|
cpuid1:=CPUID(1);
|
||||||
|
_TSCSupport:=(cpuid1.edx and $20)<>0;
|
||||||
_MMXSupport:=(cpuid1.edx and $800000)<>0;
|
_MMXSupport:=(cpuid1.edx and $800000)<>0;
|
||||||
_CMOVSupport:=(cpuid1.edx and $8000)<>0;
|
_CMOVSupport:=(cpuid1.edx and $8000)<>0;
|
||||||
_AESSupport:=(cpuid1.ecx and $2000000)<>0;
|
_AESSupport:=(cpuid1.ecx and $2000000)<>0;
|
||||||
@ -333,6 +336,12 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TSCSupport: boolean;
|
||||||
|
begin
|
||||||
|
result:=_TSCSupport;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
function MMXSupport: boolean;
|
function MMXSupport: boolean;
|
||||||
begin
|
begin
|
||||||
result:=_MMXSupport;
|
result:=_MMXSupport;
|
||||||
|
Loading…
Reference in New Issue
Block a user