mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-08 05:07:30 +01:00
m68k: try to restore compilability with a 3.0 compiler
git-svn-id: trunk@37026 -
This commit is contained in:
parent
a1a14eaaa8
commit
f4a8a29aea
@ -131,6 +131,12 @@ end;
|
|||||||
{$define FPC_SYSTEM_HAS_FILLCHAR}
|
{$define FPC_SYSTEM_HAS_FILLCHAR}
|
||||||
procedure FillChar(var x; count : longint; value : byte); assembler; register; nostackframe;
|
procedure FillChar(var x; count : longint; value : byte); assembler; register; nostackframe;
|
||||||
asm
|
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 }
|
{ a0 is x, d0 is count, d1 is value }
|
||||||
tst.l d0 { anything to fill at all? }
|
tst.l d0 { anything to fill at all? }
|
||||||
ble @Lquit
|
ble @Lquit
|
||||||
|
|||||||
@ -26,11 +26,19 @@ asm
|
|||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
// Save nonvolatile registers
|
// 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)}
|
{$if defined(amiga)}
|
||||||
movem.l d2-d7/a2-a4/a6,12(a0) { amiga uses a5 as fp }
|
movem.l d2-d7/a2-a4/a6,12(a0) { amiga uses a5 as fp }
|
||||||
{$else}
|
{$else}
|
||||||
movem.l d2-d7/a2-a5,12(a0)
|
movem.l d2-d7/a2-a5,12(a0)
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{$endif}
|
||||||
|
|
||||||
{$if defined(fpu68881)}
|
{$if defined(fpu68881)}
|
||||||
fmovem.x fp2-fp7,52(a0)
|
fmovem.x fp2-fp7,52(a0)
|
||||||
@ -82,11 +90,19 @@ asm
|
|||||||
move.l 8(a0),-(sp)
|
move.l 8(a0),-(sp)
|
||||||
|
|
||||||
// Restore registers
|
// 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)}
|
{$if defined(amiga)}
|
||||||
movem.l 12(a0),d2-d7/a2-a4/a6 { amiga uses a5 as fp }
|
movem.l 12(a0),d2-d7/a2-a4/a6 { amiga uses a5 as fp }
|
||||||
{$else}
|
{$else}
|
||||||
movem.l 12(a0),d2-d7/a2-a5
|
movem.l 12(a0),d2-d7/a2-a5
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{$endif}
|
||||||
|
|
||||||
{$if defined(fpu68881)}
|
{$if defined(fpu68881)}
|
||||||
fmovem.x 52(a0),fp2-fp7
|
fmovem.x 52(a0),fp2-fp7
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user