From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9577 Path: news.gmane.org!not-for-mail From: Justin Cormack Newsgroups: gmane.linux.lib.musl.general Subject: Re: long double on powerpc64 Date: Fri, 11 Mar 2016 11:19:22 +0000 Message-ID: References: <20160311031636.GA3851@gordon.members.linode.com> <20160311041759.GU9349@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 1457695183 12862 80.91.229.3 (11 Mar 2016 11:19:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Mar 2016 11:19:43 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9590-gllmg-musl=m.gmane.org@lists.openwall.com Fri Mar 11 12:19:40 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 1aeL6X-0000Gu-7V for gllmg-musl@m.gmane.org; Fri, 11 Mar 2016 12:19:37 +0100 Original-Received: (qmail 25723 invoked by uid 550); 11 Mar 2016 11:19: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 25705 invoked from network); 11 Mar 2016 11:19:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=specialbusservice.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=cx6CDDBMNnNLfUkEwAaTshVZP0F/zLNh6yPthh1pBzc=; b=FEI2PzJmKPXWHdwSRk0vEf8Vk9YOTs0iKlOB1+Hnr3ENj3JOmn7b3QaW90C1jfYGvj 42bheYcXv6i5xj/b3BhcAiB1oM4KdB/KBChu0+2EqpavOCjpjYMfg0f6uuiJ7Z/Xz3Yu la9tLIxgHpcaibsV4KZ8et2gczjbH9SMS+6rI= 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; bh=cx6CDDBMNnNLfUkEwAaTshVZP0F/zLNh6yPthh1pBzc=; b=WpnrXOgMYCFZJrnachaochWNOEIMr6ScA51uJWRlTFiKvd6UhqDrj+VNliydDWwYuM YwAGcbGANg1M0C5UV/WoFdSn88S43XTzCdaASGGDm7um4W87L1b73AZH08wk3Oli8552 kZXfJd++5ZBErzKSm/sIUS1bS9QKmb7WZcd2etk25SdvqQAVFB/pDBMT68aYtCqci7pt cg7bYFMtE/rvjzhUzIQgFK7pt56u/Y6kL4tHK0wtZixASXQM/xn/n+EXtEJrYd0eNuFB q5Ee++LlsF3iV93dEsjwdlcEUaBBd7wqEXnGMDPTl5UwrIwEBN2BoGgsei9b1DrprLgt DiOg== X-Gm-Message-State: AD7BkJLZfS1Ic1tMWclTX5El5cHCbYamLe8XYriXC85Hdcp8p+CSlrQ16AwkTvgXDrDZUeUzAh6Az8oaqdgLGw== X-Received: by 10.194.118.106 with SMTP id kl10mr10454591wjb.154.1457695162244; Fri, 11 Mar 2016 03:19:22 -0800 (PST) In-Reply-To: <20160311041759.GU9349@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:9577 Archived-At: On 11 March 2016 at 04:17, Rich Felker wrote: > On Thu, Mar 10, 2016 at 09:16:36PM -0600, Bobby Bingham wrote: >> I've been working on a PPC64 port of musl lately. I've made some good >> progress, and it's time to decide what to do about the long double type. >> >> The PPC64 ELFv2 ABI [1] calls for a 128 bit long double. It allows an >> implementation to choose to use either IEEE quad, or IBM double double, >> with IEEE quad being preferred. >> >> On the compiler side, it looks like things are a bit of a mess. >> >> Clang only supports IBM double double on PPC64, AFAICS, and therefore >> won't work for us currently. >> >> GCC support is more complicated. It supports both 128 bit variants, as >> well as supporting (and defaulting to) a 64 bit long double. To get a >> 128 bit long double, you must build gcc with --with-long-double-128 or >> pass -mlong-double-128, and even then you get IBM double double. To get >> IEEE quad, you must additionally pass -mlong-double-128, though there >> are whispers that the default may change in gcc 7 [2]. >> >> The final piece of bad news is that gcc can't successfully build musl on >> PPC64 with IEEE quad long double. It chokes on even trivial code using >> long double complex [3]. So only 64 bit long double is usable for now. >> >> The good news is that gcc's predefined macros are sufficient to detect >> which long double variant is in use. My current thinking is that we can >> support both 64 bit long and IEEE quad as two powerpc64 subarchs, even >> if we can only implement 64 bit for now. Because it looks like the >> future direction is for IEEE quad to become the default, I think that >> should be the suffix-less subarch, and the 64 bit long double subarch >> should have a -ld64 suffix or similar. > > My leaning would be to just go with ld64 if nobody has their act > together for quad support, but let's see what people who want to use > powerpc64 think about it. The only option that's not on the table is > IBM double-double (because it's incompatible with musl's assumption of > IEEE semantics; math-savvy people in the musl community already know > this of course but I'm repeating it for the sake of possible > newcomers). I think it would be a mistake to only support ld64, I think Bobby's approach of two architectures is probably better, and maybe look to retire ld64 eventually. Justin