mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Cc: Samuel Holland <samuel@sholland.org>
Subject: Re: [PATCH] powerpc64: add IEEE binary128 long double support
Date: Mon, 1 Jul 2019 00:02:41 +0200	[thread overview]
Message-ID: <20190630220241.GC21055@port70.net> (raw)
In-Reply-To: <20190630193825.65174-1-samuel@sholland.org>

* Samuel Holland <samuel@sholland.org> [2019-06-30 14:38:24 -0500]:
> This is added under a new "ieee128" sub-architecture. The 128-bit scalar
> floating-point ABI uses the Altivec registers for parameter passing, but
> no special instructions; thus, the ABI can be used with any CPU that
> supports Altivec. However, hardware instructions to operate on a 128-bit
> scalar are only available starting with POWER9. Any older CPU will use
> software fp.
> 
> With "-mlong-double-128 -mabi=ieeelongdouble", gcc defines both
> __LONG_DOUBLE_128__ and __LONG_DOUBLE_IEEE128__. clang, when patched
> with "LongDoubleFormat = &llvm::APFloat::IEEEquad();", defines
> __LONG_DOUBLE_128__ but not __LONG_DOUBLE_IEEE128__, so we use
> __LDBL_MANT_DIG__ to distinguish IEEE binary128 from IBM double-double.
> ---
> 
> So far the suggested ABI names have been "ld128", "ieee128", "ieeequad",
> and "f128". "ieee128" is the shortest while still being unambiguous
> about which 128-bit FP format is being used.
> 
> Ideally we could use __LONG_DOUBLE_IEEE128__ as the preprocessor
> condition, but it's not provided by clang. Since we have to check
> __LDBL_MANT_DIG__ anyway, is checking __LONG_DOUBLE_128__ redundant?

i'd only check __LDBL_MANT_DIG__ since that's what
is used internally in musl where this matters.


      parent reply	other threads:[~2019-06-30 22:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-30 19:38 Samuel Holland
2019-06-30 19:38 ` [GCC PATCH] powerpc64 musl libc support for IEEE binary128 long double Samuel Holland
2019-06-30 22:29   ` Szabolcs Nagy
2019-07-01  0:59     ` Samuel Holland
2019-07-01  7:17       ` Szabolcs Nagy
2019-07-01 17:42   ` Rich Felker
2019-07-02  0:48     ` Samuel Holland
2019-06-30 22:02 ` Szabolcs Nagy [this message]

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=20190630220241.GC21055@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    --cc=samuel@sholland.org \
    /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).