From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11594 Path: news.gmane.org!.POSTED!not-for-mail From: David Edelsohn Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] powerpc64le: Add single instruction math functions Date: Sat, 24 Jun 2017 16:53:58 -0400 Message-ID: References: <20170623193533.GO1627@brightrain.aerifal.cx> <594DB66E.7030009@adelielinux.org> <594DDEC6.8030200@adelielinux.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1498337655 30730 195.159.176.226 (24 Jun 2017 20:54:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Jun 2017 20:54:15 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-11607-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jun 24 22:54:12 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1dOs4G-0007Zo-Gg for gllmg-musl@m.gmane.org; Sat, 24 Jun 2017 22:54:08 +0200 Original-Received: (qmail 17488 invoked by uid 550); 24 Jun 2017 20:54:11 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 17467 invoked from network); 24 Jun 2017 20:54:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=BGPPca88YobXswNjOCKAa1P7KtJuWZA0KobsmSl2CwQ=; b=phmfGPyFzLQEGVsrGWLsUfvf0uf7GzlltbnSMWA0QE8t8T8/43lerzNAtaw8A8l3st ak4w+LGsauGTV4a0jnGmbx9+Waby2idCJH/RXotc5jbCfAWTp3Kn7TptqXrTBqHKEWJX 9cpZxMCkIr7IGyuQKIgfALPEuNuhMWVrT7lsnlkVE2//1RcQfdmRXHeFQ+eat54PbrvR 463463x+HL7AGXVt0i4M1mOpAN6PqSsl5tlobzpDRuU5y+VQsGD0XaaeAFfClS1xUbED hrR13a7fLlV//K7zqRadVgTjYCNKu0Hb2FSn9qJ7ue8R0VPUoJc2dWd/N7wEJvjFPHg8 Wb0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=BGPPca88YobXswNjOCKAa1P7KtJuWZA0KobsmSl2CwQ=; b=XQSWA+51LlbPBcohs3EPYLP6Ji1h3lyTdIWxOxDI/xJezcxktCdLaND1Y3XnV2m02r dnA1iAZrt4/nAyvmdBbGnbtmTc4B1dQHcYdg4n9d8ZnthQt5W1LAx3Yt+aKGQsYT5k97 h4xuXwzvKdwvCOBl2gLEobASx8GGukFbQ5O6Ymjjz1SWzxQPJnBMlCZjymmyDPKAbsGT fwASrGcAnTmtMxDuLTncStytIDR8Fc22i+wvcUWUikDy1kmxzMeEl32olAkdWkxqz04j ykyub1ki+84sNlheVL9lolCbS5FPrz9+DdW9YmFBy8IEBjHwbChI4RYX3bti117rwdFS SYTA== X-Gm-Message-State: AKS2vOxjWiYtDqkNuPC+EsIPMPkkBU6YqhJ+iGAe41WVX0FuvICkQHLx +xsY1s9Ls4Fld74KP3AI0xbMHPeEm/c3 X-Received: by 10.55.111.134 with SMTP id k128mr15480791qkc.206.1498337638518; Sat, 24 Jun 2017 13:53:58 -0700 (PDT) In-Reply-To: <594DDEC6.8030200@adelielinux.org> Xref: news.gmane.org gmane.linux.lib.musl.general:11594 Archived-At: On Fri, Jun 23, 2017 at 11:38 PM, A. Wilcox wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > On 23/06/17 22:05, David Edelsohn wrote: >> Note that I only added the optimizations to the "powerpc64" port, >> not the "powerpc" port. The powerpc64 port only support PPC64LE >> Linux, which does not include PPC970. The comments about emulation >> are not relevant to the "powerpc64" port. > > On 23/06/17 14:35, Rich Felker wrote: >> Indeed, musl uses the ELFv2 ABI (minus its gratuitous mandate of >> minimum ISA level) for both little and big endian powerpc64, and I >> think we have users of both (people running it on old powerbooks, >> etc.). The ABIs are not endian-specific. ELFv1 can operate as little endian (and did for a brief period as a transition), ELFv2 can operate as big endian. PowerPC64 Linux only will be 64 bit little endian going forward, although the existing big endian, ELFv1 Linux distributions will continue to be supported. There is no infrastructure or distribution into which a PPC64BE ELFv2 libc can be installed. A PPC64 big endian ELFv2 port is an interesting exercise, but does not match or interact with any other Linux distributions or toolchains. All of the PPC64 BE Linux ports are based on ELFv1 and have no intention of changing. I am not exactly certain what FreeBSD is planning. > > These two statements contradict each other. Also, I have made a very > minimal big-endian build of musl for the ppc64 architecture, but I > haven't had any time to test it. > > There was never a 64-bit PowerPC laptop that I am aware; the highest > spec PowerPC laptop would have been a Daystar with a 32-bit MPC7448. > However, IBM, Apple, Tyan, and a few other manufacturers have released > big-endian 64-bit PowerPC hardware in both workstation and server form. > > Let us also not forget that LoPAPR[1] defines (at R1-2.7-1 in my copy, > version 1.1 dated 24 March 2016) that Power Architecture platforms > "must by default operate with Big-Endian addressing". I think that you're inferring too much into this statement. The platform has to interoperate with big-endian addressing, especially for firmware that assumes big endian, but that does not mean that operating systems must support big endian user space applications. > > Are you aware of any little-endian specific code in musl/powerpc64? I > assume that libc-test would probably catch most of it when I am able > to run it, but until then, it would be nice to know if there is > anything I need to work on in the meantime. The PPC64 port of Musl does not assume little endian addressing, but Musl currently only supports ELFv2. All of the toolchains and operating systems that support ELFv2 are little endian. All of the big endian toolchains and operating systems are designed for ELFv1. There is no overlap. I added the macro tests for portability and completeness. The only ports of Musl that will function on existing, supported, big-endian PowerPC systems are the 32 bit "powerpc" port and an unimplemented PPC64 BE ELFv1 port. Thanks, David