diff --git a/compiler/psub.pas b/compiler/psub.pas index 19f4a375d2..c0381e6b06 100644 --- a/compiler/psub.pas +++ b/compiler/psub.pas @@ -584,6 +584,7 @@ implementation usesfpu, usesacchi : boolean; spillingcounter : integer; + fastspill:boolean; begin { the initialization procedure can be empty, then we don't need to generate anything. When it was an empty @@ -692,14 +693,15 @@ implementation rg.prepare_colouring; rg.colour_registers; rg.epilogue_colouring; + fastspill:=true; if rg.spillednodes<>'' then begin inc(spillingcounter); if spillingcounter>maxspillingcounter then internalerror(200309041); - rg.spill_registers(aktproccode,rg.spillednodes); + fastspill:=rg.spill_registers(aktproccode,rg.spillednodes); end; - until rg.spillednodes=''; + until (rg.spillednodes=''){ or not fastspill}; aktproccode.translate_registers(rg.colour); (* {$ifndef NoOpt} @@ -1315,7 +1317,10 @@ begin end. { $Log$ - Revision 1.144 2003-09-09 20:59:27 daniel + Revision 1.145 2003-09-10 19:14:31 daniel + * Failed attempt to restore broken fastspill functionality + + Revision 1.144 2003/09/09 20:59:27 daniel * Adding register allocation order Revision 1.143 2003/09/09 15:55:44 peter diff --git a/compiler/x86/aasmcpu.pas b/compiler/x86/aasmcpu.pas index f841317b98..6c1886877e 100644 --- a/compiler/x86/aasmcpu.pas +++ b/compiler/x86/aasmcpu.pas @@ -2160,6 +2160,7 @@ implementation imul r22d,r21d ; Replace reference by helpregister mov [ebp-12],r22d ; Use another help instruction} rgget(list,Tai(previous),subreg,helpreg); + spill_registers:=true; {First help instruction.} helpins:=Taicpu.op_ref_reg(A_MOV,opsize,oper[1].ref^,helpreg); if previous=nil then @@ -2233,7 +2234,10 @@ implementation end. { $Log$ - Revision 1.20 2003-09-10 11:23:09 marco + Revision 1.21 2003-09-10 19:14:31 daniel + * Failed attempt to restore broken fastspill functionality + + Revision 1.20 2003/09/10 11:23:09 marco * fix from peter for bts reg32,mem32 problem Revision 1.19 2003/09/09 12:54:45 florian