瀏覽代碼

16bit Thumb is not able to use tst with an immediate value

r28315 introduced an arm optimization which requires
  tst rX, #imm
to work. This is not available on 16bit thumb, I've disabled that
optimization on thumb for now.

git-svn-id: trunk@28360 -
masta 11 年之前
父節點
當前提交
96915b3f0c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      compiler/arm/narmadd.pas

+ 1 - 1
compiler/arm/narmadd.pas

@@ -416,7 +416,7 @@ interface
         if (right.nodetype=ordconstn) and
         if (right.nodetype=ordconstn) and
            (tordconstnode(right).value=0) and
            (tordconstnode(right).value=0) and
            ((nodetype in [equaln,unequaln]) or
            ((nodetype in [equaln,unequaln]) or
-            (is_signed(left.resultdef) and (nodetype = lt_zero_swapped[nf_swapped in Flags]))
+            (not(GenerateThumbCode) and is_signed(left.resultdef) and (nodetype = lt_zero_swapped[nf_swapped in Flags]))
            ) then
            ) then
           begin
           begin
             location_reset(location,LOC_FLAGS,OS_NO);
             location_reset(location,LOC_FLAGS,OS_NO);