mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 09:06:02 +02:00
* fixed fpuregister counting errors ("merged")
This commit is contained in:
parent
721c73276e
commit
92977ca6ee
@ -647,6 +647,8 @@ implementation
|
|||||||
|
|
||||||
if (left.resulttype.def.deftype=floatdef) then
|
if (left.resulttype.def.deftype=floatdef) then
|
||||||
begin
|
begin
|
||||||
|
if (registersfpu < 1) then
|
||||||
|
registersfpu := 1;
|
||||||
location.loc:=LOC_FPU;
|
location.loc:=LOC_FPU;
|
||||||
end
|
end
|
||||||
{$ifdef SUPPORT_MMX}
|
{$ifdef SUPPORT_MMX}
|
||||||
@ -1018,7 +1020,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* fixed web bug 1716
|
||||||
|
|
||||||
Revision 1.18 2001/12/04 15:57:28 jonas
|
Revision 1.18 2001/12/04 15:57:28 jonas
|
||||||
|
@ -1351,6 +1351,15 @@ implementation
|
|||||||
calcregisters(self,1,1,0)
|
calcregisters(self,1,1,0)
|
||||||
else
|
else
|
||||||
calcregisters(self,0,1,0);
|
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
|
end
|
||||||
|
|
||||||
{ if both are orddefs then check sub types }
|
{ if both are orddefs then check sub types }
|
||||||
@ -1509,6 +1518,15 @@ implementation
|
|||||||
begin
|
begin
|
||||||
location.loc:=LOC_FPU;
|
location.loc:=LOC_FPU;
|
||||||
calcregisters(self,0,1,0);
|
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
|
end
|
||||||
|
|
||||||
{ pointer comperation and subtraction }
|
{ pointer comperation and subtraction }
|
||||||
@ -1590,7 +1608,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* interface 2 guid support
|
||||||
* guid constants support
|
* guid constants support
|
||||||
|
|
||||||
|
@ -443,8 +443,8 @@ implementation
|
|||||||
if (left.resulttype.def.deftype=floatdef) then
|
if (left.resulttype.def.deftype=floatdef) then
|
||||||
begin
|
begin
|
||||||
if (left.location.loc<>LOC_REGISTER) and
|
if (left.location.loc<>LOC_REGISTER) and
|
||||||
(registers32<1) then
|
(registersfpu<1) then
|
||||||
registers32:=1;
|
registersfpu:=1;
|
||||||
location.loc:=LOC_REGISTER;
|
location.loc:=LOC_REGISTER;
|
||||||
end
|
end
|
||||||
{$ifdef SUPPORT_MMX}
|
{$ifdef SUPPORT_MMX}
|
||||||
@ -640,7 +640,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* procsym definition rewrite
|
||||||
|
|
||||||
Revision 1.24 2001/10/12 13:51:51 jonas
|
Revision 1.24 2001/10/12 13:51:51 jonas
|
||||||
|
Loading…
Reference in New Issue
Block a user