mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 16:09:31 +02:00
Fix around 30 tests for m68k by fixing FillChar:
* completely disable the DBRA part for CPUs without DBRA * replace CMP/BNE with BPL which uses the flags of the SUB instruction Additional fixes for the other two (still disabled) DBRA alternatives: * use BPL instead of BMI (which is wrong) git-svn-id: trunk@25587 -
This commit is contained in:
parent
dfb0c7da24
commit
83f4344c20
@ -94,24 +94,22 @@ procedure FillChar(var x;count:longint;value:byte); assembler;
|
||||
move.b value, d0 { fill data }
|
||||
tst.l d1 { anything to fill at all? }
|
||||
beq @LMEMSET5
|
||||
{$ifdef CPUM68K_HAS_DBRA}
|
||||
cmpi.l #65535, d1 { check, if this is a word move }
|
||||
ble @LMEMSET3 { use fast dbra mode }
|
||||
{$endif CPUM68K_HAS_DBRA}
|
||||
bra @LMEMSET2
|
||||
@LMEMSET1:
|
||||
move.b d0,(a0)+
|
||||
@LMEMSET2:
|
||||
subq.l #1,d1
|
||||
cmp.l #-1,d1
|
||||
bne @LMEMSET1
|
||||
bpl @LMEMSET1
|
||||
bra @LMEMSET5 { finished slow mode , exit }
|
||||
|
||||
{$ifdef CPUM68K_HAS_DBRA}
|
||||
@LMEMSET4: { fast loop mode section 68010+ }
|
||||
move.b d0,(a0)+
|
||||
@LMEMSET3:
|
||||
{$ifndef CPUM68K_HAS_DBRA}
|
||||
sub.l #1,d1
|
||||
bmi @LMEMSET4
|
||||
{$else CPUM68K_HAS_DBRA}
|
||||
dbra d1,@LMEMSET4
|
||||
{$endif CPUM68K_HAS_DBRA}
|
||||
|
||||
@ -157,7 +155,7 @@ asm
|
||||
@LMSTRCOPY55:
|
||||
{$ifndef CPUM68K_HAS_DBRA}
|
||||
sub.l #1,d1
|
||||
bmi @LMSTRCOPY56
|
||||
bpl @LMSTRCOPY56
|
||||
{$else CPUM68K_HAS_DBRA}
|
||||
dbra d1,@LMSTRCOPY56
|
||||
{$endif CPUM68K_HAS_DBRA}
|
||||
@ -197,7 +195,7 @@ procedure strconcat(s1,s2 : pointer);[public,alias: 'STRCONCAT'];
|
||||
@ALoop:
|
||||
{$ifndef CPUM68K_HAS_DBRA}
|
||||
sub.l #1,d6
|
||||
bmi @Loop
|
||||
bpl @Loop
|
||||
{$else CPUM68K_HAS_DBRA}
|
||||
dbra d6,@Loop
|
||||
{$endif CPUM68K_HAS_DBRA}
|
||||
|
Loading…
Reference in New Issue
Block a user