mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-31 17:26:16 +02:00
* bug #580 fixed
This commit is contained in:
parent
d2c3613518
commit
96dd7c82fa
@ -57,6 +57,21 @@ implementation
|
||||
hp1 : pai;
|
||||
lastlabel : pasmlabel;
|
||||
realait : tait;
|
||||
|
||||
begin
|
||||
if (p^.value_real=1.0) then
|
||||
begin
|
||||
emit_none(A_FLD1,S_NO);
|
||||
p^.location.loc:=LOC_FPU;
|
||||
inc(fpuvaroffset);
|
||||
end
|
||||
else if (p^.value_real=0.0) then
|
||||
begin
|
||||
emit_none(A_FLDZ,S_NO);
|
||||
p^.location.loc:=LOC_FPU;
|
||||
inc(fpuvaroffset);
|
||||
end
|
||||
else
|
||||
begin
|
||||
lastlabel:=nil;
|
||||
realait:=floattype2ait[pfloatdef(p^.resulttype)^.typ];
|
||||
@ -115,6 +130,7 @@ implementation
|
||||
p^.location.reference.symbol:=p^.lab_real;
|
||||
p^.location.loc:=LOC_MEM;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{*****************************************************************************
|
||||
@ -401,7 +417,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.39 1999-08-04 00:22:45 florian
|
||||
Revision 1.40 1999-09-04 20:53:06 florian
|
||||
* bug 580 fixed
|
||||
|
||||
Revision 1.39 1999/08/04 00:22:45 florian
|
||||
* renamed i386asm and i386base to cpuasm and cpubase
|
||||
|
||||
Revision 1.38 1999/08/03 22:02:38 peter
|
||||
|
@ -696,10 +696,22 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
|
||||
reset_reference(p^.location.reference);
|
||||
gettempofsizereference(10,p^.location.reference);
|
||||
floatstore(pfloatdef(p^.resulttype)^.typ,p^.location.reference);
|
||||
p^.location.loc:=LOC_REFERENCE;
|
||||
{ This can't be never a l-value! (FK)
|
||||
p^.location.loc:=LOC_REFERENCE; }
|
||||
p^.location.loc:=LOC_MEM;
|
||||
end;
|
||||
LOC_MEM,
|
||||
LOC_REFERENCE : ;
|
||||
LOC_CFPUREGISTER : begin
|
||||
emit_reg(A_FLD,S_NO,correct_fpuregister(p^.location.register,fpuvaroffset));
|
||||
inc(fpuvaroffset);
|
||||
reset_reference(p^.location.reference);
|
||||
gettempofsizereference(10,p^.location.reference);
|
||||
floatstore(pfloatdef(p^.resulttype)^.typ,p^.location.reference);
|
||||
{ This can't be never a l-value! (FK)
|
||||
p^.location.loc:=LOC_REFERENCE; }
|
||||
p^.location.loc:=LOC_MEM;
|
||||
end;
|
||||
else
|
||||
internalerror(333);
|
||||
end;
|
||||
@ -3294,7 +3306,10 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.37 1999-09-02 17:07:38 florian
|
||||
Revision 1.38 1999-09-04 20:50:08 florian
|
||||
* bug 580 fixed
|
||||
|
||||
Revision 1.37 1999/09/02 17:07:38 florian
|
||||
* problems with -Or fixed: tdef.isfpuregable was wrong!
|
||||
|
||||
Revision 1.36 1999/09/01 09:26:23 peter
|
||||
|
@ -47,6 +47,12 @@ implementation
|
||||
|
||||
procedure firstrealconst(var p : ptree);
|
||||
begin
|
||||
if (p^.value_real=1.0) or (p^.value_real=0.0) then
|
||||
begin
|
||||
p^.location.loc:=LOC_FPU;
|
||||
p^.registersfpu:=1;
|
||||
end
|
||||
else
|
||||
p^.location.loc:=LOC_MEM;
|
||||
end;
|
||||
|
||||
@ -119,7 +125,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.8 1999-08-04 00:23:38 florian
|
||||
Revision 1.9 1999-09-04 20:52:07 florian
|
||||
* bug 580 fixed
|
||||
|
||||
Revision 1.8 1999/08/04 00:23:38 florian
|
||||
* renamed i386asm and i386base to cpuasm and cpubase
|
||||
|
||||
Revision 1.7 1999/08/03 22:03:29 peter
|
||||
|
Loading…
Reference in New Issue
Block a user