Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 24 Jun 2017 16:53:58 -0400
From: David Edelsohn <dje.gcc@...il.com>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] powerpc64le: Add single instruction math functions

On Fri, Jun 23, 2017 at 11:38 PM, A. Wilcox <awilfox@...lielinux.org> 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

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.