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

Go to the source code of this file.

Functions

void softfloat_normRoundPackMToExtF80M (bool sign, int32_t exp, uint32_t *extSigPtr, uint_fast8_t roundingPrecision, struct extFloat80M *zSPtr)
 

Function Documentation

◆ softfloat_normRoundPackMToExtF80M()

void softfloat_normRoundPackMToExtF80M ( bool sign,
int32_t exp,
uint32_t * extSigPtr,
uint_fast8_t roundingPrecision,
struct extFloat80M * zSPtr )

Definition at line 43 of file s_normRoundPackMToExtF80M.c.

50{
51 int_fast16_t shiftDist;
52 uint32_t wordSig;
53
54 shiftDist = 0;
55 wordSig = extSigPtr[indexWord( 3, 2 )];
56 if ( ! wordSig ) {
57 shiftDist = 32;
58 wordSig = extSigPtr[indexWord( 3, 1 )];
59 if ( ! wordSig ) {
60 shiftDist = 64;
61 wordSig = extSigPtr[indexWord( 3, 0 )];
62 if ( ! wordSig ) {
63 zSPtr->signExp = packToExtF80UI64( sign, 0 );
64 zSPtr->signif = 0;
65 return;
66 }
67 }
68 }
69 shiftDist += softfloat_countLeadingZeros32( wordSig );
70 if ( shiftDist ) {
71 exp -= shiftDist;
72 softfloat_shiftLeft96M( extSigPtr, shiftDist, extSigPtr );
73 }
75 sign, exp, extSigPtr, roundingPrecision, zSPtr );
76
77}
#define packToExtF80UI64(sign, exp)
Definition internals.h:148
void softfloat_roundPackMToExtF80M(bool, int32_t, uint32_t *, uint_fast8_t, struct extFloat80M *)
#define indexWord(total, n)
#define softfloat_shiftLeft96M(aPtr, dist, zPtr)
Definition primitives.h:739
#define softfloat_countLeadingZeros32
unsigned int uint32_t
Definition stdint.h:126
int16_t int_fast16_t
Definition stdint.h:151
uint64_t signif
uint16_t signExp