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 as @code{void *} type. >> + >> +@end defmac > > This ought to suggest why a port would need to do this, namely if registers > can be larger than void*. > >> +#ifdef REG_VALUE_IN_UNWIND_CONTEXT >> +typedef _Unwind_Word _Unwind_Context_Reg_Val; >> + >> +#define _Unwind_IsExtendedContext(c) 1 > > I still think that assuming extended context should be a separate target > macro which is implied by REG_VALUE_IN_UNWIND_CONTEXT, but can also be > defined separately by new ports. > > Otherwise it looks good to me. > > Jason > Here is the updated patch. I updated REG_VALUE_IN_UNWIND_CONTEXT document and added ASSUME_EXTENDED_UNWIND_CONTEXT. OK for trunk? Thanks. -- H.J. -gcc/ 2011-08-02 H.J. Lu * config.gcc (libgcc_tm_file): Add i386/value-unwind.h for Linux/x86. * system.h (REG_VALUE_IN_UNWIND_CONTEXT): Poisoned. (ASSUME_EXTENDED_UNWIND_CONTEXT): Likewise. * unwind-dw2.c (ASSUME_EXTENDED_UNWIND_CONTEXT): New. (_Unwind_Context_Reg_Val): Likewise. (_Unwind_Get_Unwind_Word): Likewise. (_Unwind_Get_Unwind_Context_Reg_Val): Likewise. (_Unwind_Context): Use _Unwind_Context_Reg_Val on the reg field. (_Unwind_IsExtendedContext): Check ASSUME_EXTENDED_UNWIND_CONTEXT for EXTENDED_CONTEXT_BIT. (__frame_state_for): Likewise. (uw_init_context_1): Likewise. (_Unwind_GetGR): Updated. (_Unwind_SetGR): Likewise. (_Unwind_GetGRPtr): Likewise. (_Unwind_SetGRPtr): Likewise. (_Unwind_SetGRValue): Likewise. (_Unwind_GRByValue): Likewise. (uw_install_context_1): Likewise. * doc/tm.texi.in: Document REG_VALUE_IN_UNWIND_CONTEXT and ASSUME_EXTENDED_UNWIND_CONTEXT. * doc/tm.texi: Regenerated. libgcc/ 2011-08-02 H.J. Lu * config/i386/value-unwind.h: New. ---