Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-08-03 Thread Jason Merrill
On 08/02/2011 06:27 PM, H.J. Lu wrote: Here is the updated patch. I updated REG_VALUE_IN_UNWIND_CONTEXT document and added ASSUME_EXTENDED_UNWIND_CONTEXT. OK for trunk? Let's say OK on Monday if nobody objects before then. Jason

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-08-02 Thread H.J. Lu
On Tue, Aug 2, 2011 at 2:02 PM, Jason Merrill wrote: > On 06/30/2011 04:47 PM, H.J. Lu wrote: >> >> +@defmac REG_VALUE_IN_UNWIND_CONTEXT >> + >> +Define this macro if the target stores register values as >> +@code{_Unwind_Word} type in unwind context.  The default is to >> +store register values a

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-08-02 Thread Jason Merrill
On 06/30/2011 04:47 PM, H.J. Lu wrote: +@defmac REG_VALUE_IN_UNWIND_CONTEXT + +Define this macro if the target stores register values as +@code{_Unwind_Word} type in unwind context. The default is to +store register values as @code{void *} type. + +@end defmac This ought to suggest why a port

Re: PING: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-08-02 Thread H.J. Lu
PING. On Thu, Jul 28, 2011 at 3:01 PM, H.J. Lu wrote: > Hi Richard, Jason, > > Is this patch > > http://gcc.gnu.org/ml/gcc-patches/2011-06/msg02401.html > > OK for trunk? > > Thanks. > > > H.J. > On Mon, Jul 11, 2011 at 3:21 PM, H.J. Lu wrote: >> Ping. >> >> On Wed, Jul 6, 2011 at 2:20 PM, H.J.

Re: PING: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-07-28 Thread H.J. Lu
Hi Richard, Jason, Is this patch http://gcc.gnu.org/ml/gcc-patches/2011-06/msg02401.html OK for trunk? Thanks. H.J. On Mon, Jul 11, 2011 at 3:21 PM, H.J. Lu wrote: > Ping. > > On Wed, Jul 6, 2011 at 2:20 PM, H.J. Lu wrote: >> PING. >> >> On Thu, Jun 30, 2011 at 1:47 PM, H.J. Lu wrote: >>>

Re: PING: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-07-11 Thread H.J. Lu
Ping. On Wed, Jul 6, 2011 at 2:20 PM, H.J. Lu wrote: > PING. > > On Thu, Jun 30, 2011 at 1:47 PM, H.J. Lu wrote: >> On Thu, Jun 30, 2011 at 12:02 PM, Richard Henderson wrote: >>> On 06/30/2011 11:23 AM, H.J. Lu wrote: +#ifdef REG_VALUE_IN_UNWIND_CONTEXT +typedef _Unwind_Word _Unwind_C

PING: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-07-06 Thread H.J. Lu
PING. On Thu, Jun 30, 2011 at 1:47 PM, H.J. Lu wrote: > On Thu, Jun 30, 2011 at 12:02 PM, Richard Henderson wrote: >> On 06/30/2011 11:23 AM, H.J. Lu wrote: >>> +#ifdef REG_VALUE_IN_UNWIND_CONTEXT >>> +typedef _Unwind_Word _Unwind_Context_Reg_Val; >>> +/* Signal frame context.  */ >>> +#define S

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-07-01 Thread H.J. Lu
On Fri, Jul 1, 2011 at 7:25 AM, Rainer Orth wrote: > "H.J. Lu" writes: > >>> Then move it below the definition of struct _Unwind_Context with a >> >> It won't work since I need to define a macro before struct _Unwind_Context. > > Then this does seem to be a case for libgcc_tm_file indeed.  Ugly

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-07-01 Thread Rainer Orth
"H.J. Lu" writes: >> Then move it below the definition of struct _Unwind_Context with a > > It won't work since I need to define a macro before struct _Unwind_Context. Then this does seem to be a case for libgcc_tm_file indeed. Ugly that the unwinder configuration has to be split between two di

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-07-01 Thread H.J. Lu
On Fri, Jul 1, 2011 at 7:02 AM, Rainer Orth wrote: > "H.J. Lu" writes: > What is your suggestion? >>> >>> How about moving the md-unwind-support.h include up to the rest of the >>> includes?  The headers usually only define MD_FALLBACK_FRAME_STATE_FOR >>> and perhaps MD_FROB_UPDATE_CONTEXT,

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-07-01 Thread Rainer Orth
"H.J. Lu" writes: >>> What is your suggestion? >> >> How about moving the md-unwind-support.h include up to the rest of the >> includes?  The headers usually only define MD_FALLBACK_FRAME_STATE_FOR >> and perhaps MD_FROB_UPDATE_CONTEXT, everything else is an internal >> helper macro, so order sho

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-07-01 Thread H.J. Lu
On Fri, Jul 1, 2011 at 6:37 AM, Rainer Orth wrote: > "H.J. Lu" writes: > >> On Fri, Jul 1, 2011 at 2:02 AM, Rainer Orth >> wrote: >>> "H.J. Lu" writes: >>> Here is the updated patch.  It works on simple tests. I am running full tests.  I kept config/i386/value-unwind.h since li

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-07-01 Thread Rainer Orth
"H.J. Lu" writes: > On Fri, Jul 1, 2011 at 2:02 AM, Rainer Orth > wrote: >> "H.J. Lu" writes: >> >>> Here is the updated patch.  It works on simple tests. >>> I am running full tests.  I kept config/i386/value-unwind.h >>> since libgcc/md-unwind-support.h is included too late >>> in unwind-dw2

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-07-01 Thread H.J. Lu
On Fri, Jul 1, 2011 at 2:02 AM, Rainer Orth wrote: > "H.J. Lu" writes: > >> Here is the updated patch.  It works on simple tests. >> I am running full tests.  I kept config/i386/value-unwind.h >> since libgcc/md-unwind-support.h is included too late >> in unwind-dw2.c and I don't want to move it

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-07-01 Thread Rainer Orth
"H.J. Lu" writes: > Here is the updated patch. It works on simple tests. > I am running full tests. I kept config/i386/value-unwind.h > since libgcc/md-unwind-support.h is included too late > in unwind-dw2.c and I don't want to move it to be on > the safe side. Oh please, don't pile hack upon

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-30 Thread H.J. Lu
On Thu, Jun 30, 2011 at 12:02 PM, Richard Henderson wrote: > On 06/30/2011 11:23 AM, H.J. Lu wrote: >> +#ifdef REG_VALUE_IN_UNWIND_CONTEXT >> +typedef _Unwind_Word _Unwind_Context_Reg_Val; >> +/* Signal frame context.  */ >> +#define SIGNAL_FRAME_BIT ((_Unwind_Word) 1 >> 0) > > There's absolutely

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-30 Thread H.J. Lu
On Thu, Jun 30, 2011 at 11:09 AM, Rainer Orth wrote: > "H.J. Lu" writes: > >>> Why all those contortions with i386/value-unwind.h?  It seems far >>> simpler to me to put this into libgcc/config/i386/linux-unwind.h and be >>> done with it. >> >> I did it this way so that other non-Linux x32 target

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-30 Thread Richard Henderson
On 06/30/2011 11:23 AM, H.J. Lu wrote: > +#ifdef REG_VALUE_IN_UNWIND_CONTEXT > +typedef _Unwind_Word _Unwind_Context_Reg_Val; > +/* Signal frame context. */ > +#define SIGNAL_FRAME_BIT ((_Unwind_Word) 1 >> 0) There's absolutely no reason to re-define this. So what if the value is most-significant

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-30 Thread H.J. Lu
On Thu, Jun 30, 2011 at 11:09 AM, Rainer Orth wrote: > "H.J. Lu" writes: > >>> Why all those contortions with i386/value-unwind.h?  It seems far >>> simpler to me to put this into libgcc/config/i386/linux-unwind.h and be >>> done with it. >> >> I did it this way so that other non-Linux x32 target

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-30 Thread Rainer Orth
"H.J. Lu" writes: >> Why all those contortions with i386/value-unwind.h?  It seems far >> simpler to me to put this into libgcc/config/i386/linux-unwind.h and be >> done with it. > > I did it this way so that other non-Linux x32 targets can use it. Such as? Currently, only Linux, Windows and So

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-30 Thread H.J. Lu
On Thu, Jun 30, 2011 at 11:03 AM, Rainer Orth wrote: > "H.J. Lu" writes: > >>> gcc/ >>> >>> 2011-06-30  H.J. Lu   >>> >>>        * config.gcc (libgcc_tm_file): Add i386/value-unwind.h for >>>        Linux/x86. >>> >>>        * system.h (REG_VALUE_IN_UNWIND_CONTEXT): Poisoned. >>> >>>        * unw

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-30 Thread Rainer Orth
"H.J. Lu" writes: >> gcc/ >> >> 2011-06-30  H.J. Lu   >> >>        * config.gcc (libgcc_tm_file): Add i386/value-unwind.h for >>        Linux/x86. >> >>        * system.h (REG_VALUE_IN_UNWIND_CONTEXT): Poisoned. >> >>        * unwind-dw2.c (_Unwind_Context_Reg_Val): New. >>        (_Unwind_Get_Un

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-30 Thread H.J. Lu
On Thu, Jun 30, 2011 at 10:37 AM, H.J. Lu wrote: > On Thu, Jun 30, 2011 at 9:08 AM, H.J. Lu wrote: >> On Thu, Jun 30, 2011 at 8:03 AM, Jason Merrill wrote: >>> On 06/30/2011 10:42 AM, H.J. Lu wrote: Register may be saved/restored either by address or value. My patch doesn't change

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-30 Thread H.J. Lu
On Thu, Jun 30, 2011 at 9:08 AM, H.J. Lu wrote: > On Thu, Jun 30, 2011 at 8:03 AM, Jason Merrill wrote: >> On 06/30/2011 10:42 AM, H.J. Lu wrote: >>> >>> Register may be saved/restored either by address or value. My patch >>> doesn't change the reg field.  The other way will be >>> >>> #ifdef USE

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-30 Thread H.J. Lu
On Thu, Jun 30, 2011 at 8:03 AM, Jason Merrill wrote: > On 06/30/2011 10:42 AM, H.J. Lu wrote: >> >> Register may be saved/restored either by address or value. My patch >> doesn't change the reg field.  The other way will be >> >> #ifdef USE_UNWIND_WORD >>     _Unwind_Word reg[DWARF_FRAME_REGISTER

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-30 Thread Jason Merrill
On 06/30/2011 10:42 AM, H.J. Lu wrote: Register may be saved/restored either by address or value. My patch doesn't change the reg field. The other way will be #ifdef USE_UNWIND_WORD _Unwind_Word reg[DWARF_FRAME_REGISTERS+1]; #else void *reg[DWARF_FRAME_REGISTERS+1]; #endif We need i

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-30 Thread H.J. Lu
On Thu, Jun 30, 2011 at 7:08 AM, Jason Merrill wrote: > On 06/28/2011 02:53 PM, H.J. Lu wrote: >> >> This updated patch.  It allows multiple unwind contexts.  It replaces >> >> char by_value[DWARF_FRAME_REGISTERS+1]; >> >> with >> >> _Unwind_Word value[DWARF_FRAME_REGISTERS+1]; >> >> The code is c

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-30 Thread Jason Merrill
On 06/28/2011 02:53 PM, H.J. Lu wrote: This updated patch. It allows multiple unwind contexts. It replaces char by_value[DWARF_FRAME_REGISTERS+1]; with _Unwind_Word value[DWARF_FRAME_REGISTERS+1]; The code is cleaner than conditionally replacing void *reg[DWARF_FRAME_REGISTERS+1]; with _

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-28 Thread H.J. Lu
On Mon, Jun 27, 2011 at 7:58 AM, Jason Merrill wrote: > On 06/26/2011 05:58 PM, H.J. Lu wrote: >> >> The current unwind library scheme provides only one unwind >> context and is backward compatible with multiple different unwind >> contexts from multiple unwind libraries: >> >> http://gcc.gnu.org/

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-27 Thread Jason Merrill
On 06/26/2011 05:58 PM, H.J. Lu wrote: The current unwind library scheme provides only one unwind context and is backward compatible with multiple different unwind contexts from multiple unwind libraries: http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01769.html My patch fixes UNITS_PER_WORD > si

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-26 Thread H.J. Lu
On Sun, Jun 26, 2011 at 2:45 PM, Jason Merrill wrote: > On 06/26/2011 04:06 PM, H.J. Lu wrote: >> >> I added a short paragraph in the updated patch: >> >> +@defmac UNIQUE_UNWIND_CONTEXT >> + >> +Define this macro if the target only supports single unqiue unwind >> +context.  The default is to supp

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-26 Thread Jason Merrill
On 06/26/2011 04:06 PM, H.J. Lu wrote: I added a short paragraph in the updated patch: +@defmac UNIQUE_UNWIND_CONTEXT + +Define this macro if the target only supports single unqiue unwind +context. The default is to support multiple unwind contexts. I saw that. I don't know what it means. J

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-26 Thread H.J. Lu
On Sun, Jun 26, 2011 at 12:54 PM, Jason Merrill wrote: > On 06/25/2011 12:13 PM, H.J. Lu wrote: >> >> This patch introduces UNIQUE_UNWIND_CONTEXT > > Where is this documented?  The ABI document doesn't seem to say anything > about it. > I added a short paragraph in the updated patch: http://gcc.

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-26 Thread Jason Merrill
On 06/25/2011 12:13 PM, H.J. Lu wrote: This patch introduces UNIQUE_UNWIND_CONTEXT Where is this documented? The ABI document doesn't seem to say anything about it. Jason

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-25 Thread H.J. Lu
On Sat, Jun 25, 2011 at 1:19 PM, Joseph S. Myers wrote: > On Sat, 25 Jun 2011, H.J. Lu wrote: > >> +#ifndef UNIQUE_UNWIND_CONTEXT > > The use of #ifndef seems to imply that this is a target macro, to be > defined in libgcc_tm.h.  In that case it should be documented, and > poisoned in system.h und

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-25 Thread Joseph S. Myers
On Sat, 25 Jun 2011, H.J. Lu wrote: > +#ifndef UNIQUE_UNWIND_CONTEXT The use of #ifndef seems to imply that this is a target macro, to be defined in libgcc_tm.h. In that case it should be documented, and poisoned in system.h under the "only used for code built for the target" case, and this:

PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-25 Thread H.J. Lu
Hi, This patch introduces UNIQUE_UNWIND_CONTEXT and properly saves/stores registers with UNITS_PER_WORD > sizeof (void *) as suggested in http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01526.html OK for trunk? Thanks. H.J. --- 2011-04-09 H.J. Lu PR other/48007 * unwind-dw2.c