From 5cd8d2b93fad2011fdf8f49a263d77697af35b32 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Wed, 11 Jul 2018 01:16:28 -0700 Subject: Upgrade to SoftFloat 3e --- softfloat/ui32_to_f64.c | 87 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 59 insertions(+), 28 deletions(-) mode change 100755 => 100644 softfloat/ui32_to_f64.c (limited to 'softfloat/ui32_to_f64.c') diff --git a/softfloat/ui32_to_f64.c b/softfloat/ui32_to_f64.c old mode 100755 new mode 100644 index b93ddf7..11050c1 --- a/softfloat/ui32_to_f64.c +++ b/softfloat/ui32_to_f64.c @@ -1,28 +1,59 @@ -// See LICENSE.SoftFloat for license details. - - -#include -#include "platform.h" -#include "primitives.h" -#include "internals.h" -#include "softfloat.h" - -float64_t ui32_to_f64( uint_fast32_t a ) -{ - uint_fast64_t uiZ; - int shiftCount; - union ui64_f64 uZ; - - if ( ! a ) { - uiZ = 0; - } else { - shiftCount = softfloat_countLeadingZeros32( a ) + 21; - uiZ = - packToF64UI( - 0, 0x432 - shiftCount, (uint_fast64_t) a< +#include "platform.h" +#include "internals.h" +#include "softfloat.h" + +float64_t ui32_to_f64( uint32_t a ) +{ + uint_fast64_t uiZ; + int_fast8_t shiftDist; + union ui64_f64 uZ; + + if ( ! a ) { + uiZ = 0; + } else { + shiftDist = softfloat_countLeadingZeros32( a ) + 21; + uiZ = + packToF64UI( 0, 0x432 - shiftDist, (uint_fast64_t) a<