m68k: try to restore compilability with a 3.0 compiler

git-svn-id: trunk@37026 -
This commit is contained in:
Károly Balogh 2017-08-22 09:05:20 +00:00
parent a1a14eaaa8
commit f4a8a29aea
2 changed files with 22 additions and 0 deletions

View File

@ -131,6 +131,12 @@ end;
{$define FPC_SYSTEM_HAS_FILLCHAR}
procedure FillChar(var x; count : longint; value : byte); assembler; register; nostackframe;
asm
{$ifdef VER3_0}
move.l x,a0
move.l count,d0
clr.l d1
move.b value,d1
{$endif VER3_0}
{ a0 is x, d0 is count, d1 is value }
tst.l d0 { anything to fill at all? }
ble @Lquit

View File

@ -26,11 +26,19 @@ asm
{$endif}
// Save nonvolatile registers
{$ifdef ver3_0}
{$if defined(amiga)}
movem.l d2/d3/d4/d5/d6/d7/a2/a3/a4/a6,12(a0) { amiga uses a5 as fp }
{$else}
movem.l d2/d3/d4/d5/d6/d7/a2/a3/a4/a5,12(a0)
{$endif}
{$else}
{$if defined(amiga)}
movem.l d2-d7/a2-a4/a6,12(a0) { amiga uses a5 as fp }
{$else}
movem.l d2-d7/a2-a5,12(a0)
{$endif}
{$endif}
{$if defined(fpu68881)}
fmovem.x fp2-fp7,52(a0)
@ -82,11 +90,19 @@ asm
move.l 8(a0),-(sp)
// Restore registers
{$ifdef ver3_0}
{$if defined(amiga)}
movem.l 12(a0),d2/d3/d4/d5/d6/d7/a2/a3/a4/a6 { amiga uses a5 as fp }
{$else}
movem.l 12(a0),d2/d3/d4/d5/d6/d7/a2/a3/a4/a5
{$endif}
{$else}
{$if defined(amiga)}
movem.l 12(a0),d2-d7/a2-a4/a6 { amiga uses a5 as fp }
{$else}
movem.l 12(a0),d2-d7/a2-a5
{$endif}
{$endif}
{$if defined(fpu68881)}
fmovem.x 52(a0),fp2-fp7