mailing list of musl libc
 help / color / mirror / code / Atom feed
From: David Edelsohn <dje.gcc@gmail.com>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com
Subject: Re: Re: musl libc for PPC64
Date: Mon, 8 Feb 2016 21:06:22 -0500	[thread overview]
Message-ID: <CAGWvnyktEAb9fcdJnATWMvftSFCQLse7JTtQOZ115twX=Rizgw@mail.gmail.com> (raw)
In-Reply-To: <20160209015242.GF9349@brightrain.aerifal.cx>

On Mon, Feb 8, 2016 at 8:52 PM, Rich Felker <dalias@libc.org> wrote:
> On Tue, Feb 09, 2016 at 02:45:50AM +0100, Szabolcs Nagy wrote:
>> * David Edelsohn <dje.gcc@gmail.com> [2016-02-08 20:16:25 -0500]:
>> > On Mon, Feb 8, 2016 at 8:03 PM, Szabolcs Nagy <nsz@port70.net> wrote:
>> > > * Szabolcs Nagy <nsz@port70.net> [2016-02-09 00:48:31 +0100]:
>> > >> * Rich Felker <dalias@libc.org> [2016-02-08 18:29:45 -0500]:
>> > >> > On Mon, Feb 08, 2016 at 06:24:27PM -0500, David Edelsohn wrote:
>> > >> > > I'm not sure what you mean.  The software emulation assumes the
>> > >> > > hardware support is not present.  It doesn't mirror back the state to
>> > >> > > the processor in 64 bit mode.  But the emulation is fully IEEE128
>> > >> > > compliant.
>> > >> >
>> > >> > if fesetround(FE_DOWNWARD) succeeds but then long double math still
>> > >> > rounds to nearest, that's not IEEE compliant.
>> > >> >
>> > >> > The big obstacle to having fenv with softfloat on fully-softfloat
>> > >> > archs is the lack of register state for the rounding mode and
>> > >> > exception flags, so it should be possible to do this right as long as
>> > >> > the cpu has status/mode registers for single/double, which the
>> > >> > soft-quad code can then access/set. If this isn't done right already
>> > >> > we could either try to get it fixed in libgcc or punt and go with
>> > >> > ld64.
>> > >> >
>> > >>
>> > >> it seems to be supported
>> > >> https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgcc/config/rs6000/sfp-machine.h;h=75d5e1a2d522e0a3d3c5b0463fcfe9b054f7c263;hb=HEAD#l107
>> > >>
>> > >> so we can implement iso c annex f with 128 bit long doubles.
>> > >
>> > > hm it seems, this is only for the __float128 type
>> > > which will be new in gcc-6.
>> > >
>> > > i don't see how to configure gcc with ieee128 long double.
>> > > (other than using the debug option -mabi=ieeelongdouble)
>> > >
>> > > so if musl goes with ieee128 long double abi then it will
>> > > only work with latest gcc.
>> >
>> > The musl libc dynamic linking support only was added to the latest GCC.
>> >
>>
>> (resend with correct to:)
>>
>> musl has a gcc wrapper that changes the specs file and then
>> it works even with gcc-3 (on x86 and glibc host without c++).
>>
>> we also have patches for gcc releases going back to gcc-4.7
>
> Indeed. Just patching in the dynamic linker name and a few other
> details to make gcc target musl properly is small and can be done for
> any gcc version. Patching in ieee quad or ABI changes is non-trivial
> though.
>
>> so powerpc64 would be the only arch that depends on features
>> from the latest gcc and that is new situation for musl.
>> (this is mostly interesting because there are historical
>> powerpc64 machines with older toolchains wich might work
>> with musl with minor tweaks if we choose 64bit long double)
>>
>> but if new hw adds ieee128 instructions then i guess that's
>> the right choice.
>
> Obviously the powerpc64 musl target is not going to work with any
> compiler too old to have the "ELFv2 ABI" so that limits how far back
> it's interesting to be compatible with old compilers. What gcc version
> added the v2 ABI? Does clang/llvm support it yet? (Compat with clang
> is also valuable.)

ELFv2 support was backported to GCC 4.8 for use in the Linux distros.

Clang/LLVM support was added in 3.6, I believe.

- David


  reply	other threads:[~2016-02-09  2:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 14:43 David Edelsohn
2016-02-08 16:17 ` Szabolcs Nagy
2016-02-08 16:51   ` Rich Felker
2016-02-08 17:48     ` David Edelsohn
2016-02-08 20:18       ` Rich Felker
2016-02-08 20:30         ` David Edelsohn
2016-02-08 22:59           ` Rich Felker
2016-02-08 23:24             ` David Edelsohn
2016-02-08 23:29               ` Rich Felker
2016-02-08 23:48                 ` Szabolcs Nagy
2016-02-09  1:03                   ` Szabolcs Nagy
2016-02-09  1:16                     ` David Edelsohn
2016-02-09  1:42                       ` Szabolcs Nagy
2016-02-09  1:45                       ` Szabolcs Nagy
2016-02-09  1:52                         ` Rich Felker
2016-02-09  2:06                           ` David Edelsohn [this message]
2016-02-10 22:17                           ` David Edelsohn
2016-02-08 23:52                 ` David Edelsohn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGWvnyktEAb9fcdJnATWMvftSFCQLse7JTtQOZ115twX=Rizgw@mail.gmail.com' \
    --to=dje.gcc@gmail.com \
    --cc=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).