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

Go to the source code of this file.

Functions

void i64_to_extF80M (int64_t a, extFloat80_t *zPtr)
 

Function Documentation

◆ i64_to_extF80M()

void i64_to_extF80M ( int64_t a,
extFloat80_t * zPtr )

Definition at line 53 of file i64_to_extF80M.c.

54{
55 struct extFloat80M *zSPtr;
56 uint_fast16_t uiZ64;
57 uint64_t sigZ;
58 bool sign;
59 uint64_t absA;
60 int_fast8_t shiftDist;
61
62 zSPtr = (struct extFloat80M *) zPtr;
63 uiZ64 = 0;
64 sigZ = 0;
65 if ( a ) {
66 sign = (a < 0);
67 absA = sign ? -(uint64_t) a : (uint64_t) a;
68 shiftDist = softfloat_countLeadingZeros64( absA );
69 uiZ64 = packToExtF80UI64( sign, 0x403E - shiftDist );
70 sigZ = absA<<shiftDist;
71 }
72 zSPtr->signExp = uiZ64;
73 zSPtr->signif = sigZ;
74
75}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1181
#define packToExtF80UI64(sign, exp)
Definition internals.h:148
#define softfloat_countLeadingZeros64
uint16_t uint_fast16_t
Definition stdint.h:155
int8_t int_fast8_t
Definition stdint.h:150
unsigned __int64 uint64_t
Definition stdint.h:136
uint64_t signif
uint16_t signExp