Pārlūkot izejas kodu

Fixed postfix check in taicpu.is_same_reg_move

The old version did not check the S-Postfix for MOV, which results in
removing instructions like:

movs r0, r0

which breaks later flag usage.

git-svn-id: trunk@21676 -
masta 13 gadi atpakaļ
vecāks
revīzija
aeb15ba2b6
1 mainītis faili ar 5 papildinājumiem un 3 dzēšanām
  1. 5 3
      compiler/arm/aasmcpu.pas

+ 5 - 3
compiler/arm/aasmcpu.pas

@@ -567,10 +567,12 @@ implementation
     function taicpu.is_same_reg_move(regtype: Tregistertype):boolean;
       begin
         { allow the register allocator to remove unnecessary moves }
-        result:=(((opcode=A_MOV) and (regtype = R_INTREGISTER)) or
-                 ((opcode=A_MVF) and (regtype = R_FPUREGISTER) and (oppostfix in [PF_None,PF_D])) or
-                 (((opcode=A_FCPYS) or (opcode=A_FCPYD)) and (regtype = R_MMREGISTER))
+        result:=(
+                  ((opcode=A_MOV) and (regtype = R_INTREGISTER)) or
+                  ((opcode=A_MVF) and (regtype = R_FPUREGISTER)) or
+                  ((opcode in [A_FCPYS, A_FCPYD]) and (regtype = R_MMREGISTER))
                 ) and
+                (oppostfix in [PF_None,PF_D]) and
                 (condition=C_None) and
                 (ops=2) and
                 (oper[0]^.typ=top_reg) and