From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19746 invoked by alias); 7 Mar 2011 00:15:54 -0000 Received: (qmail 19734 invoked by uid 22791); 7 Mar 2011 00:15:50 -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-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Mar 2011 00:15:46 +0000 Received: by iyb26 with SMTP id 26so4511912iyb.20 for ; Sun, 06 Mar 2011 16:15:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.156.2 with SMTP id x2mr4004295icw.310.1299456943498; Sun, 06 Mar 2011 16:15:43 -0800 (PST) Received: by 10.42.145.136 with HTTP; Sun, 6 Mar 2011 16:15:43 -0800 (PST) In-Reply-To: References: <20110306171830.GA18591@intel.com> Date: Mon, 07 Mar 2011 00:15:00 -0000 Message-ID: Subject: Re: PATCH: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *) From: "H.J. Lu" To: Richard Guenther Cc: Andrew Pinski , GCC Patches 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-03/txt/msg00286.txt.bz2 On Sun, Mar 6, 2011 at 3:40 PM, H.J. Lu wrote: > On Sun, Mar 6, 2011 at 3:23 PM, Richard Guenther > wrote: >> On Sun, Mar 6, 2011 at 10:28 PM, H.J. Lu wrote: >>> On Sun, Mar 6, 2011 at 1:15 PM, Andrew Pinski wrote: >>>> On Sun, Mar 6, 2011 at 9:18 AM, H.J. Lu wrote: >>>>> Hi, >>>>> >>>>> We shouldn't save call frame hard registers as "void *". =A0This patch >>>>> changes the unwind library to save call frame hard registers as >>>>> _Unwind_Word. =A0OK for 4.7? >>>> >>>> I think this will break the ABI for the MIPS N32 ABI. =A0Not to mention >>>> the MIPS N32 ABI works fine with the unwinding part this way. =A0Does >>>> someone use the unwinding library to look at the registers in previous >>>> stack frames? >>> >>> It may be psABI/implementation specific. =A0X32 glibc force unwind calls >>> _Unwind_SetGRValue to get a 64bit register value. >> >> So fix it on that side? >> > > How? One function in question is > > /* Overwrite the saved value for register INDEX in CONTEXT with VAL. =A0*/ > > static inline void > _Unwind_SetGRValue (struct _Unwind_Context *context, int index, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0_Unwind_Word val) > > > Are you saying it shouldn't be called if UNITS_PER_WORD > sizeof (void *)? > FWIW, the type of GR is _Unwind_Word, not void *. They may not have the same size. Why does the DWARF unwind library use void * to store GR? Can a target have an option to save a _Unwind_Word value in _Unwind_Word, instead of void *? Thanks. --=20 H.J.