Browse Source

* proper fix for rev. 4097.

git-svn-id: trunk@4099 -
yury 19 years ago
parent
commit
0c396ad3da
1 changed files with 6 additions and 2 deletions
  1. 6 2
      compiler/arm/cgcpu.pas

+ 6 - 2
compiler/arm/cgcpu.pas

@@ -1653,14 +1653,18 @@ unit cgcpu;
                      (torddef(def).typ in [u64bit,u16bit,u32bit,u8bit,uchar,bool8bit,bool16bit,bool32bit]))) then
                  ai.SetCondition(C_VC)
               else
-                 ai.SetCondition(C_CS);
+                if TAiCpu(List.Last).opcode in [A_RSB,A_RSC,A_SBC,A_SUB] then
+                  ai.SetCondition(C_CS)
+                else
+                  ai.SetCondition(C_CC);
 
               list.concat(ai);
             end;
           LOC_FLAGS:
             begin
               hflags:=ovloc.resflags;
-              inverse_flags(hflags);
+              if not (hflags in [F_CS,F_CC]) then
+                inverse_flags(hflags);
               cg.a_jmp_flags(list,hflags,hl);
             end;
           else