Tweak SysV_arm64 function entry unwind plan
ClosedPublic

Authored by labath on Wed, Jun 14, 3:16 AM.

Details

Summary

The motivation for this is to make sure the first row of the plan
compares equal to the first row of a generic debug_frame unwind plan.
Right now, the code in FuncUnwinders::GetUnwindPlanAtNonCallSite
considers them unequal because they specify the return address in a
different way (SetReturnAddressRegister(LR) vs. an explicit PC=LR rule).
This means that FuncUnwinders would always choose the debug_frame unwind
plan, which is not correct, as that one is usually not correct at all
locations.

Right now this is basically a noop because we don't have parse any
debug_frame plans, but it fixes some test failures when merging D33504
in.

I have to say I don't understand the full implications of the switch to
SetReturnAddressRegister() way of doing things, but given that all of
our other unwind plans (eh_frame, instruction profiling) do it this way,
it sounds like the right thing to do.

Diff Detail

Repository
rL LLVM
labath created this revision.Wed, Jun 14, 3:16 AM
tberghammer accepted this revision.Thu, Jun 15, 6:37 AM

Looks good

This revision is now accepted and ready to land.Thu, Jun 15, 6:37 AM
jasonmolenda accepted this revision.Thu, Jun 15, 3:45 PM

Looks good to me.

This revision was automatically updated to reflect the committed changes.