On Thu, Jun 30, 2011 at 8:03 AM, Jason Merrill <ja...@redhat.com> 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_REGISTERS+1]; >> #else >> void *reg[DWARF_FRAME_REGISTERS+1]; >> #endif >> >> We need it so that we are binary compatible with the existing >> unwind context. Once we do that we need many >> >> #ifdef USE_UNWIND_WORD >> #endif >> >> whenever the reg field is accessed since the reg field is changed. > > But your patch already changes all but one place where reg is accessed. And > we can avoid lots of ifdefs by abstraction with macros/inlines so there's > one interface.
I can do that. > Also, why change SIGNAL_FRAME_BIT? > The current one is /* Signal frame context. */ #define SIGNAL_FRAME_BIT ((~(_Unwind_Word) 0 >> 1) + 1) It is defined such a strange way to be binary backward compatible. Since there is no such a problem with if REG_VALUE_IN_UNWIND_CONTEXT is defined, I simply define it as /* Signal frame context. */ #define SIGNAL_FRAME_BIT ((_Unwind_Word) 1 >> 0) Thanks. -- H.J.