Bläddra i källkod

Generate bx lr exit instruction in Thumb-2 instead of mov pc,lr as bx lr will trigger an exception return but mov doesn't.

git-svn-id: trunk@36597 -
Jeppe Johansen 8 år sedan
förälder
incheckning
f3889a191b
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      compiler/arm/cgcpu.pas

+ 2 - 2
compiler/arm/cgcpu.pas

@@ -4947,7 +4947,7 @@ unit cgcpu;
               end;
 
             if regs=[] then
-              list.concat(taicpu.op_reg_reg(A_MOV,NR_R15,NR_R14))
+              list.concat(taicpu.op_reg(A_BX,NR_R14))
             else
               begin
                 reference_reset(ref,4,[]);
@@ -4957,7 +4957,7 @@ unit cgcpu;
               end;
           end
         else
-          list.concat(taicpu.op_reg_reg(A_MOV,NR_PC,NR_R14));
+          list.concat(taicpu.op_reg(A_BX,NR_R14));
       end;