mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:09:42 +02:00
do not refer reg a6 directly, base pointer might differ among platforms (a5 on m68k-amiga)
git-svn-id: trunk@23167 -
This commit is contained in:
parent
39755ba888
commit
e2f02faca0
@ -85,9 +85,9 @@ end;
|
||||
{$define FPC_SYSTEM_HAS_FILLCHAR}
|
||||
procedure FillChar(var x;count:longint;value:byte); assembler;
|
||||
asm
|
||||
move.l 8(a6), a0 { destination }
|
||||
move.l 12(a6), d1 { number of bytes to fill }
|
||||
move.b 16(a6),d0 { fill data }
|
||||
move.l x, a0 { destination }
|
||||
move.l count, d1 { number of bytes to fill }
|
||||
move.b value, d0 { fill data }
|
||||
cmpi.l #65535, d1 { check, if this is a word move }
|
||||
ble @LMEMSET3 { use fast dbra mode }
|
||||
bra @LMEMSET2
|
||||
@ -126,9 +126,9 @@ procedure strcopy; assembler;[public,alias: 'FPC_STRCOPY'];
|
||||
{ registers destroyed: a0,a1,d0,d1 }
|
||||
{---------------------------------------------------}
|
||||
asm
|
||||
{ move.l 12(a6),a0
|
||||
move.l 16(a6),a1
|
||||
move.l 8(a6),d1 }
|
||||
{ move.l sstr,a0
|
||||
move.l dstr,a1
|
||||
move.l len,d1 }
|
||||
move.l d0,d1
|
||||
|
||||
move.b (a0)+,d0 { Get source length }
|
||||
@ -255,12 +255,12 @@ procedure move(const source;var dest;count : longint);
|
||||
begin
|
||||
asm
|
||||
clr.l d0
|
||||
move.l 16(a6),d0 { number of bytes }
|
||||
move.l count, d0 { number of bytes }
|
||||
tst.l d0 { anything to copy at all? }
|
||||
beq @LMOVE5
|
||||
@LMOVE0:
|
||||
move.l 12(a6),a1 { destination }
|
||||
move.l 8(a6),a0 { source }
|
||||
move.l dest, a1 { destination }
|
||||
move.l source, a0 { source }
|
||||
|
||||
{$ifndef CPUCOLDFIRE}
|
||||
cmpi.l #65535, d0 { check, if this is a word move }
|
||||
@ -314,9 +314,9 @@ end;
|
||||
procedure fillword(var x;count : longint;value : word);
|
||||
begin
|
||||
asm
|
||||
move.l 8(a6), a0 { destination }
|
||||
move.l 12(a6), d1 { number of bytes to fill }
|
||||
move.w 16(a6),d0 { fill data }
|
||||
move.l x, a0 { destination }
|
||||
move.l count, d1 { number of bytes to fill }
|
||||
move.w value, d0 { fill data }
|
||||
bra @LMEMSET21
|
||||
@LMEMSET11:
|
||||
move.w d0,(a0)+
|
||||
@ -332,7 +332,7 @@ procedure fillword(var x;count : longint;value : word);
|
||||
function abs(l : longint) : longint;
|
||||
begin
|
||||
asm
|
||||
move.l 8(a6),d0
|
||||
move.l l,d0
|
||||
tst.l d0
|
||||
bpl @LMABS1
|
||||
neg.l d0
|
||||
|
Loading…
Reference in New Issue
Block a user