From owner-freebsd-ppc@freebsd.org Sun Mar 6 08:19:46 2016 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 028029DA3FA for ; Sun, 6 Mar 2016 08:19:46 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-2.reflexion.net [208.70.210.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB3F3305 for ; Sun, 6 Mar 2016 08:19:45 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 12510 invoked from network); 6 Mar 2016 08:20:02 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 6 Mar 2016 08:20:02 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v7.80.0) with SMTP; Sun, 06 Mar 2016 03:19:47 -0500 (EST) Received: (qmail 5983 invoked from network); 6 Mar 2016 08:19:47 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 6 Mar 2016 08:19:47 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 58D181C43D7; Sun, 6 Mar 2016 00:19:43 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: 207732 submitted: libgcc_s .eh_frame handling messes up interpreting powerpc/powerpc64 frame pointer register use produced by clang 3.8.0 [I was wrong] From: Mark Millard In-Reply-To: <7BC7F7FF-FF5C-4BE9-875C-6997BC194295@dsl-only.net> Date: Sun, 6 Mar 2016 00:19:42 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <76083A2C-9659-46A9-B9DC-6944C50AF4E9@dsl-only.net> References: <7BC7F7FF-FF5C-4BE9-875C-6997BC194295@dsl-only.net> To: Roman Divacky , FreeBSD PowerPC ML , FreeBSD Toolchain X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 08:19:46 -0000 On 2016-Mar-5, at 5:13 PM, Mark Millard wrote: >=20 > I have submitted FreeBSD bug 207732: >=20 > libgcc_s .eh_frame handling messes up interpreting powerpc/powerpc64 = frame pointer register use produced by clang 3.8.0 >=20 > In essence clang++ 3.8.0 generates Frame Pointer Register based code = (r31 in addition to the r1 stack pointer) that g++ 4.2.1/4.9/5.3 = (normally) do not and so the clang++ 3.8.0 code ends up touching an = error in libgcc_s interpreting .eh_frame information for C++ exception = handling that gcc 4.2.1 and the like side step by not using such a Frame = Pointer register. >=20 > Note: The context for libgcc_s was a clang 3.8.0 based buildworld. A = gcc buildworld does not involve such a Frame Pointer Register. >=20 > I do not know if any TARGET_ARCH's other than powerpc/powerpc64 also = generate such Frame Pointer Register like code and so might touch the = same error. >=20 >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net With the other errors identified and reported for .eh_frame and C++ = exception handling for powerpc it is getting harder to tell if a problem = is a new problem or a consequence of the other ones. (Various problems = have no work around yet to avoid them.) This turned out to be a consequence of other problems. Such was easier to discover once I induced gcc 4.2.1 to generate some = example code with r31 in use as a frame pointer. (I used alloca and = default optimization.) Observing the result's behavior and the .eh_frame = output indicated I'd originally misinterpreted where the earliest = problem was in the clang 3.8.0 context. =3D=3D=3D Mark Millard markmi at dsl-only.net