浏览代码

* Removed obsolete OLDREGVARS ifdefs.

Yuriy Sydorov 3 年之前
父节点
当前提交
b78761efd3

+ 0 - 12
compiler/hlcgobj.pas

@@ -4770,10 +4770,6 @@ implementation
       { initialises temp. ansi/wide string data }
       if (current_procinfo.procdef.proctypeoption<>potype_exceptfilter) then
         inittempvariables(list);
-
-{$ifdef OLDREGVARS}
-      load_regvars(list,nil);
-{$endif OLDREGVARS}
     end;
 
   procedure thlcgobj.gen_finalize_code(list: TAsmList);
@@ -4788,10 +4784,6 @@ implementation
           current_procinfo:=current_procinfo.parent;
         end;
 
-{$ifdef OLDREGVARS}
-      cleanup_regvars(list);
-{$endif OLDREGVARS}
-
       { finalize paras data }
       if assigned(current_procinfo.procdef.parast) and
          not(po_assembler in current_procinfo.procdef.procoptions) then
@@ -4862,10 +4854,6 @@ implementation
        end;
 
       list.concat(Tai_force_line.Create);
-
-{$ifdef OLDREGVARS}
-      load_regvars(list,nil);
-{$endif OLDREGVARS}
     end;
 
   procedure thlcgobj.gen_exit_code(list: TAsmList);

+ 0 - 3
compiler/i386/n386add.pas

@@ -244,9 +244,6 @@ interface
            oldnodetype : tnodetype;
 
         begin
-{$ifdef OLDREGVARS}
-           load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
            { the jump the sequence is a little bit hairy }
            case nodetype of
               ltn,gtn:

+ 0 - 9
compiler/i8086/n8086add.pas

@@ -548,9 +548,6 @@ interface
            oldnodetype : tnodetype;
 
         begin
-{$ifdef OLDREGVARS}
-           load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
            { the jump the sequence is a little bit hairy }
            case nodetype of
               ltn,gtn:
@@ -592,9 +589,6 @@ interface
            oldnodetype : tnodetype;
 
         begin
-{$ifdef OLDREGVARS}
-           load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
            { the jump the sequence is a little bit hairy }
            case nodetype of
               ltn,gtn:
@@ -775,9 +769,6 @@ interface
            oldnodetype : tnodetype;
 
         begin
-{$ifdef OLDREGVARS}
-           load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
            { the jump the sequence is a little bit hairy }
            case nodetype of
               ltn,gtn:

+ 0 - 19
compiler/ncgflw.pas

@@ -177,9 +177,6 @@ implementation
          exclude(flowcontrol,fc_unwind_loop);
 
          sync_regvars(true);
-{$ifdef OLDREGVARS}
-         load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
          { handling code at the end as it is much more efficient, and makes
            while equal to repeat loop, only the end true/false is swapped (PFV) }
          if lnf_testatbegin in loopflags then
@@ -198,10 +195,6 @@ implementation
          if assigned(right) then
            secondpass(right);
 
-{$ifdef OLDREGVARS}
-         load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
-
          hlcg.a_label(current_asmdata.CurrAsmList,lcont);
          if lnf_checknegate in loopflags then
           begin
@@ -435,9 +428,6 @@ implementation
          include(flowcontrol,fc_break);
          if current_procinfo.CurrBreakLabel<>nil then
            begin
-{$ifdef OLDREGVARS}
-             load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
              if (fc_unwind_loop in flowcontrol) then
                hlcg.g_local_unwind(current_asmdata.CurrAsmList,current_procinfo.CurrBreakLabel)
              else
@@ -461,9 +451,6 @@ implementation
          include(flowcontrol,fc_continue);
          if current_procinfo.CurrContinueLabel<>nil then
            begin
-{$ifdef OLDREGVARS}
-             load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
              if (fc_unwind_loop in flowcontrol) then
                hlcg.g_local_unwind(current_asmdata.CurrAsmList,current_procinfo.CurrContinueLabel)
              else
@@ -486,9 +473,6 @@ implementation
          location_reset(location,LOC_VOID,OS_NO);
 
          include(flowcontrol,fc_gotolabel);
-{$ifdef OLDREGVARS}
-         load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
          hlcg.a_jmp_always(current_asmdata.CurrAsmList,tcglabelnode(labelnode).getasmlabel);
          if not(cs_opt_size in current_settings.optimizerswitches) then
            current_asmdata.CurrAsmList.concat(cai_align.create_max(current_settings.alignment.jumpalign,current_settings.alignment.jumpalignskipmax));
@@ -518,9 +502,6 @@ implementation
          location_reset(location,LOC_VOID,OS_NO);
          if not (nf_internal in flags) then
            include(flowcontrol,fc_gotolabel);
-{$ifdef OLDREGVARS}
-         load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
          hlcg.a_label(current_asmdata.CurrAsmList,getasmlabel);
 
          { Write also extra label if this label was referenced from

+ 0 - 9
compiler/ncgset.pas

@@ -1227,9 +1227,6 @@ implementation
          min_label:=case_get_min(labels);
 
          { Generate the jumps }
-{$ifdef OLDREGVARS}
-         load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
 {$if not defined(cpu64bitalu)}
          if def_cgsize(opsize) in [OS_64,OS_S64] then
            genlinearcmplist(labels)
@@ -1331,9 +1328,6 @@ implementation
                  secondpass(statement);
                  { don't come back to case line }
                  current_filepos:=current_asmdata.CurrAsmList.getlasttaifilepos^;
-{$ifdef OLDREGVARS}
-                 load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
                  hlcg.a_jmp_always(current_asmdata.CurrAsmList,endlabel);
                end;
            end;
@@ -1349,9 +1343,6 @@ implementation
            begin
 
              secondpass(elseblock);
-{$ifdef OLDREGVARS}
-             load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
            end;
 
          current_asmdata.CurrAsmList.concat(cai_align.create(current_settings.alignment.jumpalign));

+ 0 - 3
compiler/powerpc/nppcadd.pas

@@ -187,9 +187,6 @@ interface
         var
           oldnodetype: tnodetype;
         begin
-{$ifdef OLDREGVARS}
-           load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
            { the jump the sequence is a little bit hairy }
            case nodetype of
               ltn,gtn:

+ 0 - 16
compiler/psub.pas

@@ -1991,9 +1991,6 @@ implementation
               body is generated because the localloc is updated.
               Note: The generated code will be inserted after the code generation of
               the body is finished, because only then the position is known }
-{$ifdef oldregvars}
-            assign_regvars(code);
-{$endif oldreg}
             current_filepos:=entrypos;
 
             hlcg.gen_load_para_value(templist);
@@ -2069,19 +2066,6 @@ implementation
             { reset switches }
             current_settings.localswitches:=oldswitches;
 
-{$ifdef OLDREGVARS}
-            { note: this must be done only after as much code as possible has  }
-            {   been generated. The result is that when you ungetregister() a  }
-            {   regvar, it will actually free the regvar (and alse free the    }
-            {   the regvars at the same time). Doing this too early will       }
-            {   confuse the register allocator, as the regvars will still be   }
-            {   used. It should be done before loading the result regs (so     }
-            {   they don't conflict with the regvars) and before               }
-            {   gen_entry_code (that one has to be able to allocate the        }
-            {   regvars again) (JM)                                            }
-            free_regvars(aktproccode);
-{$endif OLDREGVARS}
-
             { generate symbol and save end of header position }
             current_filepos:=entrypos;
             hlcg.gen_proc_symbol(templist);

+ 0 - 17
compiler/symdef.pas

@@ -764,20 +764,6 @@ interface
        end;
        pinlininginfo = ^tinlininginfo;
 
-{$ifdef oldregvars}
-       { register variables }
-       pregvarinfo = ^tregvarinfo;
-       tregvarinfo = record
-          regvars : array[1..maxvarregs] of tsym;
-          regvars_para : array[1..maxvarregs] of boolean;
-          regvars_refs : array[1..maxvarregs] of longint;
-
-          fpuregvars : array[1..maxfpuvarregs] of tsym;
-          fpuregvars_para : array[1..maxfpuvarregs] of boolean;
-          fpuregvars_refs : array[1..maxfpuvarregs] of longint;
-       end;
-{$endif oldregvars}
-
        timplprocdefinfo = record
           resultname : pshortstring;
           parentfpstruct: tsym;
@@ -871,9 +857,6 @@ interface
           { info for inlining the subroutine, if this pointer is nil,
             the procedure can't be inlined }
           inlininginfo : pinlininginfo;
-{$ifdef oldregvars}
-          regvarinfo: pregvarinfo;
-{$endif oldregvars}
           import_nr    : word;
           extnumber    : word;
           { set to a value different from tsk_none in case this procdef is for

+ 0 - 9
compiler/wasm32/nwasmset.pas

@@ -352,9 +352,6 @@ implementation
         min_label:=case_get_min(labels);
 
         { Generate the jumps }
-{$ifdef OLDREGVARS}
-        load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
 {$if not defined(cpu64bitalu)}
         if def_cgsize(opsize) in [OS_64,OS_S64] then
           genlinearcmplist(labels)
@@ -457,9 +454,6 @@ implementation
                 secondpass(statement);
                 { don't come back to case line }
                 current_filepos:=current_asmdata.CurrAsmList.getlasttaifilepos^;
-{$ifdef OLDREGVARS}
-                load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
                 current_asmdata.CurrAsmList.concat(taicpu.op_sym(a_br,endlabel));
               end;
           end;
@@ -475,9 +469,6 @@ implementation
           begin
 
             secondpass(elseblock);
-{$ifdef OLDREGVARS}
-            load_all_regvars(current_asmdata.CurrAsmList);
-{$endif OLDREGVARS}
           end;
 
         current_asmdata.CurrAsmList.concat(taicpu.op_none(a_end_block));