mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-21 09:42:00 +01:00
+ CMPXCHG16BSupport
This commit is contained in:
parent
0566580f15
commit
11f076f0e7
@ -66,6 +66,7 @@ type
|
|||||||
function ADXSupport: boolean;inline;
|
function ADXSupport: boolean;inline;
|
||||||
function SHASupport: boolean;inline;
|
function SHASupport: boolean;inline;
|
||||||
function FMASupport: boolean;inline;
|
function FMASupport: boolean;inline;
|
||||||
|
function CMPXCHG16BSupport: boolean;inline;
|
||||||
function POPCNTSupport: boolean;inline;
|
function POPCNTSupport: boolean;inline;
|
||||||
function LZCNTSupport: boolean;inline;
|
function LZCNTSupport: boolean;inline;
|
||||||
function SSE3Support: boolean;inline;
|
function SSE3Support: boolean;inline;
|
||||||
@ -103,6 +104,7 @@ type
|
|||||||
_AVX512VLSupport,
|
_AVX512VLSupport,
|
||||||
_AVX512VBMISupport,
|
_AVX512VBMISupport,
|
||||||
_AVX512VBMI2Support,
|
_AVX512VBMI2Support,
|
||||||
|
_CMPXCHG16BSupport,
|
||||||
_VAESSupport,
|
_VAESSupport,
|
||||||
_VCLMULSupport,
|
_VCLMULSupport,
|
||||||
_AVX512VNNISupport,
|
_AVX512VNNISupport,
|
||||||
@ -272,6 +274,7 @@ type
|
|||||||
is_sse3_cpu:=(cpuid1.ecx and $1)<>0;
|
is_sse3_cpu:=(cpuid1.ecx and $1)<>0;
|
||||||
|
|
||||||
_FMASupport:=_AVXSupport and ((cpuid1.ecx and $1000)<>0);
|
_FMASupport:=_AVXSupport and ((cpuid1.ecx and $1000)<>0);
|
||||||
|
_CMPXCHG16BSupport:=(cpuid1.ecx and $2000)<>0;
|
||||||
|
|
||||||
_LZCNTSupport:=(CPUID($80000001).ecx and $20)<>0;
|
_LZCNTSupport:=(CPUID($80000001).ecx and $20)<>0;
|
||||||
|
|
||||||
@ -442,6 +445,12 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function CMPXCHG16BSupport: boolean;inline;
|
||||||
|
begin
|
||||||
|
result:=_CMPXCHG16BSupport;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
function POPCNTSupport: boolean;inline;
|
function POPCNTSupport: boolean;inline;
|
||||||
begin
|
begin
|
||||||
result:=_POPCNTSupport;
|
result:=_POPCNTSupport;
|
||||||
|
|||||||
@ -3,6 +3,9 @@
|
|||||||
uses
|
uses
|
||||||
cpu;
|
cpu;
|
||||||
|
|
||||||
|
var
|
||||||
|
dummy16b : array[0..15] of byte;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
write('CMOV support: ');
|
write('CMOV support: ');
|
||||||
if CMOVSupport then
|
if CMOVSupport then
|
||||||
@ -193,5 +196,19 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
writeln('no');
|
writeln('no');
|
||||||
|
write('CMPXCHG16B support: ');
|
||||||
|
if CMPXCHG16BSupport then
|
||||||
|
begin
|
||||||
|
writeln('yes');
|
||||||
|
asm
|
||||||
|
{$ifdef FPC_PIC}
|
||||||
|
cmpxchg16b Dummy16b@GOTPCREL(%rip)
|
||||||
|
{$else FPC_PIC}
|
||||||
|
cmpxchg16b Dummy16b(%rip)
|
||||||
|
{$endif FPC_PIC}
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
writeln('no');
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user