[PATCH] PR8541; X86: Handle unwind.init and eh.return intrinsics.
Pasi Parviainen
pasi.parviainen at iki.fi
Tue May 14 15:14:20 PDT 2013
On 14.5.2013 21:06, Jakob Stoklund Olesen wrote:
>
> On Apr 20, 2013, at 1:43 AM, Pasi Parviainen <pasi.parviainen at iki.fi> wrote:
>
>> Hi,
>>
>> First patch addresses the problem in PR8541. It forces spilling of affected registers to stack when unwind.init and eh.return intrinsics are encountered.
>>
>> Second patch is additional patch which relaxes the requirement of frame pointer in functions with eh.return.
>>
>> Pasi
>
> Hi Pasi,
>
> It looks like you actually know what eh.return is supposed to do. Could you explain, please?
It is a terminator intrinsic which purpose is to return control flow
from a unwinder (libgcc_s) back to a landingpad. For this it needs to
provide exception information through registers for the landingpad.
These registers must be spilled to stack slots in a prologue and
restored only in epilogues containing eh.return intrinsic.
> Would it make sense to do this in target-independent code, like PrologEpilogInserter?
Not so sure about this; it could make sense to unify handling of these
exception registers across targets, on the other hand it is pretty
special purpose intrinsic used to implement unwinder and as far as I
know libgcc_s is the only user.
It would make much more sense to handle unwind.init intrinsic in
PrologEpilogInserter, since it ensures that all callee saved registers
are spilled to a stack.
Pasi.
> /jakob
>
More information about the llvm-commits
mailing list