Forráskód Böngészése

external gas assembler: special handling for correct suffix in vfpclass-opcodes

git-svn-id: branches/tg74/avx512-0037785@47865 -
tg74 4 éve
szülő
commit
e98771608e
1 módosított fájl, 5 hozzáadás és 2 törlés
  1. 5 2
      compiler/x86/rax86.pas

+ 5 - 2
compiler/x86/rax86.pas

@@ -1521,8 +1521,11 @@ procedure Tx86Instruction.SetInstructionOpsize;
  	    // special handling = use source operand for calculate instructions-opsize
  	    // special handling = use source operand for calculate instructions-opsize
             // e.g. vcvtsi2sd, vcvtsi2ss, vcvtusi2sd, vcvtusi2ss,
             // e.g. vcvtsi2sd, vcvtsi2ss, vcvtusi2sd, vcvtusi2ss,
             //      vfpclass..
             //      vfpclass..
-            
-            opsize:=tx86operand(operands[1]).opsize;
+
+            if (ops > 2) and
+               (tx86operand(operands[1]).opr.typ = OPR_CONSTANT) then
+             opsize:=tx86operand(operands[2]).opsize
+              else opsize:=tx86operand(operands[1]).opsize;
 
 
             if (MemRefSize in [msiMultipleMinSize128, msiMultipleMinSize256, msiMultipleMinSize512]) and
             if (MemRefSize in [msiMultipleMinSize128, msiMultipleMinSize256, msiMultipleMinSize512]) and
                (not(opsize in [S_XMM, S_YMM, S_ZMM])) then
                (not(opsize in [S_XMM, S_YMM, S_ZMM])) then