Sfoglia il codice sorgente

- removed/disabled all normalset code (except for bootstrapping), since
it's no longer needed

git-svn-id: trunk@7403 -

Jonas Maebe 18 anni fa
parent
commit
5cf2511283

+ 0 - 9
compiler/defutil.pas

@@ -230,9 +230,6 @@ interface
     {# returns true, if the type passed is a varset }
     function is_varset(p : tdef) : boolean;
 
-    {# returns true if the type passed is a normalset }
-    function is_normalset(p : tdef) : boolean;
-
     { # returns true if the procdef has no parameters and no specified return type }
     function is_bareprocdef(pd : tprocdef): boolean;
 
@@ -1028,12 +1025,6 @@ implementation
       end;
 
 
-    function is_normalset(p : tdef) : boolean;
-      begin
-        result:=false;
-      end;
-
-
     function is_bareprocdef(pd : tprocdef): boolean;
       begin
         result:=(pd.maxparacount=0) and

+ 3 - 5
compiler/nadd.pas

@@ -1159,7 +1159,7 @@ implementation
                  is to convert right to a set }
                if not(equal_defs(ld,rd)) then
                 begin
-                  if is_varset(rd) or is_normalset(rd) then
+                  if is_varset(rd) then
                     inserttypeconv(left,right.resultdef)
                   else
                     inserttypeconv(right,left.resultdef);
@@ -1821,9 +1821,7 @@ implementation
         newstatement : tstatementnode;
         temp    : ttempcreatenode;
       begin
-        if (is_varset(left.resultdef) or is_varset(right.resultdef)) and
-          not(is_normalset(left.resultdef)) and
-          not(is_normalset(right.resultdef)) then
+        if (is_varset(left.resultdef) or is_varset(right.resultdef)) then
           begin
             case nodetype of
               equaln,unequaln,lten,gten:
@@ -2473,7 +2471,7 @@ implementation
            else array constructor can be seen as array of char (PFV) }
          else if (ld.typ=setdef) then
            begin
-             if not(is_varset(ld)) and not(is_normalset(ld)) then
+             if not(is_varset(ld)) then
                begin
                  if nodetype in [ltn,lten,gtn,gten,equaln,unequaln] then
                    expectloc:=LOC_FLAGS

+ 2 - 5
compiler/ncgadd.pas

@@ -233,9 +233,7 @@ interface
       begin
         { when a setdef is passed, it has to be a smallset }
         if is_varset(left.resultdef) or
-          is_normalset(left.resultdef) or
-          is_varset(right.resultdef) or
-          is_normalset(right.resultdef) then
+          is_varset(right.resultdef) then
           internalerror(200203302);
 
         if nodetype in [equaln,unequaln,gtn,gten,lten,ltn] then
@@ -786,8 +784,7 @@ interface
             begin
               {Normalsets are already handled in pass1 if mmx
                should not be used.}
-              if is_varset(tsetdef(left.resultdef)) or
-                is_normalset(tsetdef(left.resultdef)) then
+              if is_varset(tsetdef(left.resultdef)) then
                 begin
 {$ifdef SUPPORT_MMX}
                 {$ifdef i386}

+ 1 - 1
compiler/ncgcon.pas

@@ -516,7 +516,7 @@ implementation
          Psetbytes=^setbytes;
       begin
         { small sets are loaded as constants }
-        if not(is_varset(resultdef)) and not(is_normalset(resultdef)) then
+        if not(is_varset(resultdef)) then
          begin
            location_reset(location,LOC_CONSTANT,int_cgsize(resultdef.size));
            if (source_info.endian=target_info.endian) then

+ 2 - 0
rtl/i386/set.inc

@@ -13,6 +13,7 @@
 
  **********************************************************************}
 
+{$ifndef FPC_NEW_BIGENDIAN_SETS}
 
 {$define FPC_SYSTEM_HAS_FPC_SET_LOAD_SMALL}
 function fpc_set_load_small(l: fpc_small_set): fpc_normal_set;assembler;[public,alias:'FPC_SET_LOAD_SMALL']; compilerproc;
@@ -542,3 +543,4 @@ end;
 
 {$endif LARGESET}
 
+{$endif ndef FPC_NEW_BIGENDIAN_SETS}

+ 3 - 0
rtl/inc/compproc.inc

@@ -412,6 +412,8 @@ Procedure fpc_DecRef (Data,TypeInfo : Pointer);  compilerproc;
 procedure fpc_finalize_array(data,typeinfo : pointer;count,size : longint); compilerproc;
 {$endif FPC_HAS_FEATURE_RTTI}
 
+
+{$ifndef FPC_NEW_BIGENDIAN_SETS}
 function fpc_set_load_small(l: fpc_small_set): fpc_normal_set; compilerproc;
 function fpc_set_create_element(b : byte): fpc_normal_set; compilerproc;
 function fpc_set_set_byte(const source: fpc_normal_set; b : byte): fpc_normal_set; compilerproc;
@@ -423,6 +425,7 @@ function fpc_set_sub_sets(const set1,set2: fpc_normal_set): fpc_normal_set; comp
 function fpc_set_symdif_sets(const set1,set2: fpc_normal_set): fpc_normal_set; compilerproc;
 function fpc_set_comp_sets(const set1,set2: fpc_normal_set): boolean; compilerproc;
 function fpc_set_contains_sets(const set1,set2: fpc_normal_set): boolean; compilerproc;
+{$endif ndef FPC_NEW_BIGENDIAN_SETS}
 
 procedure fpc_varset_load(const l;sourcesize : longint;var dest;size : ptrint); compilerproc;
 procedure fpc_varset_create_element(b,size : ptrint; var data); compilerproc;

+ 3 - 0
rtl/inc/genset.inc

@@ -13,6 +13,8 @@
 
  **********************************************************************}
 
+{$ifndef FPC_NEW_BIGENDIAN_SETS}
+
 {$ifndef FPC_SYSTEM_HAS_FPC_SET_LOAD_SMALL}
 { Error No pascal version of FPC_SET_LOAD_SMALL}
  { THIS DEPENDS ON THE ENDIAN OF THE ARCHITECTURE!
@@ -220,6 +222,7 @@ function fpc_set_unset_byte(const source: fpc_normal_set; b : byte): fpc_normal_
  end;
 {$endif}
 
+{$endif ndef FPC_NEW_BIGENDIAN_SETS}
 
 {****************************************************************************
                                  Var sets

+ 4 - 37
rtl/powerpc/set.inc

@@ -14,6 +14,8 @@
 
  **********************************************************************}
 
+{$ifndef FPC_NEW_BIGENDIAN_SETS}
+
 {$define FPC_SYSTEM_HAS_FPC_SET_LOAD_SMALL}
 function fpc_set_load_small(l: fpc_small_set): fpc_normal_set;assembler;[public,alias:'FPC_SET_LOAD_SMALL']; compilerproc;
 {
@@ -53,7 +55,6 @@ asm
         stw     r0,24(r3)
         stw     r0,28(r3)
 
-{$ifndef FPC_NEW_BIGENDIAN_SETS}
         // r0 := 1 shl r4[27-31] -> bit index in dword (rotate instructions
         // with count in register only consider lower 5 bits of this register)
         li      r0,1
@@ -65,15 +66,6 @@ asm
         rlwinm  r4,r4,31-3+1,3,31-2
         // store the result
         stwx    r0,r3,r4
-{$else}
-        { must be done byte- instead of dword-based }
-        rlwinm  r5,r4,0,31-3+1,31
-        li      r0,0x80
-        srw     r0,r0,r5
-        srwi    r4,r4,3
-        // store the result
-        stbx    r0,r3,r4
-{$endif}
 end;
 
 
@@ -95,7 +87,6 @@ asm
        stfd     f2,16(r3)
        stfd     f3,24(r3)
 
-{$ifndef FPC_NEW_BIGENDIAN_SETS}
        // get the index of the correct *dword* in the set
        // r0 := (r5 rotl(32-3)) and (0x0fffffff8)
        rlwinm   r0,r5,31-3+1,3,31-2
@@ -109,17 +100,6 @@ asm
        or       r5,r4,r5
        // store result
        stw      r5,0(r3)
-{$else}
-        { must be done byte- instead of dword-based }
-        srwi    r6,r5,3
-        lbzx    r7,r6,r3
-        rlwinm  r5,r5,0,31-3+1,31
-        li      r0,0x80
-        srw     r0,r0,r5
-        or      r7,r7,r0
-        // store the result
-        stbx    r7,r6,r3
-{$endif}
 end;
 
 
@@ -141,7 +121,6 @@ asm
        stfd     f1,8(r3)
        stfd     f2,16(r3)
        stfd     f3,24(r3)
-{$ifndef FPC_NEW_BIGENDIAN_SETS}
        // get the index of the correct *dword* in the set
        // r0 := (r4 rotl(32-3)) and (0x0fffffff8)
        rlwinm   r0,r5,31-3+1,3,31-2
@@ -154,22 +133,9 @@ asm
        andc     r5,r4,r5
        // store result
        stw      r4,0(r3)
-{$else}
-        { must be done byte- instead of dword-based }
-        srwi    r6,r5,3
-        lbzx    r7,r6,r3
-        rlwinm  r5,r5,0,31-3+1,31
-        li      r0,0x80
-        srw     r0,r0,r5
-        andc    r7,r7,r0
-        // store the result
-        stbx    r7,r6,r3
-{$endif}
 end;
 
 
-{$ifndef FPC_NEW_BIGENDIAN_SETS}
-
 {$define FPC_SYSTEM_HAS_FPC_SET_SET_RANGE}
 function fpc_set_set_range(const orgset: fpc_normal_set; l,h : byte): fpc_normal_set;assembler; compilerproc;
 {
@@ -231,7 +197,6 @@ asm
   stw    r5,0(r3)             // store to set
 .Lset_range_exit:
 end;
-{$endif}
 
 
 {$define FPC_SYSTEM_HAS_FPC_SET_ADD_SETS}
@@ -367,3 +332,5 @@ asm
        cntlzw   r3,r0
        srwi.    r3,r3,5
 end;
+
+{$endif ndef FPC_NEW_BIGENDIAN_SETS}

+ 3 - 37
rtl/powerpc64/set.inc

@@ -14,6 +14,8 @@
 
  **********************************************************************}
 
+{$ifndef FPC_NEW_BIGENDIAN_SETS}
+
 {$define FPC_SYSTEM_HAS_FPC_SET_LOAD_SMALL}
 function fpc_set_load_small(l: fpc_small_set): fpc_normal_set;assembler;[public,alias:'FPC_SET_LOAD_SMALL']; compilerproc;
 {
@@ -50,7 +52,6 @@ asm
         stw     r0,24(r3)
         stw     r0,28(r3)
 
-{$ifndef FPC_NEW_BIGENDIAN_SETS}
         // r0 := 1 shl r4[27-31] -> bit index in dword (rotate instructions
         // with count in register only consider lower 5 bits of this register)
         li      r0,1
@@ -62,15 +63,6 @@ asm
         rlwinm  r4,r4,31-3+1,3,31-2
         // store the result
         stwx    r0,r3,r4
-{$else}
-        { must be done byte- instead of dword-based }
-        rlwinm  r5,r4,0,31-3+1,31
-        li      r0,0x80
-        srw     r0,r0,r5
-        srwi    r4,r4,3
-        // store the result
-        stbx    r0,r3,r4
-{$endif}
 end;
 
 
@@ -92,7 +84,6 @@ asm
        stfd     f2,16(r3)
        stfd     f3,24(r3)
 
-{$ifndef FPC_NEW_BIGENDIAN_SETS}
        // get the index of the correct *dword* in the set
        // r0 := (r5 rotl(32-3)) and (0x0fffffff8)
        rlwinm   r0,r5,31-3+1,3,31-2
@@ -106,17 +97,6 @@ asm
        or       r5,r4,r5
        // store result
        stw      r5,0(r3)
-{$else}
-        { must be done byte- instead of dword-based }
-        srwi    r6,r5,3
-        lbzx    r7,r6,r3
-        rlwinm  r5,r5,0,31-3+1,31
-        li      r0,0x80
-        srw     r0,r0,r5
-        or      r7,r7,r0
-        // store the result
-        stbx    r7,r6,r3
-{$endif}
 end;
 
 
@@ -138,7 +118,6 @@ asm
        stfd     f1,8(r3)
        stfd     f2,16(r3)
        stfd     f3,24(r3)
-{$ifndef FPC_NEW_BIGENDIAN_SETS}
        // get the index of the correct *dword* in the set
        // r0 := (r4 rotl(32-3)) and (0x0fffffff8)
        rlwinm   r0,r5,31-3+1,3,31-2
@@ -151,20 +130,8 @@ asm
        andc     r5,r4,r5
        // store result
        stw      r4,0(r3)
-{$else}
-        { must be done byte- instead of dword-based }
-        srwi    r6,r5,3
-        lbzx    r7,r6,r3
-        rlwinm  r5,r5,0,31-3+1,31
-        li      r0,0x80
-        srw     r0,r0,r5
-        andc    r7,r7,r0
-        // store the result
-        stbx    r7,r6,r3
-{$endif}
 end;
 
-{$ifndef FPC_NEW_BIGENDIAN_SETS}
 
 {$define FPC_SYSTEM_HAS_FPC_SET_SET_RANGE}
 function fpc_set_set_range(const orgset: fpc_normal_set; l,h : byte): fpc_normal_set;assembler; compilerproc;
@@ -227,7 +194,6 @@ asm
   stw    r5,0(r3)             // store to set
 .Lset_range_exit:
 end;
-{$endif}
 
 
 {$define FPC_SYSTEM_HAS_FPC_SET_ADD_SETS}
@@ -364,6 +330,6 @@ asm
        srwi.    r3,r3,5
 end;
 
-
+{$endif ndef FPC_NEW_BIGENDIAN_SETS}