From: "H.J. Lu" <hjl.tools@gmail.com>
To: Ian Lance Taylor <iant@google.com>
Cc: Ulrich Weigand <uweigand@de.ibm.com>,
Andrew Pinski <pinskia@gmail.com>,
Jakub Jelinek <jakub@redhat.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: PATCH: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)
Date: Wed, 23 Mar 2011 05:01:00 -0000 [thread overview]
Message-ID: <AANLkTik_TUCL1X-MjL5C+wSyoMNwpYTC=mYSVeujNyL7@mail.gmail.com> (raw)
In-Reply-To: <mcrtyeuo2v7.fsf@google.com>
On Tue, Mar 22, 2011 at 9:52 PM, Ian Lance Taylor <iant@google.com> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>>> This suggests that, at least, when sizeof(_Unwind_Word) > sizeof(void*),
>>> we need to extend _Unwind_Context with a new array at the end, and use
>>> that new array when by_value[REG] is true.
>>
>> Will there be a case where 2 copies of unwind-dw2.c are within the same
>> process?
>
> Sure, that's easy. I think what you are really asking is: will there be
> a case where we could call functions from one copy and then pass the
> context to the functions from a different copy. I don't know the answer
> to that, but it doesn't seem impossible.
>
Then. will this be acceptable?
Thanks.
--
H.J.
---
#ifndef UNWIND_REGISTER_AS_UNION
#if defined __x86_64 && !defined __LP64__
# define UNWIND_REGISTER_AS_UNION
#endif
#endif
#ifdef UNWIND_REGISTER_AS_UNION
typedef union
{
void *ref;
_Unwind_Word val;
} _Unwind_Register;
# define UNWIND_REGISTER_GET_VAL_FROM_REF(TYPE, REG) \
* (TYPE *) (REG).ref
# define UNWIND_REGISTER_SET_VAL(INDEX, VAL) \
context->reg[INDEX].val = (VAL)
# define UNWIND_REGISTER_GET_REF(INDEX) \
context->reg[INDEX].ref
# define UNWIND_REGISTER_GET_REF_FROM_VAL(INDEX) \
&context->reg[INDEX].val
#else
typedef void *_Unwind_Register;
# define UNWIND_REGISTER_GET_VAL_FROM_REF(TYPE, REG) \
* (TYPE *) (REG)
# define UNWIND_REGISTER_SET_VAL(INDEX, VAL) \
context->reg[INDEX] = (void *) (_Unwind_Internal_Ptr) (VAL)
# define UNWIND_REGISTER_GET_REF(INDEX) \
context->reg[INDEX]
# define UNWIND_REGISTER_GET_REF_FROM_VAL(INDEX) \
&context->reg[INDEX]
#endif
/* This is the register and unwind state for a particular frame. This
provides the information necessary to unwind up past a frame and return
to its caller. */
struct _Unwind_Context
{
_Unwind_Register reg[DWARF_FRAME_REGISTERS+1];
void *cfa;
next prev parent reply other threads:[~2011-03-23 5:01 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-06 17:18 H.J. Lu
2011-03-06 21:15 ` Andrew Pinski
2011-03-06 21:28 ` H.J. Lu
2011-03-06 23:23 ` Richard Guenther
2011-03-06 23:40 ` H.J. Lu
2011-03-07 0:15 ` H.J. Lu
2011-03-14 17:49 ` H.J. Lu
2011-03-21 21:56 ` Ian Lance Taylor
2011-03-22 4:19 ` H.J. Lu
2011-03-22 6:32 ` Ian Lance Taylor
2011-03-22 15:19 ` Ulrich Weigand
2011-03-22 15:41 ` Jakub Jelinek
2011-03-22 16:42 ` Ian Lance Taylor
2011-03-22 16:52 ` Andrew Pinski
2011-03-22 18:58 ` Ian Lance Taylor
2011-03-22 19:30 ` Ulrich Weigand
2011-03-22 22:18 ` Ian Lance Taylor
2011-03-23 3:25 ` H.J. Lu
2011-03-23 4:53 ` Ian Lance Taylor
2011-03-23 5:01 ` H.J. Lu [this message]
2011-03-23 13:58 ` Ian Lance Taylor
2011-03-23 17:50 ` Richard Henderson
2011-03-23 18:04 ` Jakub Jelinek
2011-03-23 18:20 ` Richard Henderson
2011-03-23 18:24 ` H.J. Lu
2011-03-23 18:27 ` Richard Henderson
2011-03-23 18:37 ` Jakub Jelinek
2011-03-23 19:01 ` Richard Henderson
2011-03-23 19:17 ` Jakub Jelinek
2011-03-23 19:22 ` Ulrich Weigand
2011-03-24 7:15 ` H.J. Lu
2011-04-10 1:52 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTik_TUCL1X-MjL5C+wSyoMNwpYTC=mYSVeujNyL7@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=iant@google.com \
--cc=jakub@redhat.com \
--cc=pinskia@gmail.com \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).