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

Go to the source code of this file.

Functions

float128_t extF80_to_f128 (extFloat80_t a)
 

Function Documentation

◆ extF80_to_f128()

float128_t extF80_to_f128 ( extFloat80_t a)

Definition at line 44 of file extF80_to_f128.c.

45{
46 union { struct extFloat80M s; extFloat80_t f; } uA;
47 uint_fast16_t uiA64;
48 uint_fast64_t uiA0;
49 uint_fast16_t exp;
50 uint_fast64_t frac;
51 struct commonNaN commonNaN;
52 struct uint128 uiZ;
53 bool sign;
54 struct uint128 frac128;
55 union ui128_f128 uZ;
56
57 uA.f = a;
58 uiA64 = uA.s.signExp;
59 uiA0 = uA.s.signif;
60 exp = expExtF80UI64( uiA64 );
61 frac = uiA0 & UINT64_C( 0x7FFFFFFFFFFFFFFF );
62 if ( (exp == 0x7FFF) && frac ) {
65 } else {
66 sign = signExtF80UI64( uiA64 );
67 frac128 = softfloat_shortShiftLeft128( 0, frac, 49 );
68 uiZ.v64 = packToF128UI64( sign, exp, frac128.v64 );
69 uiZ.v0 = frac128.v0;
70 }
71 uZ.ui = uiZ;
72 return uZ.f;
73
74}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1181
void softfloat_extF80UIToCommonNaN(uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr)
#define softfloat_commonNaNToF128UI
#define expExtF80UI64(a64)
Definition internals.h:147
#define signExtF80UI64(a64)
Definition internals.h:146
struct uint128 softfloat_shortShiftLeft128(uint64_t a64, uint64_t a0, uint_fast8_t dist)
uint16_t uint_fast16_t
Definition stdint.h:155
uint64_t uint_fast64_t
Definition stdint.h:157
#define UINT64_C(val)
Definition stdint.h:284
char * s
Here is the call graph for this function: