2
0
Эх сурвалжийг харах

delete testcode

git-svn-id: branches/tg74/avx512@39936 -
tg74 6 жил өмнө
parent
commit
60a75a2277

+ 0 - 3
compiler/ppcx64.lpi

@@ -33,12 +33,10 @@
       <Unit0>
         <Filename Value="pp.pas"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="pp"/>
       </Unit0>
       <Unit1>
         <Filename Value="x86\aasmcpu.pas"/>
         <IsPartOfProject Value="True"/>
-        <UnitName Value="aasmcpu"/>
       </Unit1>
     </Units>
   </ProjectOptions>
@@ -71,7 +69,6 @@
         <StopAfterErrCount Value="50"/>
       </ConfigFile>
       <CustomOptions Value="-dx86_64"/>
-      <CompilerPath Value="$(CompPath)"/>
     </Other>
   </CompilerOptions>
 </CONFIG>

+ 9 - 73
compiler/x86/aasmcpu.pas

@@ -528,8 +528,7 @@ interface
       tinsentry=packed record
         opcode  : tasmop;
         ops     : byte;
-        //optypes : array[0..max_operands-1] of longint;
-        optypes : array[0..max_operands-1] of int64; //TG
+        optypes : array[0..max_operands-1] of int64;
         code    : array[0..maxinfolen] of char;
         flags   : tinsflags;
       end;
@@ -749,7 +748,6 @@ implementation
      const
 {$if defined(x86_64)}
        { Intel style operands ! }
-       //TG opsize_2_type:array[0..2,topsize] of longint=(
          opsize_2_type:array[0..2,topsize] of int64=(
          (OT_NONE,
           OT_BITS8,OT_BITS16,OT_BITS32,OT_BITS64,OT_BITS16,OT_BITS32,OT_BITS32,OT_BITS64,OT_BITS64,OT_BITS64,
@@ -1874,7 +1872,7 @@ implementation
                     OTVE_VECTOR_BCST4: if not(IF_BCST4 in p^.flags) then exit;
                     OTVE_VECTOR_BCST8: if not(IF_BCST8 in p^.flags) then exit;
                    OTVE_VECTOR_BCST16: if not(IF_BCST16 in p^.flags) then exit;
-                               else exit; //TG TODO errormsg
+                               else exit;
                  end;
                end;
 
@@ -1928,18 +1926,11 @@ implementation
     function taicpu.FindInsentry(objdata:TObjData):boolean;
       var
         i : longint;
-
-        //TG TODO delete
-        p: pInsentry;
-
       begin
         result:=false;
       { Things which may only be done once, not when a second pass is done to
         optimize }
 
-        //TG TODO delete
-        p := Insentry;
-
         if (Insentry=nil) or (IF_PASS2 in InsEntry^.flags) then
          begin
            current_filepos:=fileinfo;
@@ -2458,8 +2449,7 @@ implementation
           (0, 1, 2, 3, 6, 7, 5, 4);
         maxsupreg: array[tregistertype] of tsuperregister=
 {$ifdef x86_64}
-          //(0, 16, 9, 8, 16, 32, 0, 0);
-          (0, 16, 9, 8, 32, 32, 8, 0); //TG
+          (0, 16, 9, 8, 32, 32, 8, 0);
 {$else x86_64}
           (0,  8, 9, 8,  8, 32, 8, 0);
 {$endif x86_64}
@@ -3089,20 +3079,10 @@ implementation
         exists_l512: boolean;
         exists_EVEXW1: boolean;
         pmref_operand: poper;
-        //i: integer;
-        //refsize: integer;
-        //tuplesize: integer;
-        //memsize: integer;
 {$ifdef x86_64}
         omit_rexw : boolean;
 {$endif x86_64}
       begin
-        //TG TODO delete
-        if p^.opcode = a_VADDPS then
-         begin
-           len:=0;
-         end;
-
 
         len:=0;
         len_ea_data := 0;
@@ -3683,15 +3663,9 @@ implementation
         EVEXb   : byte;
         EVEXmm  : byte;
 
-//TG delete
-        pins: tinsentry;
-        t: toptype;
       begin
         { safety check }
 
-        // TODO delete
-        i := longword(insoffset);
-
         if objdata.currobjsec.size<>longword(insoffset) then
         begin
           internalerror(200130121);
@@ -3799,8 +3773,6 @@ implementation
         EVEXb    := 0;
         EVEXmm   := 0;
 
-        pins := insentry^;
-
         repeat
           c:=ord(codes^);
           inc(codes);
@@ -3820,19 +3792,13 @@ implementation
                    // AVX 512 - EVEX
                    // check operands
 
-                   // TODO delete
-                   pins := insentry^;
-                   i := ord(c);
-
                    if (c shr 6) = 1 then
                    begin
                      opidx := c and 7;
                      if ops > opidx then
                      begin
-                       t := oper[opidx]^.typ;
-
                        if (oper[opidx]^.typ=top_reg) then
-                        if getsupreg(oper[opidx]^.reg) and $10 = $0 then EVEXr := 1;  //TG TODO check
+                        if getsupreg(oper[opidx]^.reg) and $10 = $0 then EVEXr := 1;
                      end
                    end
                    else EVEXr := 1; // modrm:reg not used =>> 1
@@ -3840,9 +3806,9 @@ implementation
                    opidx := (c shr 3) and 7;
                    if ops > opidx then
                     case oper[opidx]^.typ of
-                      top_reg: if getsupreg(oper[opidx]^.reg) and $10 = $0 then EVEXx := 1;  //TG TODO check
+                      top_reg: if getsupreg(oper[opidx]^.reg) and $10 = $0 then EVEXx := 1;
                       top_ref: begin
-                                 if getsupreg(oper[opidx]^.ref^.index) and $08 = $0 then EVEXx := 1;  //TG TODO check
+                                 if getsupreg(oper[opidx]^.ref^.index) and $08 = $0 then EVEXx := 1;
                                  if getsubreg(oper[opidx]^.ref^.index) in [R_SUBMMX,R_SUBMMY,R_SUBMMZ] then
                                  begin
                                    // VSIB memory addresing
@@ -3891,7 +3857,7 @@ implementation
                       ((oper[opidx]^.ot and OT_REG_EXTRA_MASK = otf_reg_xmm) or
                        (oper[opidx]^.ot and OT_REG_EXTRA_MASK = otf_reg_ymm) or
                        (oper[opidx]^.ot and OT_REG_EXTRA_MASK = otf_reg_zmm)) then
-                    if (getsupreg(oper[opidx]^.reg) and $10 = $0) then EVEXx := 1;  //TG TODO check
+                    if (getsupreg(oper[opidx]^.reg) and $10 = $0) then EVEXx := 1;
                  end;
            &370: begin
                    VEXmmmmm             := VEXmmmmm OR $01; // set leading opcode byte $0F
@@ -3941,7 +3907,7 @@ implementation
               if rexbits(oper[opmode]^.reg) = 0 then VEXvvvv := VEXvvvv or (1 shl 6);
 
               if rexbits(oper[opmode]^.reg) = 0 then EVEXvvvv := EVEXvvvv or (1 shl 3);
-              if getsupreg(oper[opmode]^.reg) and $10 = 0 then EVEXv := 1;  //TG TODO check
+              if getsupreg(oper[opmode]^.reg) and $10 = 0 then EVEXv := 1;
             {$else}
               VEXvvvv := VEXvvvv or (1 shl 6);
               EVEXvvvv := EVEXvvvv or (1 shl 3);
@@ -3971,7 +3937,7 @@ implementation
               needed_EVEX := true;
 
               needed_VEX := false;
-              needed_VEX_Extension := false;  //TG TODO check
+              needed_VEX_Extension := false;
             end;
           end;
 
@@ -4953,14 +4919,6 @@ implementation
           RegBCSTYMMSizeMask := 0;
           RegBCSTZMMSizeMask := 0;
 
-
-          //TG TODO delete
-          if Asmop = A_VFPCLASSPD then
-          begin
-            MRefInfo         := msiUnkown;
-          end;
-
-
           while (insentry^.opcode=AsmOp) do
           begin
             MRefInfo         := msiUnkown;
@@ -5278,7 +5236,6 @@ implementation
                             InsTabMemRefSizeInfoCache^[AsmOp].BCSTXMMMultiplicator := 2;
                           end;
                     else begin
-                           //TG TODO - mixed broadcast
                            InsTabMemRefSizeInfoCache^[AsmOp].MemRefSizeBCST := msbMultiple;
                          end;;
             end;
@@ -5296,16 +5253,6 @@ implementation
                  ((RegXMMSizeMask or RegYMMSizeMask or RegZMMSizeMask) <> 0) then
               begin
                 InsTabMemRefSizeInfoCache^[AsmOp].MemRefSize := msiVMemRegSize;
-              end
-              else
-              begin
-                //TG TODO delete
-                if not((AsmOp = A_VGATHERQPS) or
-                       (AsmOp = A_VGATHERQPS) or
-                       (AsmOp = A_VPGATHERQD))  then
-                begin
-                  RegZMMSizeMask := RegZMMSizeMask;
-                end;
               end;
             end
             else if (RegMMXSizeMask or RegMMXConstSizeMask) <> 0 then
@@ -5316,12 +5263,6 @@ implementation
                  ((RegZMMSizeMask or RegZMMConstSizeMask) = 0) then
               begin
                 InsTabMemRefSizeInfoCache^[AsmOp].MemRefSize := msiMemRegSize;
-              end
-              else
-              begin
-                //TG TODO delete
-                if not(InsTabMemRefSizeInfoCache^[AsmOp].MemRefSize in [msiMultiple16]) then
-                 RegMMXSizeMask := RegMMXSizeMask;
               end;
             end
             else if (((RegXMMSizeMask or RegXMMConstSizeMask) = OT_BITS128) or ((RegXMMSizeMask or RegXMMConstSizeMask) = 0)) and
@@ -5355,11 +5296,6 @@ implementation
               else if ((RegZMMSizeMask or RegZMMConstSizeMask) = OT_BITS128) then
               begin
                 InsTabMemRefSizeInfoCache^[AsmOp].MemRefSize := msiMemRegx32y64z128;
-              end
-              else
-              begin
-                //TG TODO delete
-                RegZMMSizeMask := RegZMMSizeMask;
               end;
             end
             else if ((RegXMMSizeMask or RegXMMConstSizeMask) = OT_BITS64)  and

+ 0 - 11
compiler/x86/rax86.pas

@@ -526,10 +526,6 @@ begin
                     memopsize := operands[i].opr.varsize * 8;
             end;
 
-            //TG TODO delete
-            t := tx86operand(operands[i]).opsize;
-
-
             if memopsize = 0 then memopsize := topsize2memsize[tx86operand(operands[i]).opsize];
 
             if (memopsize > 0) and
@@ -1358,9 +1354,6 @@ var
   i     : longint;
   asize : int64;
   ai   : taicpu;
-
-  //TG TODO delete
-  ocode: tasmop;
 begin
   ConcatInstruction:=nil;
 
@@ -1560,10 +1553,6 @@ begin
       (target_info.system in [system_i386_linux,system_i386_FreeBSD,system_i386_android]) then
      Message(asmr_w_enter_not_supported_by_linux);
 
-
-  //TG TODO delete
-  oCode := opcode;
-
   ai:=taicpu.op_none(opcode,siz);
   ai.fileinfo:=filepos;
   ai.SetOperandOrder(op_att);

+ 2 - 17
compiler/x86/rax86int.pas

@@ -136,9 +136,6 @@ Unit Rax86int;
        rautils,itx86int,
        { codegen }
        procinfo,paramgr
-
-       //TG TODO delete
-       ,aasmtai
        ;
 
     type
@@ -1003,7 +1000,7 @@ Unit Rax86int;
                           if (kreg >= NR_K1) and
                              (kreg <= NR_K7) then
                           begin
-                            aop.vopext := aop.vopext or (tregisterrec(kreg).supreg  and $07); //TG TODO check
+                            aop.vopext := aop.vopext or (tregisterrec(kreg).supreg  and $07);
                             aop.vopext := aop.vopext or OTVE_VECTOR_WRITEMASK;
                           end;
                         end;
@@ -2007,8 +2004,6 @@ Unit Rax86int;
 
                 Consume(AS_REGISTER, true);
 
-                //TG TODO check
-                //while actasmtoken in [AS_LOPMASK,AS_LOPZEROMASK, AS_LOPSAE, AS_LOPER] do
                 while actasmtoken in OPEXT_STARTASMTOKEN do
                 begin
                   consume_voperand_ext(oper);
@@ -2179,8 +2174,6 @@ Unit Rax86int;
                   Message(asmr_e_invalid_reference_syntax);
 
                 Consume(AS_RBRACKET, true);
-                //TG TODO check
-                //while actasmtoken in [AS_LOPMASK,AS_LOPZEROMASK,AS_LOPBCST, AS_LOPSAE, AS_LOPER] do
                 while actasmtoken in OPEXT_STARTASMTOKEN do
                 begin
                   consume_voperand_ext(oper);
@@ -2299,8 +2292,6 @@ Unit Rax86int;
         tsize   : tcgint;
         hastypecast: boolean;
 
-        //TG TODO delete
-        t: tasmtoken;
       begin
         oper.vopext := 0;
 
@@ -2539,8 +2530,6 @@ Unit Rax86int;
                        expr:=actasmpattern;
                        Consume(AS_ID, true);
 
-                       //TG TODO check
-                       //while actasmtoken in [AS_LOPMASK,AS_LOPZEROMASK,AS_LOPBCST,AS_LOPSAE] do
                        while actasmtoken in OPEXT_STARTASMTOKEN do
                        begin
                          consume_voperand_ext(oper);
@@ -2608,10 +2597,8 @@ Unit Rax86int;
                 tempreg:=actasmregister;
                 Consume(AS_REGISTER, true);
 
-                //TG TODO check
                 if (getregtype(tempreg) in [R_MMREGISTER, R_ADDRESSREGISTER]) then
                  begin
-                  //while actasmtoken in [AS_LOPMASK,AS_LOPZEROMASK, AS_LOPSAE, AS_LOPER] do
                    while actasmtoken in OPEXT_STARTASMTOKEN do
                   begin
                     consume_voperand_ext(oper);
@@ -2709,8 +2696,6 @@ Unit Rax86int;
 
             else
               begin
-                t := actasmtoken;
-
                 Message(asmr_e_syn_operand);
                 RecoverConsume(true);
                 break;
@@ -2873,7 +2858,7 @@ Unit Rax86int;
                   Message(asmr_e_too_many_operands)
                 else
                   Dec(operandnum);
-                Consume(AS_COMMA, true); //TG CHECK
+                Consume(AS_COMMA, true);
               end;
 
             {Far constant, i.e. jmp $0000:$11111111.}