diff options
author | Petr Hosek <phosek@chromium.org> | 2019-04-28 21:53:32 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2019-04-28 21:53:32 +0000 |
commit | 082b89b25faae3e45a023caf51b65ca0f02f377f (patch) | |
tree | 4f7f1b6b689478ec222262aaa1ac364fc7c00dc6 /compiler-rt/lib/builtins/fixunsxfdi.c | |
parent | 65f12f66f6f6ca400ab32f6ded79cd41e14010b3 (diff) | |
download | bcm5719-llvm-082b89b25faae3e45a023caf51b65ca0f02f377f.tar.gz bcm5719-llvm-082b89b25faae3e45a023caf51b65ca0f02f377f.zip |
[builtins] Reformat builtins with clang-format
Update formatting to use the LLVM style.
This is part of the cleanup proposed in "[RFC] compiler-rt builtins
cleanup and refactoring".
Differential Revision: https://reviews.llvm.org/D60351
llvm-svn: 359410
Diffstat (limited to 'compiler-rt/lib/builtins/fixunsxfdi.c')
-rw-r--r-- | compiler-rt/lib/builtins/fixunsxfdi.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/compiler-rt/lib/builtins/fixunsxfdi.c b/compiler-rt/lib/builtins/fixunsxfdi.c index bd49a4af895..cb735780b56 100644 --- a/compiler-rt/lib/builtins/fixunsxfdi.c +++ b/compiler-rt/lib/builtins/fixunsxfdi.c @@ -19,27 +19,25 @@ * Negative values all become zero. */ -/* Assumption: long double is an intel 80 bit floating point type padded with 6 bytes - * du_int is a 64 bit integral type - * value in long double is representable in du_int or is negative - * (no range checking performed) +/* Assumption: long double is an intel 80 bit floating point type padded with 6 + * bytes du_int is a 64 bit integral type value in long double is representable + * in du_int or is negative (no range checking performed) */ -/* gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee eeee | - * 1mmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm +/* gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee + * eeee | 1mmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm + * mmmm mmmm mmmm */ -COMPILER_RT_ABI du_int -__fixunsxfdi(long double a) -{ - long_double_bits fb; - fb.f = a; - int e = (fb.u.high.s.low & 0x00007FFF) - 16383; - if (e < 0 || (fb.u.high.s.low & 0x00008000)) - return 0; - if ((unsigned)e > sizeof(du_int) * CHAR_BIT) - return ~(du_int)0; - return fb.u.low.all >> (63 - e); +COMPILER_RT_ABI du_int __fixunsxfdi(long double a) { + long_double_bits fb; + fb.f = a; + int e = (fb.u.high.s.low & 0x00007FFF) - 16383; + if (e < 0 || (fb.u.high.s.low & 0x00008000)) + return 0; + if ((unsigned)e > sizeof(du_int) * CHAR_BIT) + return ~(du_int)0; + return fb.u.low.all >> (63 - e); } #endif |