[PATCH] libc++abi: Don't push the unwind_exception to r12 in _gxx_personality_v0.

Dana Jansens danakj at google.com
Thu May 29 17:53:47 PDT 2014


On Thu, May 29, 2014 at 8:27 PM, Jonathan Roelofs <jonathan at codesourcery.com
> wrote:

>
>
> On 5/28/14, 9:08 AM, Dana Jansens wrote:
>
>> -    // Copy the address of _Unwind_Control_Block to r12 so that _Unwind_
>> GetLangauageSpecificData()
>> -    // and _Unwind_GetRegionStart() can return correct address.
>> -    _Unwind_SetGR(context, REG_UCB, reinterpret_cast<uint32_t>(
>> unwind_exception));
>
>
Hey! Thanks for the pointers.


> libgcc does in fact need us to pass the UCB in r12. See:
> gcc-trunk-4.8/libgcc/arm/pr-support.c.
>

It looks like we only need to call these methods on !ARM EHABI from our own
libc++abi personality function. So I'm going to move them into that #if,
along with the register setting, and avoided calling either method on ARM
EHABI.


>
> We should probably keep this, but put it under LIBCXXABI_USE_GLIBC for
> when using libgcc's unwinder with libc++abi, as our unwinder implementation
> doesn't do it that way.
>

I think our local LIBCXXABI_USE_GLIBC is a mis-nomer and it's going to go
away. We probably want to pull our unwind library out of libc++abi so that
we can drop in GCC's if desired. It seems like our libc++abi shouldn't
necessarily know what unwinder it will be using at compile time, but should
just work with whichever gets used?

However, for now we aren't passing the needed data to the personality
function on EHABI yet upstream so we need to keep calling these _Unwind
methods there still also. So I'm going to hold off on this patch until we
upstream some other dependent pieces for this to make more sense.

Thanks!
- Dana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140530/19abc081/attachment.html>


More information about the cfe-commits mailing list