Bläddra i källkod

* commented out more obsolete constants

peter 22 år sedan
förälder
incheckning
0939085ab1

+ 4 - 4
compiler/i386/rgcpu.pas

@@ -56,7 +56,6 @@ unit rgcpu;
           { these counters contain the number of elements in the }
           { unusedregsxxx/usableregsxxx sets                     }
           countunusedregsfpu : byte;
-          countusableregsfpu : byte;
 
           { Contains the registers which are really used by the proc itself.
             It doesn't take care of registers used by called procedures
@@ -130,9 +129,7 @@ implementation
       begin
         used_in_proc:=[];
         t_times := 0;
-        countusableregsfpu:=c_countusableregsfpu;
         unusedregsfpu:=usableregsfpu;
-        countunusedregsfpu:=countusableregsfpu;
       end;
 
 
@@ -253,7 +250,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.39  2003-10-17 14:38:32  peter
+  Revision 1.40  2003-10-17 15:08:34  peter
+    * commented out more obsolete constants
+
+  Revision 1.39  2003/10/17 14:38:32  peter
     * 64k registers supported
     * fixed some memory leaks
 

+ 7 - 7
compiler/ncgutil.pas

@@ -154,12 +154,7 @@ implementation
                  (p.location.loc<>LOC_FPUREGISTER)
                 ) and
                 (p.left.registers32<p.right.registers32)
-               ) and
-               { the following check is appropriate, because all }
-               { 4 registers are rarely used and it is thereby   }
-               { achieved that the extra code is being dropped   }
-               { by exchanging not commutative operators     }
-               (p.right.registers32<=c_countusableregsint)
+               )
               ) then
             begin
               hp:=p.left;
@@ -667,6 +662,7 @@ implementation
 
     function maybe_pushfpu(list:taasmoutput;needed : byte;var l:tlocation) : boolean;
       begin
+{$ifdef i386}
         if (needed>=maxfpuregs) and
            (l.loc = LOC_FPUREGISTER) then
           begin
@@ -675,6 +671,7 @@ implementation
           end
         else
           maybe_pushfpu:=false;
+{$endif i386}
       end;
 
 
@@ -1960,7 +1957,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.159  2003-10-17 14:38:32  peter
+  Revision 1.160  2003-10-17 15:08:34  peter
+    * commented out more obsolete constants
+
+  Revision 1.159  2003/10/17 14:38:32  peter
     * 64k registers supported
     * fixed some memory leaks
 

+ 6 - 1
compiler/pass_2.pas

@@ -290,8 +290,10 @@ implementation
 }
 {$endif EXTDEBUG}
 
+{$ifdef i386}
               if assigned(current_procinfo.procdef) then
                 current_procinfo.procdef.fpu_used:=p.registersfpu;
+{$endif i386}
 
            end;
          current_procinfo.aktproccode.concatlist(exprasmlist);
@@ -300,7 +302,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.69  2003-10-10 17:48:13  peter
+  Revision 1.70  2003-10-17 15:08:34  peter
+    * commented out more obsolete constants
+
+  Revision 1.69  2003/10/10 17:48:13  peter
     * old trgobj moved to x86/rgcpu and renamed to trgx86fpu
     * tregisteralloctor renamed to trgobj
     * removed rgobj from a lot of units

+ 10 - 7
compiler/powerpc/cgcpu.pas

@@ -1016,7 +1016,7 @@ const
 
         usesgpr:=false;
         if not (po_assembler in current_procinfo.procdef.procoptions) then
-          for regcounter2:=firstsaveintreg to RS_R31 do
+          for regcounter2:=RS_R13 to RS_R31 do
             begin
               if supregset_in(rgint.used_in_proc,regcounter2) then
                 begin
@@ -1125,7 +1125,7 @@ const
                a_call_name(objectlibrary.newasmsymbol('_savegpr_'+tostr(ord(firstreggpr)-ord(R_14)+14))
              }
             reference_reset_base(href,NR_R12,-4);
-            for regcounter2:=firstsaveintreg to RS_R31 do
+            for regcounter2:=RS_R13 to RS_R31 do
               begin
                 if supregset_in(rgint.used_in_proc,regcounter2) then
                   begin
@@ -1230,7 +1230,7 @@ const
 
         usesgpr:=false;
         if not (po_assembler in current_procinfo.procdef.procoptions) then
-          for regcounter2:=firstsaveintreg to RS_R31 do
+          for regcounter2:=RS_R13 to RS_R31 do
             begin
               if supregset_in(rgint.used_in_proc,regcounter2) then
                 begin
@@ -1264,7 +1264,7 @@ const
              else
                reference_reset_base(href,NR_R12,-4);
 
-            for regcounter2:=firstsaveintreg to RS_R31 do
+            for regcounter2:=RS_R13 to RS_R31 do
               begin
                 if supregset_in(rgint.used_in_proc,regcounter2) then
                   begin
@@ -1360,7 +1360,7 @@ const
          end;
       usesgpr:=false;
       if not (po_assembler in current_procinfo.procdef.procoptions) then
-        for regcounter2:=firstsaveintreg to RS_R31 do
+        for regcounter2:=RS_R13 to RS_R31 do
           begin
             if supregset_in(rgint.used_in_proc,regcounter2) then
               begin
@@ -2117,7 +2117,7 @@ const
                  { a register here, we must first reallocate the index register, since }
                  { otherwise it may be overwritten (and it's still used afterwards)    }
                  freeindex := false;
-                 if (getsupreg(ref.index) >= first_int_supreg) and
+                 if (getsupreg(ref.index) < first_int_imreg) and
                     (supregset_in(rgint.unusedregs,getsupreg(ref.index))) then
                    begin
                      rgint.getexplicitregister(list,ref.index);
@@ -2436,7 +2436,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.131  2003-10-17 14:52:07  peter
+  Revision 1.132  2003-10-17 15:08:34  peter
+    * commented out more obsolete constants
+
+  Revision 1.131  2003/10/17 14:52:07  peter
     * fixed ppc build
 
   Revision 1.130  2003/10/17 01:22:08  florian

+ 7 - 15
compiler/powerpc/cpubase.pas

@@ -116,24 +116,13 @@ uses
       {$i rppccon.inc}
 
       { Integer Super registers first and last }
-      first_int_supreg = RS_R0;
-      last_int_supreg = RS_R31;
-
       first_int_imreg = $20;
-      last_int_imreg = $fe;
 
       { Float Super register first and last }
-      first_fpu_supreg    = $00;
-      last_fpu_supreg     = $1f;
-
       first_fpu_imreg     = $20;
-      last_fpu_imreg      = $fe;
 
       { MM Super register first and last }
-      first_mm_supreg    = RS_INVALID;
-      last_mm_supreg     = RS_INVALID;
-      first_mm_imreg     = RS_INVALID;
-      last_mm_imreg      = RS_INVALID;
+      first_mm_imreg     = $0;
 
 {$warning TODO Calculate bsstart}
       regnumber_count_bsstart = 64;
@@ -361,8 +350,7 @@ uses
     const
       max_operands = 5;
 
-      general_superregisters = [RS_R0..RS_R31];
-
+(*
       {# Table of registers which can be allocated by the code generator
          internally, when generating the code.
       }
@@ -426,6 +414,7 @@ uses
         (R_M1,R_M2,R_M3,R_M4,R_M5,R_M6,R_M7,R_M8,R_M9,R_M10,R_M11,R_M12,R_M13);
 }
 
+*)
 
 {*****************************************************************************
                           Default generic sizes
@@ -725,7 +714,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.71  2003-10-11 16:06:42  florian
+  Revision 1.72  2003-10-17 15:08:34  peter
+    * commented out more obsolete constants
+
+  Revision 1.71  2003/10/11 16:06:42  florian
     * fixed some MMX<->SSE
     * started to fix ppc, needs an overhaul
     + stabs info improve for spilling, not sure if it works correctly/completly

+ 20 - 1
compiler/symdef.pas

@@ -431,7 +431,9 @@ interface
           procoptions     : tprocoptions;
           maxparacount,
           minparacount    : byte;
+{$ifdef i386}
           fpu_used        : byte;    { how many stack fpu must be empty }
+{$endif i386}
           funcret_paraloc : array[tcallercallee] of tparalocation;
           has_paraloc_info : boolean; { paraloc info is available }
           constructor create(level:byte);
@@ -3101,7 +3103,9 @@ implementation
          proccalloption:=pocall_none;
          procoptions:=[];
          rettype:=voidtype;
+{$ifdef i386}
          fpu_used:=0;
+{$endif i386}
          savesize:=POINTER_SIZE;
          has_paraloc_info:=false;
       end;
@@ -3211,9 +3215,11 @@ implementation
       is processed   PM }
     procedure tabstractprocdef.test_if_fpu_result;
       begin
+{$ifdef i386}
          if assigned(rettype.def) and
             (rettype.def.deftype=floatdef) then
            fpu_used:=maxfpuregs;
+{$endif i386}
       end;
 
 
@@ -3250,7 +3256,11 @@ implementation
          minparacount:=0;
          maxparacount:=0;
          ppufile.gettype(rettype);
+{$ifdef i386}
          fpu_used:=ppufile.getbyte;
+{$else}
+         ppufile.getbyte;
+{$endif i386}
          proctypeoption:=tproctypeoption(ppufile.getbyte);
          proccalloption:=tproccalloption(ppufile.getbyte);
          ppufile.getsmallset(procoptions);
@@ -3293,9 +3303,13 @@ implementation
          ppufile.puttype(rettype);
          oldintfcrc:=ppufile.do_interface_crc;
          ppufile.do_interface_crc:=false;
+{$ifdef i386}
          if simplify_ppu then
           fpu_used:=0;
          ppufile.putbyte(fpu_used);
+{$else}
+         ppufile.putbyte(0);
+{$endif}
          ppufile.putbyte(ord(proctypeoption));
          ppufile.putbyte(ord(proccalloption));
          ppufile.putsmallset(procoptions);
@@ -4181,10 +4195,12 @@ implementation
         { plausible (PM) }
         { a more secure way would be
           to allways store in a temp }
+{$ifdef i386}
         if is_fpu(rettype.def) then
           fpu_used:={2}maxfpuregs
         else
           fpu_used:=0;
+{$endif i386}
         inherited ppuwrite(ppufile);
 
         { Write this entry }
@@ -5868,7 +5884,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.180  2003-10-17 14:52:07  peter
+  Revision 1.181  2003-10-17 15:08:34  peter
+    * commented out more obsolete constants
+
+  Revision 1.180  2003/10/17 14:52:07  peter
     * fixed ppc build
 
   Revision 1.179  2003/10/17 14:38:32  peter

+ 8 - 1
compiler/x86/cpubase.pas

@@ -314,6 +314,9 @@ uses
 
       max_operands = 3;
 
+      maxfpuregs = 8;
+
+(*
       { low and high of the available maximum width integer general purpose }
       { registers                                                            }
       LoGPReg = RS_EAX;
@@ -342,6 +345,7 @@ uses
 
       usableregsmm = [RS_MM0..RS_MM7];
       c_countusableregsmm  = 8;
+*)
 
 {*****************************************************************************
                             CPU Dependent Constants
@@ -554,7 +558,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.26  2003-10-17 14:38:32  peter
+  Revision 1.27  2003-10-17 15:08:34  peter
+    * commented out more obsolete constants
+
+  Revision 1.26  2003/10/17 14:38:32  peter
     * 64k registers supported
     * fixed some memory leaks