mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 08:46:09 +02:00
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:
parent
a14b2fd80a
commit
f3889a191b
@ -4947,7 +4947,7 @@ unit cgcpu;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if regs=[] then
|
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
|
else
|
||||||
begin
|
begin
|
||||||
reference_reset(ref,4,[]);
|
reference_reset(ref,4,[]);
|
||||||
@ -4957,7 +4957,7 @@ unit cgcpu;
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
list.concat(taicpu.op_reg_reg(A_MOV,NR_PC,NR_R14));
|
list.concat(taicpu.op_reg(A_BX,NR_R14));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user