mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 18:09:15 +02:00
* i386: disable InterlockedCompareExchange128 implementation if PIC is enabled
git-svn-id: trunk@47852 -
This commit is contained in:
parent
33afecd117
commit
98d3473a1a
@ -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;
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user