浏览代码

* fixed access violation bug in TX86AsmOptimizer.RegLoadedWithNewValue for the
A_MOVSD string instruction

git-svn-id: trunk@35995 -

nickysn 8 年之前
父节点
当前提交
66c350d8d2
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      compiler/x86/aoptx86.pas

+ 1 - 0
compiler/x86/aoptx86.pas

@@ -425,6 +425,7 @@ unit aoptx86;
             (p.opcode = A_MOVQ) or
             (p.opcode = A_MOVAPD) or
             (p.opcode = A_MOVAPS)) and
+           (p.ops=2) and  { A_MOVSD can have zero operands, so this check is needed }
            (p.oper[1]^.typ = top_reg) and
            (SuperRegistersEqual(p.oper[1]^.reg,reg)) and
            ((p.oper[0]^.typ = top_const) or