From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9296 Path: news.gmane.org!not-for-mail From: David Edelsohn Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: musl libc for PPC64 Date: Mon, 8 Feb 2016 21:06:22 -0500 Message-ID: References: <20160208201802.GB9349@brightrain.aerifal.cx> <20160208225921.GD9349@brightrain.aerifal.cx> <20160208232945.GE9349@brightrain.aerifal.cx> <20160208234831.GI9915@port70.net> <20160209010336.GJ9915@port70.net> <20160209014549.GL9915@port70.net> <20160209015242.GF9349@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1454983597 1518 80.91.229.3 (9 Feb 2016 02:06:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Feb 2016 02:06:37 +0000 (UTC) Cc: musl@lists.openwall.com To: Rich Felker Original-X-From: musl-return-9309-gllmg-musl=m.gmane.org@lists.openwall.com Tue Feb 09 03:06:36 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aSxhL-0006Xu-SN for gllmg-musl@m.gmane.org; Tue, 09 Feb 2016 03:06:36 +0100 Original-Received: (qmail 24318 invoked by uid 550); 9 Feb 2016 02:06:34 -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 24296 invoked from network); 9 Feb 2016 02:06:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fDOD+HG1RyN3qtvjyX6RXLs/B7lthSNt03BvSZIPFK0=; b=DSA2M7YwVALnWzVIRwyi71aKOGEX6bAsfO1HpboBUWp+IXXF5ucx90vy1v/9a0tuaY ubIYh4JnbCR6LPVDoA3RjoRIpLa3LXBD5K5mNfN0HkNiSLNnPeqjq+V8ttPw+HRWW9ee lTIaZquhKJhPrQbexAhwbZLCMc8s09vdoTWmUm+671znVaw2SF4gJV6OjeO7wCaZ0kwZ KzN5xt1Awi3OeEkoAy0t/RUF8qiDc5zohd1VWWdDFryAM4yKugysMxtWWUGbbIm1KU4n IiCwFWujUV1GUoVNYaA45y2ieaMkQRLTShhZ8Aa4LwTebDDi4xAL0Uh//A8uQfITrjHC I3Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=fDOD+HG1RyN3qtvjyX6RXLs/B7lthSNt03BvSZIPFK0=; b=OlzySvASkPpeszZHkkkLmMQICPSzQX7bEUCVVvDcD+jiPqxTpXq0IPqM4AIEx4+RUh BtR4ud2U0xcvdPp+1y+RLfDogpJ8jWp8i9yEEpua6kK9WvfTY+W3kTvWovmopYYoSI20 Ff7bdfi0BQBQ1nFJnRw/d5XNdzR7zbr6Jvmf3MFiEDMQmuLY9LDdF/eJ832lTsKWIENf u4OEU5B1WxKzgeXQVY8ApcBPVZYrnZWz+tlTlcx4eoEZ6jU8ncoz7tBDW4DCjEjpi9o3 B8Ncr+w7Fyu4KP25e4Xjz0I1QI9dbPy6+eDkQFVkyA3+FaVZvlf47CIoOsEB+6tlue5o j6xA== X-Gm-Message-State: AG10YOSJvoSm3VkDxylAJHhk7JgdVikKbKzLqzjKsG54woJ1NYniAgOjQNnSDXBVPJYCD97i1PFtqXetqRbeuw== X-Received: by 10.112.137.129 with SMTP id qi1mr12530713lbb.31.1454983582371; Mon, 08 Feb 2016 18:06:22 -0800 (PST) In-Reply-To: <20160209015242.GF9349@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:9296 Archived-At: On Mon, Feb 8, 2016 at 8:52 PM, Rich Felker wrote: > On Tue, Feb 09, 2016 at 02:45:50AM +0100, Szabolcs Nagy wrote: >> * David Edelsohn [2016-02-08 20:16:25 -0500]: >> > On Mon, Feb 8, 2016 at 8:03 PM, Szabolcs Nagy wrote: >> > > * Szabolcs Nagy [2016-02-09 00:48:31 +0100]: >> > >> * Rich Felker [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