浏览代码

* OP_SUB must set always the flags in case of case

git-svn-id: trunk@5400 -
florian 18 年之前
父节点
当前提交
3f0dfdcba4
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 9 1
      compiler/arm/narmset.pas

+ 9 - 1
compiler/arm/narmset.pas

@@ -142,7 +142,9 @@ implementation
                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, opsize, OC_EQ,0,hregister,blocklabel(t^.blockid))
                   else
                     begin
+                      tcgarm(cg).cgsetflags:=true;
                       cg.a_op_const_reg(current_asmdata.CurrAsmList, OP_SUB, opsize, aint(t^._low-last), hregister);
+                      tcgarm(cg).cgsetflags:=false;
                       cg.a_jmp_flags(current_asmdata.CurrAsmList,F_EQ,blocklabel(t^.blockid));
                     end;
                   last:=t^._low;
@@ -157,7 +159,11 @@ implementation
                     begin
                        { have we to ajust the first value ? }
                        if (t^._low>get_min_value(left.resultdef)) then
-                         cg.a_op_const_reg(current_asmdata.CurrAsmList, OP_SUB, opsize, aint(t^._low), hregister);
+                         begin
+                           tcgarm(cg).cgsetflags:=true;
+                           cg.a_op_const_reg(current_asmdata.CurrAsmList, OP_SUB, opsize, aint(t^._low), hregister);
+                           tcgarm(cg).cgsetflags:=false;
+                         end;
                     end
                   else
                     begin
@@ -165,7 +171,9 @@ implementation
                       { present label then the lower limit can be checked    }
                       { immediately. else check the range in between:       }
 
+                      tcgarm(cg).cgsetflags:=true;
                       cg.a_op_const_reg(current_asmdata.CurrAsmList, OP_SUB, opsize, aint(t^._low-last), hregister);
+                      tcgarm(cg).cgsetflags:=false;
                       { no jump necessary here if the new range starts at }
                       { at the value following the previous one           }
                       if ((t^._low-last) <> 1) or