Skip to content
Commit 941dacc3 authored by Amy Kwan's avatar Amy Kwan
Browse files

[compiler-rt][builtins][PowerPC] Implemented __fixunstfti builtin on PowerPC

This patch implements the __uint128_t __fixunstfti (long double) method for
PowerPC -- specifically to convert a long double (IBM double-double) to an
unsigned 128 bit integer.

The general approach of this algorithm is to convert the high and low doubles
of the long double and add them together if the doubles fit within 64 bits.
However, additional adjustments and scaling is performed when the high or low
double does not fit within a 64 bit integer.

To invoke this method, one can do so by linking against compiler-rt, via the
--rtlib=compiler-rt command line option supplied to clang.

Differential Revision: https://reviews.llvm.org/D54911

llvm-svn: 350815
parent 6a9f831f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment