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