From 043bb34e8139f2c0ab18d54cfcb9d4c6c67eec66 Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 13 May 2003 20:13:41 +0000 Subject: [PATCH] * fixed temp. management for CPUs were the temp. space grows upwards --- compiler/tgobj.pas | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/compiler/tgobj.pas b/compiler/tgobj.pas index 99831e8a9e..c5d8cd4c69 100644 --- a/compiler/tgobj.pas +++ b/compiler/tgobj.pas @@ -305,7 +305,13 @@ unit tgobj; { Create new block and link after bestslot } new(tl); tl^.temptype:=temptype; - tl^.pos:=bestslot^.pos+bestslot^.size; + if direction=1 then + begin + tl^.pos:=bestslot^.pos; + inc(bestslot^.pos,size); + end + else + tl^.pos:=bestslot^.pos+bestslot^.size; tl^.size:=size; tl^.nextfree:=nil; { link the new block } @@ -393,6 +399,8 @@ unit tgobj; (hprev^.temptype=tt_free) then begin inc(hprev^.size,hp^.size); + if direction=1 then + hprev^.pos:=hp^.pos; hprev^.next:=hp^.next; dispose(hp); hp:=hprev; @@ -413,6 +421,8 @@ unit tgobj; (hnext^.temptype=tt_free) then begin inc(hp^.size,hnext^.size); + if direction=1 then + hp^.pos:=hnext^.pos; hp^.nextfree:=hnext^.nextfree; hp^.next:=hnext^.next; dispose(hnext); @@ -544,7 +554,10 @@ finalization end. { $Log$ - Revision 1.32 2003-05-12 21:29:59 peter + Revision 1.33 2003-05-13 20:13:41 florian + * fixed temp. management for CPUs were the temp. space grows upwards + + Revision 1.32 2003/05/12 21:29:59 peter * extdebug info temp alloc type was wrong Revision 1.31 2003/04/27 11:21:35 peter