Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
ui32_to_f128M.c File Reference
#include <stdint.h>
#include "platform.h"
#include "internals.h"
#include "softfloat.h"
Include dependency graph for ui32_to_f128M.c:

Go to the source code of this file.

Functions

void ui32_to_f128M (uint32_t a, float128_t *zPtr)
 

Function Documentation

◆ ui32_to_f128M()

void ui32_to_f128M ( uint32_t a,
float128_t * zPtr )

Definition at line 53 of file ui32_to_f128M.c.

54{
55 uint32_t *zWPtr, uiZ96, uiZ64;
56 int_fast8_t shiftDist;
57 uint64_t normA;
58
59 zWPtr = (uint32_t *) zPtr;
60 uiZ96 = 0;
61 uiZ64 = 0;
62 if ( a ) {
63 shiftDist = softfloat_countLeadingZeros32( a ) + 17;
64 normA = (uint64_t) a<<shiftDist;
65 uiZ96 = packToF128UI96( 0, 0x402E - shiftDist, normA>>32 );
66 uiZ64 = normA;
67 }
68 zWPtr[indexWord( 4, 3 )] = uiZ96;
69 zWPtr[indexWord( 4, 2 )] = uiZ64;
70 zWPtr[indexWord( 4, 1 )] = 0;
71 zWPtr[indexWord( 4, 0 )] = 0;
72
73}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1181
#define packToF128UI96(sign, exp, sig96)
Definition internals.h:250
#define indexWord(total, n)
#define softfloat_countLeadingZeros32
unsigned int uint32_t
Definition stdint.h:126
int8_t int_fast8_t
Definition stdint.h:150
unsigned __int64 uint64_t
Definition stdint.h:136