소스 검색

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

git-svn-id: trunk@32057 -
nickysn 10 년 전
부모
커밋
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
                     (right.location.loc=LOC_CONSTANT) 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
                     emit_reg(A_INC,TCGSize2Opsize[opsize],left.location.register);
                   end