[PATCH] Make PrologEpilogInserter save/restore all callee saved registers in functions which call __builtin_unwind_init()

Derek Schuff dschuff at google.com
Fri Jun 14 09:25:55 PDT 2013


thanks, committed in r183984


On Thu, Jun 13, 2013 at 6:31 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:

>
> On Jun 13, 2013, at 2:09 PM, Derek Schuff <dschuff at google.com> wrote:
>
> > Attached is a patch which makes PEI::calculateCalleeSavedRegisters
> save/restore all callee saved registers (even those which are not used) in
> functions which call __builtin_unwind_init().
> > __builtin_unwind_init() is an undocumented gcc intrinsic which has this
> effect, and is used in libgcc_eh.
> >
> > This should fix PR8541.
> >
> > I say "should" because I haven't yet investigated all the relevant
> details of __builtin_eh_return, but it does fix some problems that we have
> seen which are similar to that described in the bug.
> > <csr_unwind.diff>
>
> LGTM, thanks.
>
> We still have some issues with our handling of eh_return. The extra two
> registers must be restored by eh_return, but must not be restored by a
> normal return. We are currently restoring them unconditionally.
>
> Search the llvm-commits archives for a patch by Pasi (CCed).
>
> /jakob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130614/e22ac87a/attachment.html>


More information about the llvm-commits mailing list