* fixed fpuregister counting errors ("merged")

This commit is contained in:
Jonas Maebe 2001-12-27 15:33:58 +00:00
parent 721c73276e
commit 92977ca6ee
3 changed files with 34 additions and 5 deletions

View File

@ -647,6 +647,8 @@ implementation
if (left.resulttype.def.deftype=floatdef) then
begin
if (registersfpu < 1) then
registersfpu := 1;
location.loc:=LOC_FPU;
end
{$ifdef SUPPORT_MMX}
@ -1018,7 +1020,10 @@ begin
end.
{
$Log$
Revision 1.19 2001-12-07 13:03:49 jonas
Revision 1.20 2001-12-27 15:33:58 jonas
* fixed fpuregister counting errors ("merged")
Revision 1.19 2001/12/07 13:03:49 jonas
* fixed web bug 1716
Revision 1.18 2001/12/04 15:57:28 jonas

View File

@ -1351,6 +1351,15 @@ implementation
calcregisters(self,1,1,0)
else
calcregisters(self,0,1,0);
{ an add node always first loads both the left and the }
{ right in the fpu before doing the calculation. However, }
{ calcregisters(0,2,0) will overestimate the number of }
{ necessary registers (it will make it 3 in case one of }
{ the operands is already in the fpu) (JM) }
if ((left.location.loc <> LOC_FPU) or
(right.location.loc <> LOC_FPU)) and
(registersfpu < 2) then
inc(registersfpu);
end
{ if both are orddefs then check sub types }
@ -1509,6 +1518,15 @@ implementation
begin
location.loc:=LOC_FPU;
calcregisters(self,0,1,0);
{ an add node always first loads both the left and the }
{ right in the fpu before doing the calculation. However, }
{ calcregisters(0,2,0) will overestimate the number of }
{ necessary registers (it will make it 3 in case one of }
{ the operands is already in the fpu) (JM) }
if ((left.location.loc <> LOC_FPU) or
(right.location.loc <> LOC_FPU)) and
(registersfpu < 2) then
inc(registersfpu);
end
{ pointer comperation and subtraction }
@ -1590,7 +1608,10 @@ begin
end.
{
$Log$
Revision 1.41 2001-10-20 19:28:37 peter
Revision 1.42 2001-12-27 15:33:58 jonas
* fixed fpuregister counting errors ("merged")
Revision 1.41 2001/10/20 19:28:37 peter
* interface 2 guid support
* guid constants support

View File

@ -443,8 +443,8 @@ implementation
if (left.resulttype.def.deftype=floatdef) then
begin
if (left.location.loc<>LOC_REGISTER) and
(registers32<1) then
registers32:=1;
(registersfpu<1) then
registersfpu:=1;
location.loc:=LOC_REGISTER;
end
{$ifdef SUPPORT_MMX}
@ -640,7 +640,10 @@ begin
end.
{
$Log$
Revision 1.25 2001-11-02 22:58:02 peter
Revision 1.26 2001-12-27 15:33:58 jonas
* fixed fpuregister counting errors ("merged")
Revision 1.25 2001/11/02 22:58:02 peter
* procsym definition rewrite
Revision 1.24 2001/10/12 13:51:51 jonas