From owner-freebsd-ppc@freebsd.org Thu Sep 8 10:22:15 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 EDAA5BD1AF4 for ; Thu, 8 Sep 2016 10:22:15 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-41.reflexion.net [208.70.210.41]) (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 991DFF00 for ; Thu, 8 Sep 2016 10:22:14 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 17466 invoked from network); 8 Sep 2016 09:22:13 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 8 Sep 2016 09:22:13 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v8.00.0) with SMTP; Thu, 08 Sep 2016 05:22:18 -0400 (EDT) Received: (qmail 22402 invoked from network); 8 Sep 2016 09:22:17 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 8 Sep 2016 09:22:17 -0000 Received: from [192.168.0.104] (ip70-189-131-151.lv.lv.cox.net [70.189.131.151]) by iron2.pdx.net (Postfix) with ESMTPSA id 64956EC881E; Thu, 8 Sep 2016 02:22:12 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: From llvm: Fwd: [Bug 26519] Clang 3.8.0's "Target: powerpc-unknown-freebsd11.0" code generation is violating the SVR4 ABI (SEGV can result) [fixed in llvm -r280705] From: Mark Millard In-Reply-To: Date: Thu, 8 Sep 2016 02:22:11 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <48B39DDE-CD64-49A0-8D8E-CFBEE862B41A@dsl-only.net> References: To: FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 10:22:16 -0000 On 2016-Sep-7, at 7:42 PM, Mark Millard wrote: >=20 > Krzysztof Parzyszek kristof at swissmail.org wrote on Wed Sep 7 = 23:03:03 UTC 2016 >=20 >> What about this? https://reviews.llvm.org/D13351 >>=20 >>=20 >> -Krzysztof >>=20 >> On 9/7/2016 5:50 PM, Krzysztof Parzyszek wrote: >>> What are the requirements for soft-float, i.e. what conditions = exactly >>> does the generated code need to meet? Is the purpose of it to = eliminate >>> the use of floating point registers? >>>=20 >>> Is there a library that implements the floating point operations? If >>> not, that is going to be the main obstacle. >>>=20 >>> -Krzysztof >=20 > https://reviews.llvm.org/D13351 is for ppc32 (TARGET_ARCH=3Dpowerpc in = FreeBSD terms), not ppc64 (TARGET_ARCH=3Dpowerpc64 in FreeBSD terms). >=20 > As Justin Hibbits wrote in answer to what soft-float is used for: >=20 >> Soft float is required when building the kernel to prevent the = compiler from using floating point optimizations. >>=20 >> - - Justin >=20 >=20 > I think that "optimizations" here means (in part?) avoiding the = floating point hardware as the kernel need not save/restore the = registers and the like for its own activities. Only user-space gets that = service as I understand. I should have also noted that "buildworld" tries to build libstand, even = with no attempt to build the kernel. libstand allows for having = "standalone applications, mimicking where possible the standard BSD = programming environment". Lack of libstand powerpc64 completing blocks = buildworld for that context. But to you: Thanks much for updating clang/llvm to improve FreeBSD use = for TARGET_ARCH=3Dpowerpc . It will be nice to remove the so-called = "red-zone" code once FreeBSD has adopted the compiler changes (probably = in current/12 ). (The changes are personal, not FreeBSD official. = FreeBSD sticks to requiring ABI be followed.) If the TARGET_ARCH=3Dpowerpc exception handling gets fully fixed I may = then get to move from buildworld experiments to buildkernel experiments = for TARGET_ARCH=3Dpowerpc. That depends on how well kyua testing goes: = kyua requires C++ exceptions to work well to have any chance at = completing a test pass as I understand. (Right now TARGET_ARCH=3Dpowerpc is probably closer to working overall = than TARGET_ARCH=3Dpowerpc64, although both tend to have similar = exception handling problems as I remember. Hal Finkel has made some = recent fixes to some of the reports in that area, spanning both = powerpc64 and powerpc as I understand.) As for when for me: It looks to be a few more weeks before I'll again = have access to the powerpc's and powerpc64's. I'm not sure when FreeBSD = will adopt the recent powerpc64 and powerpc related updates, including = yours. Also it may take some time for me to update from where I left = things in early June once I again have access. > I have used clang/clang++ to do a partially-working FreeBSD buildworld = for TARGET_ARCH=3Dpowerpc (ppc32) based on = https://reviews.llvm.org/D13351 material having been included in clang = 3.8.0. (I had to temporarily modify the kernel to have a so-called = "red-zone" on the stack for signal delivery, effectively stepping = outside FreeBSD's TARGET_ARCH=3Dpowerpc related ABI standard.) >=20 > But TARGET_ARCH=3Dpowerpc64 just reports that clang does not have = softfloat and the build stops as things are. >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 =3D=3D=3D Mark Millard markmi at dsl-only.net