mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 18:06:12 +02:00
* bug of type conversation from dword to real fixed
* bug fix of Jonas applied
This commit is contained in:
parent
66f6852b96
commit
eb42a79164
@ -649,6 +649,10 @@ implementation
|
||||
r : preference;
|
||||
|
||||
begin
|
||||
{ for u32bit a solution is to push $0 and to load a comp }
|
||||
{ does this first, it destroys maybe EDI }
|
||||
if porddef(p^.left^.resulttype)^.typ=u32bit then
|
||||
push_int(0);
|
||||
if (p^.left^.location.loc=LOC_REGISTER) or
|
||||
(p^.left^.location.loc=LOC_CREGISTER) then
|
||||
begin
|
||||
@ -658,7 +662,6 @@ implementation
|
||||
s16bit : exprasmlist^.concat(new(pai386,op_reg_reg(A_MOVSX,S_WL,p^.left^.location.register,R_EDI)));
|
||||
u16bit : exprasmlist^.concat(new(pai386,op_reg_reg(A_MOVZX,S_WL,p^.left^.location.register,R_EDI)));
|
||||
u32bit,s32bit : exprasmlist^.concat(new(pai386,op_reg_reg(A_MOV,S_L,p^.left^.location.register,R_EDI)));
|
||||
{!!!! u32bit }
|
||||
end;
|
||||
ungetregister(p^.left^.location.register);
|
||||
end
|
||||
@ -671,17 +674,12 @@ implementation
|
||||
s16bit : exprasmlist^.concat(new(pai386,op_ref_reg(A_MOVSX,S_WL,r,R_EDI)));
|
||||
u16bit : exprasmlist^.concat(new(pai386,op_ref_reg(A_MOVZX,S_WL,r,R_EDI)));
|
||||
u32bit,s32bit : exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_L,r,R_EDI)));
|
||||
{!!!! u32bit }
|
||||
end;
|
||||
del_reference(p^.left^.location.reference);
|
||||
ungetiftemp(p^.left^.location.reference);
|
||||
end;
|
||||
if porddef(p^.left^.resulttype)^.typ=u32bit then
|
||||
push_int(0);
|
||||
exprasmlist^.concat(new(pai386,op_reg(A_PUSH,S_L,R_EDI)));
|
||||
r:=new_reference(R_ESP,0);
|
||||
{ for u32bit a solution is to push $0 and to load a
|
||||
comp }
|
||||
if porddef(p^.left^.resulttype)^.typ=u32bit then
|
||||
exprasmlist^.concat(new(pai386,op_ref(A_FILD,S_IQ,r)))
|
||||
else
|
||||
@ -1251,7 +1249,11 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.14 1998-08-28 12:51:39 florian
|
||||
Revision 1.15 1998-09-03 16:24:50 florian
|
||||
* bug of type conversation from dword to real fixed
|
||||
* bug fix of Jonas applied
|
||||
|
||||
Revision 1.14 1998/08/28 12:51:39 florian
|
||||
+ ansistring to pchar type cast fixed
|
||||
|
||||
Revision 1.13 1998/08/28 10:56:56 peter
|
||||
|
@ -21,6 +21,11 @@
|
||||
|
||||
****************************************************************************
|
||||
}
|
||||
|
||||
{$ifDef TP}
|
||||
{$UnDef JumpAnal}
|
||||
{$Endif TP}
|
||||
|
||||
Unit DAOpt386;
|
||||
|
||||
Interface
|
||||
@ -1018,17 +1023,17 @@ Begin
|
||||
;
|
||||
If (p <> First)
|
||||
Then
|
||||
{$ifndef TP}
|
||||
{$ifdef JumpAnal}
|
||||
Begin
|
||||
If (p^.Typ <> ait_label) Then
|
||||
{$endif TP}
|
||||
{$endif JumpAnal}
|
||||
Begin
|
||||
CurProp^.Regs := PPaiProp(Pai(p^.previous)^.fileinfo.line)^.Regs;
|
||||
CurProp^.DirFlag := PPaiProp(Pai(p^.previous)^.fileinfo.line)^.DirFlag
|
||||
End
|
||||
{$ifndef TP}
|
||||
{$ifdef JumpAnal}
|
||||
End
|
||||
{$endif TP}
|
||||
{$endif JumpAnal}
|
||||
Else
|
||||
Begin
|
||||
FillChar(CurProp^, SizeOf(CurProp^), 0);
|
||||
@ -1036,17 +1041,17 @@ Begin
|
||||
CurProp^.Regs[TmpReg].State := 1;}
|
||||
End;
|
||||
CurProp^.CanBeRemoved := False;
|
||||
{$IfDef TP}
|
||||
{$ifdef TP}
|
||||
CurProp^.linesave := p^.fileinfo.line;
|
||||
PPaiProp(p^.fileinfo.line) := CurProp;
|
||||
{$EndIf}
|
||||
{$Endif TP}
|
||||
For TmpReg := R_EAX To R_EDI Do
|
||||
Inc(NrOfInstrSinceLastMod[TmpReg]);
|
||||
Case p^.typ Of
|
||||
ait_label:
|
||||
{$Ifdef TP}
|
||||
{$Ifndef JumpAnal}
|
||||
DestroyAllRegs(CurProp);
|
||||
{$Else TP}
|
||||
{$Else JumpAnal}
|
||||
Begin
|
||||
With LTable^[Pai_Label(p)^.l^.nb-LoLab] Do
|
||||
{$IfDef AnalyzeLoops}
|
||||
@ -1059,7 +1064,7 @@ Begin
|
||||
{$IfDef AnalyzeLoops}
|
||||
If (JmpsProcessed > 0)
|
||||
Then
|
||||
{$EndIf}
|
||||
{$EndIf AnalyzeLoops}
|
||||
{we've processed at least one jump to this label}
|
||||
Begin
|
||||
If Not(GetLastInstruction(p, hp) And
|
||||
@ -1129,11 +1134,11 @@ Begin
|
||||
DestroyAllRegs(CurProp)
|
||||
End;
|
||||
End;
|
||||
{$EndIf TP}
|
||||
{$EndIf JumpAnal}
|
||||
ait_labeled_instruction:
|
||||
{$IfDef TP}
|
||||
{$IfNDef JumpAnal}
|
||||
;
|
||||
{$Else TP}
|
||||
{$Else JumpAnal}
|
||||
With LTable^[Pai_Labeled(p)^.lab^.nb-LoLab] Do
|
||||
If (RefsFound = Pai_Labeled(p)^.lab^.RefCount) Then
|
||||
Begin
|
||||
@ -1215,7 +1220,7 @@ Begin
|
||||
End}
|
||||
{$endif AnalyzeLoops}
|
||||
End;
|
||||
{$EndIf TP}
|
||||
{$EndIf JumpAnal}
|
||||
{$ifdef GDB}
|
||||
ait_stabs, ait_stabn, ait_stab_function_name:;
|
||||
{$endif GDB}
|
||||
@ -1448,7 +1453,11 @@ End.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.8 1998-08-28 10:56:59 peter
|
||||
Revision 1.9 1998-09-03 16:24:51 florian
|
||||
* bug of type conversation from dword to real fixed
|
||||
* bug fix of Jonas applied
|
||||
|
||||
Revision 1.8 1998/08/28 10:56:59 peter
|
||||
* removed warnings
|
||||
|
||||
Revision 1.7 1998/08/19 16:07:44 jonas
|
||||
|
Loading…
Reference in New Issue
Block a user