From dac2986b7fc7278b85a8e4c3b45ec36602967a10 Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 14 Oct 1998 10:45:05 +0000 Subject: [PATCH] * ppu problems for m68k fixed (at least in cross compiling) * one last memory leak for sysamiga fixed * the amiga RTL compiles now completely !! --- compiler/cg68kcnv.pas | 9 ++++++++- compiler/files.pas | 8 +++++++- compiler/ppu.pas | 15 ++++++++++++--- compiler/symppu.inc | 9 +++++++-- 4 files changed, 34 insertions(+), 7 deletions(-) diff --git a/compiler/cg68kcnv.pas b/compiler/cg68kcnv.pas index eb5d431363..e173e56a70 100644 --- a/compiler/cg68kcnv.pas +++ b/compiler/cg68kcnv.pas @@ -740,6 +740,7 @@ implementation + if porddef(p^.left^.resulttype)^.typ=u32bit then + exprasmlist^.concat(new(pai386,op_ref(A_FILD,S_IQ,r))) + else} + clear_location(p^.location); p^.location.loc := LOC_FPU; { get floating point register. } if (cs_fp_emulation in aktmoduleswitches) then @@ -812,6 +813,7 @@ implementation case p^.left^.location.loc of LOC_FPU : begin { reload } + clear_location(p^.location); p^.location.loc := LOC_FPU; p^.location.fpureg := p^.left^.location.fpureg; end; @@ -1394,7 +1396,12 @@ implementation end. { $Log$ - Revision 1.7 1998-10-13 16:50:06 pierre + Revision 1.8 1998-10-14 10:45:05 pierre + * ppu problems for m68k fixed (at least in cross compiling) + * one last memory leak for sysamiga fixed + * the amiga RTL compiles now completely !! + + Revision 1.7 1998/10/13 16:50:06 pierre * undid some changes of Peter that made the compiler wrong for m68k (I had to reinsert some ifdefs) * removed several memory leaks under m68k diff --git a/compiler/files.pas b/compiler/files.pas index 1da9131053..60fc49839e 100644 --- a/compiler/files.pas +++ b/compiler/files.pas @@ -631,6 +631,7 @@ unit files; { Open the ppufile } Message1(unit_u_ppu_name,ppufilename^); ppufile:=new(pppufile,init(ppufilename^)); + ppufile^.change_endian:=source_os.endian<>target_os.endian; if not ppufile^.open then begin dispose(ppufile,done); @@ -1007,7 +1008,12 @@ unit files; end. { $Log$ - Revision 1.59 1998-10-13 14:01:07 peter + Revision 1.60 1998-10-14 10:45:07 pierre + * ppu problems for m68k fixed (at least in cross compiling) + * one last memory leak for sysamiga fixed + * the amiga RTL compiles now completely !! + + Revision 1.59 1998/10/13 14:01:07 peter * fixed -al Revision 1.58 1998/10/12 11:59:00 peter diff --git a/compiler/ppu.pas b/compiler/ppu.pas index 5735b0062e..28b95ec99b 100644 --- a/compiler/ppu.pas +++ b/compiler/ppu.pas @@ -544,7 +544,9 @@ begin end; readdata(l,4); if change_endian then - getlongint:=swap(l shr 16) or (longint(swap(l and $ffff)) shl 16) + { someone added swap(l : longint) in system unit + this broke the following code !! } + getlongint:=swap(word(l shr 16)) or (longint(swap(word(l and $ffff))) shl 16) else getlongint:=l; inc(entryidx,4); @@ -752,7 +754,9 @@ end; procedure tppufile.putlongint(l:longint); begin if change_endian then - l:=swap(l shr 16) or (longint(swap(l and $ffff)) shl 16); + { someone added swap(l : longint) in system unit + this broke the following code !! } + l:=swap(word(l shr 16)) or (longint(swap(word(l and $ffff))) shl 16); putdata(l,4); end; @@ -772,7 +776,12 @@ end; end. { $Log$ - Revision 1.16 1998-09-24 23:49:14 peter + Revision 1.17 1998-10-14 10:45:08 pierre + * ppu problems for m68k fixed (at least in cross compiling) + * one last memory leak for sysamiga fixed + * the amiga RTL compiles now completely !! + + Revision 1.16 1998/09/24 23:49:14 peter + aktmodeswitches Revision 1.15 1998/09/23 15:39:10 pierre diff --git a/compiler/symppu.inc b/compiler/symppu.inc index 6a3ce29cff..d54aea92a3 100644 --- a/compiler/symppu.inc +++ b/compiler/symppu.inc @@ -203,10 +203,10 @@ { open ppufile } current_ppu:=new(pppufile,init(s)); - current_ppu^.change_endian:=source_os.endian<>target_os.endian; if not current_ppu^.create then Message(unit_f_ppu_cannot_write); + current_ppu^.change_endian:=source_os.endian<>target_os.endian; { write symbols and definitions } unittable^.writeasunit; @@ -443,7 +443,12 @@ { $Log$ - Revision 1.20 1998-10-13 13:10:30 peter + Revision 1.21 1998-10-14 10:45:10 pierre + * ppu problems for m68k fixed (at least in cross compiling) + * one last memory leak for sysamiga fixed + * the amiga RTL compiles now completely !! + + Revision 1.20 1998/10/13 13:10:30 peter * new style for m68k/i386 infos and enums Revision 1.19 1998/10/08 23:29:07 peter