* i386: disable InterlockedCompareExchange128 implementation if PIC is enabled

git-svn-id: trunk@47852 -
This commit is contained in:
florian 2020-12-26 21:11:12 +00:00
parent 33afecd117
commit 98d3473a1a

View File

@ -65,16 +65,16 @@ unit cpu;
_RDRANDSupport, _RDRANDSupport,
_RTMSupport: boolean; _RTMSupport: boolean;
{$ASMMODE ATT}
function InterlockedCompareExchange128(var Target: Int128Rec; NewValue: Int128Rec; Comperand: Int128Rec): Int128Rec; function InterlockedCompareExchange128(var Target: Int128Rec; NewValue: Int128Rec; Comperand: Int128Rec): Int128Rec;
label
Lretry;
begin begin
{$ifndef FPC_PIC}
if _RTMSupport then if _RTMSupport then
begin begin
asm asm
Lretry: .Lretry:
xbegin Lretry xbegin .Lretry
end; end;
Result:=Target; Result:=Target;
if (Result.Lo=Comperand.Lo) and (Result.Hi=Comperand.Hi) then if (Result.Lo=Comperand.Lo) and (Result.Hi=Comperand.Hi) then
@ -84,9 +84,11 @@ unit cpu;
end; end;
end end
else else
{$endif FPC_PIC}
RunError(217); RunError(217);
end; end;
{$ASMMODE INTEL}
function cpuid_support : boolean;assembler; function cpuid_support : boolean;assembler;
{ {