From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8008 invoked by alias); 30 Jun 2011 14:43:07 -0000 Received: (qmail 7999 invoked by uid 22791); 30 Jun 2011 14:43:06 -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-qw0-f47.google.com (HELO mail-qw0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Jun 2011 14:42:51 +0000 Received: by qwh5 with SMTP id 5so1306347qwh.20 for ; Thu, 30 Jun 2011 07:42:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.98.206 with SMTP id r14mr1649233qcn.18.1309444970623; Thu, 30 Jun 2011 07:42:50 -0700 (PDT) Received: by 10.229.214.83 with HTTP; Thu, 30 Jun 2011 07:42:50 -0700 (PDT) In-Reply-To: <4E0C8361.5050403@redhat.com> References: <20110625161357.GA5401@intel.com> <4E078E58.20903@redhat.com> <4E07A879.70509@redhat.com> <4E089A88.60401@redhat.com> <4E0C8361.5050403@redhat.com> Date: Thu, 30 Jun 2011 14:53: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/msg02355.txt.bz2 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. =A0It allows multiple unwind contexts. =A0It 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 >> >> _Unwind_Word reg[DWARF_FRAME_REGISTERS+1]; >> >> with a bigger unwind context. > > It doesn't seem cleaner to me. 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. --=20 H.J.