Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190630220241.GC21055@port70.net>
Date: Mon, 1 Jul 2019 00:02:41 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Cc: Samuel Holland <samuel@...lland.org>
Subject: Re: [PATCH] powerpc64: add IEEE binary128 long double support

* Samuel Holland <samuel@...lland.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.

Powered by blists - more mailing lists

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