mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-19 02:31:42 +02:00
* fixed crashes when combining -Cg with -g or -pg due to a missing
restore of lr in leaf procedures in that case (Darwin-only) git-svn-id: trunk@8675 -
This commit is contained in:
parent
993ec01a76
commit
b9752680a5
@ -183,7 +183,11 @@ unit cgppc;
|
||||
a_label(list,current_procinfo.CurrGOTLabel);
|
||||
a_reg_alloc(list,current_procinfo.got);
|
||||
list.concat(taicpu.op_reg_reg(A_MFSPR,current_procinfo.got,NR_LR));
|
||||
if not savedlr then
|
||||
if not savedlr or
|
||||
{ in the following case lr is saved, but not restored }
|
||||
{ (happens e.g. when generating debug info for leaf }
|
||||
{ procedures) }
|
||||
not(pi_do_call in current_procinfo.flags) then
|
||||
list.concat(taicpu.op_reg_reg(A_MTSPR,NR_LR,NR_R0));
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user