From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6479 invoked by alias); 30 Jun 2011 16:08:18 -0000 Received: (qmail 6464 invoked by uid 22791); 30 Jun 2011 16:08:17 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-qy0-f182.google.com (HELO mail-qy0-f182.google.com) (209.85.216.182) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Jun 2011 16:08:02 +0000 Received: by qyk38 with SMTP id 38so1441419qyk.20 for ; Thu, 30 Jun 2011 09:08:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.98.206 with SMTP id r14mr1741211qcn.18.1309450080997; Thu, 30 Jun 2011 09:08:00 -0700 (PDT) Received: by 10.229.214.83 with HTTP; Thu, 30 Jun 2011 09:08:00 -0700 (PDT) In-Reply-To: <4E0C904E.8090504@redhat.com> References: <20110625161357.GA5401@intel.com> <4E078E58.20903@redhat.com> <4E07A879.70509@redhat.com> <4E089A88.60401@redhat.com> <4E0C8361.5050403@redhat.com> <4E0C904E.8090504@redhat.com> Date: Thu, 30 Jun 2011 16:36:00 -0000 Message-ID: Subject: Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *) From: "H.J. Lu" To: Jason Merrill Cc: gcc-patches@gcc.gnu.org, Richard Henderson , Jakub Jelinek Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg02371.txt.bz2 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. =A0The other way will be >> >> #ifdef USE_UNWIND_WORD >> =A0 =A0 _Unwind_Word reg[DWARF_FRAME_REGISTERS+1]; >> #else >> =A0 =A0 =A0void *reg[DWARF_FRAME_REGISTERS+1]; >> #endif >> >> We need it so that we are binary compatible with the existing >> unwind context. =A0Once 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. = =A0And > 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. --=20 H.J.