瀏覽代碼

* check UseIncDec before generating an INC instruction in tx86addnode.emit_generic_code

git-svn-id: trunk@32057 -
nickysn 9 年之前
父節點
當前提交
457107d165
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      compiler/x86/nx86add.pas

+ 2 - 1
compiler/x86/nx86add.pas

@@ -146,7 +146,8 @@ unit nx86add;
                  if (op=A_ADD) and
                  if (op=A_ADD) and
                     (right.location.loc=LOC_CONSTANT) and
                     (right.location.loc=LOC_CONSTANT) and
                     (right.location.value=1) and
                     (right.location.value=1) and
-                    not(cs_check_overflow in current_settings.localswitches) then
+                    not(cs_check_overflow in current_settings.localswitches) and
+                    UseIncDec then
                   begin
                   begin
                     emit_reg(A_INC,TCGSize2Opsize[opsize],left.location.register);
                     emit_reg(A_INC,TCGSize2Opsize[opsize],left.location.register);
                   end
                   end