[LLVMdev] compiler-rt: AArch64 and IEEE quad-precision floating point

67 views
Skip to first unread message

Ed Maste

unread,
Mar 29, 2015, 10:52:18 PM3/29/15
to LLVM Development List
As part of the FreeBSD/arm64 porting effort we've been looking into
the state of compiler-rt support for quad precision long double
builtins.

I see that a decently large set of these functions exist, but AFAICT
there is no CMake or Makefile infrastructure in the tree to build
them. Are these being used by various projects' out-of-tree build
infrastructure at present, or am I just missing something?

The FreeBSD base system "buildworld" currently fails due to three
missing functions:
__floatditf
__floatunditf
__multc3

The first two look like they'd be fairly straightforward to implement.
I wonder though if it's feasible to rework the
float{,un}{s,d,t}i{s,d,x,t}f functions to share a common
implementation _impl.inc file as was done in r231965 for the other
(float->int) direction.
Of the 24 conversions compiler-rt currently lacks 6: floatditf,
floatsixf, floattitf, and the unsigned equivalents.

mul{s,d,x,t}c3 could also all share a common implementation file, and
it seems multc3 can be identical to mulxc3. I have a WIP patch
implementing that change, but would like to better understand the
background and thoughts on the approach first.
_______________________________________________
LLVM Developers mailing list
LLV...@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

Ed Maste

unread,
Apr 7, 2015, 4:25:45 PM4/7/15
to LLVM Development List, Joerg Sonnenberger
On 29 March 2015 at 22:49, Ed Maste <ema...@freebsd.org> wrote:
> As part of the FreeBSD/arm64 porting effort we've been looking into
> the state of compiler-rt support for quad precision long double
> builtins.
>
> I see that a decently large set of these functions exist, but AFAICT
> there is no CMake or Makefile infrastructure in the tree to build
> them. Are these being used by various projects' out-of-tree build
> infrastructure at present, or am I just missing something?

Joerg, have you been using the 128-bit long double quad precision fp
routines on NetBSD AArch64?

> The FreeBSD base system "buildworld" currently fails due to three
> missing functions:
> __floatditf
> __floatunditf
> __multc3
> ...
> mul{s,d,x,t}c3 could also all share a common implementation file, and
> it seems multc3 can be identical to mulxc3. I have a WIP patch
> implementing that change, but would like to better understand the
> background and thoughts on the approach first.

I've added naive implementations of these to the compiler-rt copy in
FreeBSD (r281221 and r281223) for now for our arm64/AArch64 port.
They're trivial modifications of existing functions.

I'm still interested in pursuing a change to refactor these into a
shared implementation file included by the various .c files, but want
to have a better understanding of how (and where) these files are
currently being used.
Reply all
Reply to author
Forward
0 new messages