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 -
This commit is contained in:
Jeppe Johansen 2017-06-26 08:05:31 +00:00
parent a14b2fd80a
commit f3889a191b

View File

@ -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;