mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 06:19:19 +02:00
* the maybe_push fix of Pierre wasn't 100%, the tree parameter
must contain a valid location (which is saved if necessary)
This commit is contained in:
parent
85f0d28bf1
commit
9f62eb480b
@ -190,13 +190,10 @@ implementation
|
|||||||
begin
|
begin
|
||||||
cmpop:=true;
|
cmpop:=true;
|
||||||
secondpass(p^.left);
|
secondpass(p^.left);
|
||||||
pushed:=maybe_push(p^.right^.registers32,p,false);
|
pushed:=maybe_push(p^.right^.registers32,p^.left,false);
|
||||||
secondpass(p^.right);
|
secondpass(p^.right);
|
||||||
if pushed then
|
if pushed then
|
||||||
begin
|
restore(p^.left,false);
|
||||||
restore(p,false);
|
|
||||||
set_location(p^.left^.location,p^.location);
|
|
||||||
end;
|
|
||||||
{ release used registers }
|
{ release used registers }
|
||||||
del_location(p^.right^.location);
|
del_location(p^.right^.location);
|
||||||
del_location(p^.left^.location);
|
del_location(p^.left^.location);
|
||||||
@ -289,13 +286,10 @@ implementation
|
|||||||
begin
|
begin
|
||||||
secondpass(p^.left);
|
secondpass(p^.left);
|
||||||
{ are too few registers free? }
|
{ are too few registers free? }
|
||||||
pushed:=maybe_push(p^.right^.registers32,p,false);
|
pushed:=maybe_push(p^.right^.registers32,p^.left,false);
|
||||||
secondpass(p^.right);
|
secondpass(p^.right);
|
||||||
if pushed then
|
if pushed then
|
||||||
begin
|
restore(p^.left,false);
|
||||||
restore(p,false);
|
|
||||||
set_location(p^.left^.location,p^.location);
|
|
||||||
end;
|
|
||||||
{ only one node can be stringconstn }
|
{ only one node can be stringconstn }
|
||||||
{ else pass 1 would have evaluted }
|
{ else pass 1 would have evaluted }
|
||||||
{ this node }
|
{ this node }
|
||||||
@ -364,17 +358,12 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ are too few registers free? }
|
{ are too few registers free? }
|
||||||
pushed:=maybe_push(p^.right^.registers32,p,false);
|
pushed:=maybe_push(p^.right^.registers32,p^.left,false);
|
||||||
secondpass(p^.right);
|
secondpass(p^.right);
|
||||||
if codegenerror then
|
if codegenerror then
|
||||||
exit;
|
exit;
|
||||||
if pushed then
|
if pushed then
|
||||||
begin
|
restore(p^.left,false);
|
||||||
restore(p,false);
|
|
||||||
set_location(p^.left^.location,p^.location);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set_location(p^.location,p^.left^.location);
|
set_location(p^.location,p^.left^.location);
|
||||||
|
|
||||||
@ -2142,7 +2131,11 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.80 1999-09-26 13:26:01 florian
|
Revision 1.81 1999-09-28 19:43:45 florian
|
||||||
|
* the maybe_push fix of Pierre wasn't 100%, the tree parameter
|
||||||
|
must contain a valid location (which is saved if necessary)
|
||||||
|
|
||||||
|
Revision 1.80 1999/09/26 13:26:01 florian
|
||||||
* exception patch of Romio nevertheless the excpetion handling
|
* exception patch of Romio nevertheless the excpetion handling
|
||||||
needs some corections regarding register saving
|
needs some corections regarding register saving
|
||||||
* gettempansistring is again a procedure
|
* gettempansistring is again a procedure
|
||||||
|
@ -291,10 +291,10 @@ implementation
|
|||||||
popecx:=false;
|
popecx:=false;
|
||||||
|
|
||||||
secondpass(p^.left);
|
secondpass(p^.left);
|
||||||
pushed:=maybe_push(p^.right^.registers32,p,is_64bitint(p^.left^.resulttype));
|
pushed:=maybe_push(p^.right^.registers32,p^.left,is_64bitint(p^.left^.resulttype));
|
||||||
secondpass(p^.right);
|
secondpass(p^.right);
|
||||||
if pushed then
|
if pushed then
|
||||||
restore(p,is_64bitint(p^.left^.resulttype));
|
restore(p^.left,is_64bitint(p^.left^.resulttype));
|
||||||
|
|
||||||
if is_64bitint(p^.left^.resulttype) then
|
if is_64bitint(p^.left^.resulttype) then
|
||||||
begin
|
begin
|
||||||
@ -940,7 +940,11 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.33 1999-09-27 23:37:26 peter
|
Revision 1.34 1999-09-28 19:43:47 florian
|
||||||
|
* the maybe_push fix of Pierre wasn't 100%, the tree parameter
|
||||||
|
must contain a valid location (which is saved if necessary)
|
||||||
|
|
||||||
|
Revision 1.33 1999/09/27 23:37:26 peter
|
||||||
* fixed push/restore bug in div/mod
|
* fixed push/restore bug in div/mod
|
||||||
|
|
||||||
Revision 1.32 1999/09/02 17:07:38 florian
|
Revision 1.32 1999/09/02 17:07:38 florian
|
||||||
|
@ -102,7 +102,7 @@ unit cgai386;
|
|||||||
procedure push_value_para(p:ptree;inlined:boolean;para_offset:longint;alignment : longint);
|
procedure push_value_para(p:ptree;inlined:boolean;para_offset:longint;alignment : longint);
|
||||||
|
|
||||||
{$ifdef TEMPS_NOT_PUSH}
|
{$ifdef TEMPS_NOT_PUSH}
|
||||||
{ does the same as restore/maybe_push, but uses temp. space instead of pushing }
|
{ does the same as restore/, but uses temp. space instead of pushing }
|
||||||
function maybe_push(needed : byte;p : ptree;isint64 : boolean) : boolean;
|
function maybe_push(needed : byte;p : ptree;isint64 : boolean) : boolean;
|
||||||
procedure restorefromtemp(p : ptree;isint64 : boolean);
|
procedure restorefromtemp(p : ptree;isint64 : boolean);
|
||||||
{$endif TEMPS_NOT_PUSH}
|
{$endif TEMPS_NOT_PUSH}
|
||||||
@ -3359,7 +3359,11 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.47 1999-09-27 23:44:50 peter
|
Revision 1.48 1999-09-28 19:43:47 florian
|
||||||
|
* the maybe_push fix of Pierre wasn't 100%, the tree parameter
|
||||||
|
must contain a valid location (which is saved if necessary)
|
||||||
|
|
||||||
|
Revision 1.47 1999/09/27 23:44:50 peter
|
||||||
* procinfo is now a pointer
|
* procinfo is now a pointer
|
||||||
* support for result setting in sub procedure
|
* support for result setting in sub procedure
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user