mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-05 18:18:26 +02:00
* changed used scratchreg from r0 to r10
This commit is contained in:
parent
66595617c4
commit
b9e01adc15
@ -24,11 +24,11 @@ function InterLockedDecrement (var Target: integer) : Integer; assembler;
|
||||
{ side-effect: target := target-1 }
|
||||
asm
|
||||
InterLockedDecLoop:
|
||||
lwarx r0,r0,r3
|
||||
subi r0,r0,1
|
||||
stwcx. r0,r0,r3
|
||||
lwarx r10,r10,r3
|
||||
subi r10,r10,1
|
||||
stwcx. r10,r10,r3
|
||||
bne InterLockedDecLoop
|
||||
mr r3,r0
|
||||
mr r3,r10
|
||||
end;
|
||||
|
||||
|
||||
@ -38,11 +38,11 @@ function InterLockedIncrement (var Target: integer) : Integer; assembler;
|
||||
{ side-effect: target := target+1 }
|
||||
asm
|
||||
InterLockedIncLoop:
|
||||
lwarx r0,r0,r3
|
||||
addi r0,r0,1
|
||||
stwcx. r0,r0,r3
|
||||
lwarx r10,r10,r3
|
||||
addi r10,r10,1
|
||||
stwcx. r10,r10,r3
|
||||
bne InterLockedIncLoop
|
||||
mr r3,r0
|
||||
mr r3,r10
|
||||
end;
|
||||
|
||||
|
||||
@ -52,10 +52,10 @@ function InterLockedExchange (var Target: integer;Source : integer) : Integer; a
|
||||
{ side-effect: target := source }
|
||||
asm
|
||||
InterLockedXchgLoop:
|
||||
lwarx r0,r0,r3
|
||||
stwcx. r4,r0,r3
|
||||
lwarx r10,r10,r3
|
||||
stwcx. r4,r10,r3
|
||||
bne InterLockedXchgLoop
|
||||
mr r3,r0
|
||||
mr r3,r10
|
||||
end;
|
||||
|
||||
|
||||
@ -65,17 +65,20 @@ function InterLockedExchangeAdd (var Target: integer;Source : integer) : Integer
|
||||
{ side-effect: target := target+source }
|
||||
asm
|
||||
InterLockedXchgAddLoop:
|
||||
lwarx r0,r0,r3
|
||||
add r0,r0,r4
|
||||
stwcx. r0,r0,r3
|
||||
lwarx r10,r10,r3
|
||||
add r10,r10,r4
|
||||
stwcx. r10,r10,r3
|
||||
bne InterLockedXchgAddLoop
|
||||
sub r3,r0,r4
|
||||
sub r3,r10,r4
|
||||
end;
|
||||
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 2003-04-24 12:13:23 florian
|
||||
Revision 1.4 2003-08-24 20:50:11 olle
|
||||
* changed used scratchreg from r0 to r10
|
||||
|
||||
Revision 1.3 2003/04/24 12:13:23 florian
|
||||
* fixed assembler errors
|
||||
|
||||
Revision 1.2 2002/09/07 16:01:26 peter
|
||||
|
Loading…
Reference in New Issue
Block a user