Kaynağa Gözat

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

git-svn-id: branches/tg74/avx512-0037785@47865 -
tg74 4 yıl önce
ebeveyn
işleme
e98771608e
1 değiştirilmiş dosya ile 5 ekleme ve 2 silme
  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
             // e.g. vcvtsi2sd, vcvtsi2ss, vcvtusi2sd, vcvtusi2ss,
             //      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
                (not(opsize in [S_XMM, S_YMM, S_ZMM])) then