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

Go to the source code of this file.

Functions

extFloat80_t ui32_to_extF80 (uint32_t a)
 

Function Documentation

◆ ui32_to_extF80()

extFloat80_t ui32_to_extF80 ( uint32_t a)

Definition at line 42 of file ui32_to_extF80.c.

43{
44 uint_fast16_t uiZ64;
45 int_fast8_t shiftDist;
46 union { struct extFloat80M s; extFloat80_t f; } uZ;
47
48 uiZ64 = 0;
49 if ( a ) {
50 shiftDist = softfloat_countLeadingZeros32( a );
51 uiZ64 = 0x401E - shiftDist;
52 a <<= shiftDist;
53 }
54 uZ.s.signExp = uiZ64;
55 uZ.s.signif = (uint_fast64_t) a<<32;
56 return uZ.f;
57
58}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1181
#define softfloat_countLeadingZeros32
uint16_t uint_fast16_t
Definition stdint.h:155
uint64_t uint_fast64_t
Definition stdint.h:157
int8_t int_fast8_t
Definition stdint.h:150
char * s