Explorar el Código

* more MustBeLast fixes
* const insertation algorithm fixed

git-svn-id: trunk@6337 -

florian hace 18 años
padre
commit
3609ddc5dd
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 1 1
      compiler/arm/aasmcpu.pas
  2. 2 2
      compiler/arm/aoptcpu.pas

+ 1 - 1
compiler/arm/aasmcpu.pas

@@ -709,7 +709,7 @@ implementation
               (taicpu(curtai.next).oper[0]^.reg=NR_PC) then
               (taicpu(curtai.next).oper[0]^.reg=NR_PC) then
               begin
               begin
                 penalty:=1;
                 penalty:=1;
-                hp:=tai(curtai.next);
+                hp:=tai(curtai.next.next);
                 while assigned(hp) and (hp.typ=ait_const) do
                 while assigned(hp) and (hp.typ=ait_const) do
                   begin
                   begin
                     inc(penalty);
                     inc(penalty);

+ 2 - 2
compiler/arm/aoptcpu.pas

@@ -98,8 +98,8 @@ Implementation
   function MustBeLast(p : tai) : boolean;
   function MustBeLast(p : tai) : boolean;
     begin
     begin
       Result:=(p.typ=ait_instruction) and
       Result:=(p.typ=ait_instruction) and
-        ((taicpu(p).opcode in [A_BL,A_BLX,A_CMP,A_CMN,A_SWI,A_TEQ,A_TST]) or
-         ((taicpu(p).opcode=A_MOV) and (taicpu(p).oper[0]^.typ=top_reg) and (taicpu(p).oper[0]^.reg=NR_PC)) or
+        ((taicpu(p).opcode in [A_BL,A_BLX,A_CMP,A_CMN,A_SWI,A_TEQ,A_TST,A_CMF,A_CMFE,A_MSR]) or
+         ((taicpu(p).ops>=1) and (taicpu(p).oper[0]^.typ=top_reg) and (taicpu(p).oper[0]^.reg=NR_PC)) or
          (taicpu(p).oppostfix=PF_S));
          (taicpu(p).oppostfix=PF_S));
     end;
     end;