|
@@ -34,6 +34,11 @@ unit cpu;
|
|
|
function AVX2Support: boolean;inline;
|
|
|
function FMASupport: boolean;inline;
|
|
|
function POPCNTSupport: boolean;inline;
|
|
|
+ function SSE41Support: boolean;inline;
|
|
|
+ function SSE42Support: boolean;inline;
|
|
|
+ function MOVBESupport: boolean;inline;
|
|
|
+ function F16CSupport: boolean;inline;
|
|
|
+ function RDRANDSupport: boolean;inline;
|
|
|
|
|
|
var
|
|
|
is_sse3_cpu : boolean = false;
|
|
@@ -50,7 +55,12 @@ unit cpu;
|
|
|
_InterlockedCompareExchange128Support,
|
|
|
_AVX2Support,
|
|
|
_FMASupport,
|
|
|
- _POPCNTSupport: boolean;
|
|
|
+ _POPCNTSupport,
|
|
|
+ _SSE41Support,
|
|
|
+ _SSE42Support,
|
|
|
+ _MOVBESupport,
|
|
|
+ _F16CSupport,
|
|
|
+ _RDRANDSupport: boolean;
|
|
|
|
|
|
function InterlockedCompareExchange128(var Target: Int128Rec; NewValue: Int128Rec; Comperand: Int128Rec): Int128Rec; assembler;
|
|
|
{
|
|
@@ -144,6 +154,11 @@ unit cpu;
|
|
|
_InterlockedCompareExchange128Support:=(_ecx and $2000)<>0;
|
|
|
_AESSupport:=(_ecx and $2000000)<>0;
|
|
|
_POPCNTSupport:=(_ecx and $800000)<>0;
|
|
|
+ _SSE41Support:=(_ecx and $80000)<>0;
|
|
|
+ _SSE42Support:=(_ecx and $100000)<>0;
|
|
|
+ _MOVBESupport:=(_ecx and $400000)<>0;
|
|
|
+ _F16CSupport:=(_ecx and $20000000)<>0;
|
|
|
+ _RDRANDSupport:=(_ecx and $40000000)<>0;
|
|
|
|
|
|
_AVXSupport:=
|
|
|
{ XGETBV suspport? }
|
|
@@ -202,6 +217,36 @@ unit cpu;
|
|
|
result:=_POPCNTSupport;
|
|
|
end;
|
|
|
|
|
|
+ function SSE41Support: boolean;inline;
|
|
|
+ begin
|
|
|
+ result:=_SSE41Support;
|
|
|
+ end;
|
|
|
+
|
|
|
+
|
|
|
+ function SSE42Support: boolean;inline;
|
|
|
+ begin
|
|
|
+ result:=_SSE42Support;
|
|
|
+ end;
|
|
|
+
|
|
|
+
|
|
|
+ function MOVBESupport: boolean;inline;
|
|
|
+ begin
|
|
|
+ result:=_MOVBESupport;
|
|
|
+ end;
|
|
|
+
|
|
|
+
|
|
|
+ function F16CSupport: boolean;inline;
|
|
|
+ begin
|
|
|
+ result:=_F16CSupport;
|
|
|
+ end;
|
|
|
+
|
|
|
+
|
|
|
+ function RDRANDSupport: boolean;inline;
|
|
|
+ begin
|
|
|
+ result:=_RDRANDSupport;
|
|
|
+ end;
|
|
|
+
|
|
|
+
|
|
|
begin
|
|
|
SetupSupport;
|
|
|
end.
|