Bläddra i källkod

* don't split indirect calls while inserting pc relative constants

florian 20 år sedan
förälder
incheckning
f3df72d1b1
1 ändrade filer med 16 tillägg och 2 borttagningar
  1. 16 2
      compiler/arm/aasmcpu.pas

+ 16 - 2
compiler/arm/aasmcpu.pas

@@ -487,7 +487,18 @@ implementation
                 inc(curpos);
               end;
 
-            if (curpos-lastpos)>1020 then
+            if ((curpos-lastpos)>1016) and
+              (
+                { don't splitt loads of pc to lr and the following move }
+                not(
+                    (curtai.typ=ait_instruction) and
+                    (taicpu(curtai).opcode=A_MOV) and
+                    (taicpu(curtai).oper[0]^.typ=top_reg) and
+                    (taicpu(curtai).oper[0]^.reg=NR_R14) and
+                    (taicpu(curtai).oper[0]^.typ=top_reg) and
+                    (taicpu(curtai).oper[1]^.reg=NR_PC)
+                   )
+              ) then
               begin
                 lastpos:=curpos;
                 hp:=tai(curtai.next);
@@ -507,7 +518,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.39  2005-02-15 19:53:41  florian
+  Revision 1.40  2005-02-15 21:24:40  florian
+    * don't split indirect calls while inserting pc relative constants
+
+  Revision 1.39  2005/02/15 19:53:41  florian
     * don't generate overflow results if they aren't necessary
     * fixed op_reg_reg_reg_reg on arm