diff --git a/compiler/cg386cal.pas b/compiler/cg386cal.pas index c17dfb72cc..396bf7973a 100644 --- a/compiler/cg386cal.pas +++ b/compiler/cg386cal.pas @@ -610,6 +610,9 @@ implementation if (p^.symtable^.symtabletype<>withsymtable) then begin secondpass(p^.methodpointer); +{$ifndef noAllocEDI} + getexplicitregister32(R_ESI); +{$endif noAllocEDI} case p^.methodpointer^.location.loc of LOC_CREGISTER, LOC_REGISTER: @@ -619,9 +622,6 @@ implementation end; else begin -{$ifndef noAllocEDI} - getexplicitregister32(R_ESI); -{$endif noAllocEDI} if (p^.methodpointer^.resulttype^.deftype=classrefdef) or ((p^.methodpointer^.resulttype^.deftype=objectdef) and pobjectdef(p^.methodpointer^.resulttype)^.is_class) then @@ -642,6 +642,7 @@ implementation not(p^.methodpointer^.resulttype^.deftype=classrefdef) then begin { class method needs current VMT } + getexplicitregister32(R_ESI); new(r); reset_reference(r^); r^.base:=R_ESI; @@ -705,6 +706,7 @@ implementation ) then begin { class method needs current VMT } + getexplicitregister32(R_ESI); new(r); reset_reference(r^); r^.base:=R_ESI; @@ -812,6 +814,7 @@ implementation { also class methods } { Here it is quite tricky because it also depends } { on the methodpointer PM } + getexplicitregister32(R_ESI); if assigned(aktprocsym) then begin if (((sp_static in aktprocsym^.symoptions) or @@ -930,6 +933,7 @@ implementation begin { load ESI } inc(p^.right^.location.reference.offset,4); + getexplicitregister32(R_ESI); emit_ref_reg(A_MOV,S_L, newreference(p^.right^.location.reference),R_ESI); dec(p^.right^.location.reference.offset,4); @@ -1351,7 +1355,10 @@ implementation end. { $Log$ - Revision 1.125 2000-02-09 13:22:45 peter + Revision 1.126 2000-02-09 18:08:33 jonas + * added regallocs for esi + + Revision 1.125 2000/02/09 13:22:45 peter * log truncated Revision 1.124 2000/02/04 20:00:21 florian diff --git a/compiler/cg386ld.pas b/compiler/cg386ld.pas index 7ae9492708..f4c1a32933 100644 --- a/compiler/cg386ld.pas +++ b/compiler/cg386ld.pas @@ -212,6 +212,7 @@ implementation end; objectsymtable: begin + getexplicitregister32(R_ESI); if (sp_static in pvarsym(p^.symtableentry)^.symoptions) then begin p^.location.reference.symbol:=newasmsymbol(p^.symtableentry^.mangledname); @@ -1004,7 +1005,10 @@ implementation end. { $Log$ - Revision 1.99 2000-02-09 13:22:47 peter + Revision 1.100 2000-02-09 18:08:33 jonas + * added regallocs for esi + + Revision 1.99 2000/02/09 13:22:47 peter * log truncated Revision 1.98 2000/02/01 12:54:20 peter diff --git a/compiler/cg386mem.pas b/compiler/cg386mem.pas index 44a6c4418e..ae851498e1 100644 --- a/compiler/cg386mem.pas +++ b/compiler/cg386mem.pas @@ -791,6 +791,7 @@ implementation procedure secondselfn(var p : ptree); begin reset_reference(p^.location.reference); + getexplicitregister32(R_ESI); if (p^.resulttype^.deftype=classrefdef) or ((p^.resulttype^.deftype=objectdef) and pobjectdef(p^.resulttype)^.is_class @@ -891,7 +892,10 @@ implementation end. { $Log$ - Revision 1.70 2000-02-09 13:22:47 peter + Revision 1.71 2000-02-09 18:08:33 jonas + * added regallocs for esi + + Revision 1.70 2000/02/09 13:22:47 peter * log truncated Revision 1.69 2000/01/09 15:19:23 peter