Browse Source

internal assembler-reader x86 opsize local/global var - cleanup

git-svn-id: branches/tg74/avx512-0037785@47885 -
tg74 4 years ago
parent
commit
b7ade3e566
3 changed files with 2 additions and 56 deletions
  1. 0 7
      compiler/x86/aasmcpu.pas
  2. 0 39
      compiler/x86/rax86.pas
  3. 2 10
      tests/utils/avx/asmtestgenerator.pas

+ 0 - 7
compiler/x86/aasmcpu.pas

@@ -1834,13 +1834,6 @@ implementation
                if (insot and OT_SIZE_MASK) = 0 then
                begin
                  case insot and (OT_XMMRM or OT_YMMRM or OT_ZMMRM or OT_REG_EXTRA_MASK) of
-                   //OT_XMMRM: if InsTabMemRefSizeInfoCache^[opcode].MemRefSize <> msiMultipleMinSize128
-                   //           then insot := insot or OT_BITS128;
-                   //OT_YMMRM: if InsTabMemRefSizeInfoCache^[opcode].MemRefSize <> msiMultipleMinSize256
-                   //           then insot := insot or OT_BITS256;
-                   //OT_ZMMRM: if InsTabMemRefSizeInfoCache^[opcode].MemRefSize <> msiMultipleMinSize512
-                   //           then insot := insot or OT_BITS512;
-
                    OT_MEM128: insot := insot or OT_BITS128;
                    OT_MEM256: insot := insot or OT_BITS256;
                    OT_MEM512: insot := insot or OT_BITS512;

+ 0 - 39
compiler/x86/rax86.pas

@@ -868,7 +868,6 @@ begin
                   if memoffset = 0 then
                   begin
                     Message3(asmr_w_check_mem_operand_size3,
-                             //std_op2str[opcode],
 			     getstring(false),
                              ToStr(memopsize),
                              ToStr(memrefsize)
@@ -877,7 +876,6 @@ begin
                   else
                   begin
                     Message4(asmr_w_check_mem_operand_size_offset,
-                             //std_op2str[opcode],
 			     getstring(false),
                              ToStr(memopsize),
                              ToStr(memrefsize),
@@ -2104,43 +2102,6 @@ begin
                if asize<>0 then
                 ai.oper[i-1]^.ot:=(ai.oper[i-1]^.ot and not OT_SIZE_MASK) or asize;
              end;
-
-    //         if MemRefInfo(opcode).ExistsSSEAVX then
-    //         begin
-    //           asize := 0;
-    //
-    //           case operands[i].size of
-    //             OS_32,OS_M32: if (operands[i].HasType) or
-    //                              (MemRefInfo(opcode).MemRefSize = msiMem32) or
-    //                              (MemRefInfo(opcode).MemRefSizeBCST = msbBCST32)
-    //                              //(((tx86operand(operands[i]).vopext and OTVE_VECTOR_BCST) = OTVE_VECTOR_BCST) and
-    //                              //  (MemRefInfo(opcode).MemRefSizeBCST = msbBCST32)
-    //                              //)
-    //                             then
-    //                            asize:=OT_BITS32;
-    //             OS_64,OS_M64: if (operands[i].HasType) or
-    //                              (MemRefInfo(opcode).MemRefSizeBCST = msbBCST64)
-    //                              (MemRefInfo(opcode).MemRefSize = msiMem64) or
-    //                              //(((tx86operand(operands[i]).vopext and OTVE_VECTOR_BCST) = OTVE_VECTOR_BCST) and
-    //                              //  (MemRefInfo(opcode).MemRefSizeBCST = msbBCST64)
-    //                              //) then
-    //                              (MemRefInfo(opcode).MemRefSizeBCST = msbBCST64) then
-    //                             asize:=OT_BITS64;
-    //                  OS_M128: if (operands[i].HasType) or
-    //                              (MemRefInfo(opcode).MemRefSize = msiMem128) then
-    //				//asize:=OT_BITS128;
-    //                  OS_M256: if (operands[i].HasType) or
-    //                              (MemRefInfo(opcode).MemRefSize = msiMem256) then
-    //				//asize:=OT_BITS256;
-    //                  OS_M512: if (operands[i].HasType) or
-    //                              (MemRefInfo(opcode).MemRefSize = msiMem512) then
-    //				//asize:=OT_BITS512;
-    //                      else;
-    //           end;
-    //
-    //           if asize<>0 then
-    //             ai.oper[i-1]^.ot:=(ai.oper[i-1]^.ot and not OT_SIZE_MASK) or asize;
-    //         end;
            end;
        OPR_REFERENCE:
          begin

+ 2 - 10
tests/utils/avx/asmtestgenerator.pas

@@ -1253,19 +1253,11 @@ begin
                        ;
 
             
-          MaskRegNeeded := (Uppercase(aInst) = 'VGATHERDPD') or
-                           (Uppercase(aInst) = 'VGATHERDPS') or
-                           (Uppercase(aInst) = 'VGATHERDQPD') or
-                           (Uppercase(aInst) = 'VGATHERDQPS') or
-                           (Uppercase(aInst) = 'VPGATHERDD') or
-                           (Uppercase(aInst) = 'VPGATHERDQ') or
-                           (Uppercase(aInst) = 'VPGATHERQD') or
-                           (Uppercase(aInst) = 'VPGATHERQQ') or
+          MaskRegNeeded := (Pos('VGATHER', Uppercase(aInst)) = 1) or
+                           (Pos('VPGATHER', Uppercase(aInst)) = 1) or
 			   (Pos('VPSCATTER', Uppercase(aInst)) = 1) or
 			   (Pos('VSCATTER', Uppercase(aInst)) = 1);
 
-
-
           for il_Op := 1 to 4 do
           begin
             sl_Prefix := '';