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

Go to the source code of this file.

Functions

void softfloat_normRoundPackMToF128M (bool sign, int32_t exp, uint32_t *extSigPtr, uint32_t *zWPtr)
 

Function Documentation

◆ softfloat_normRoundPackMToF128M()

void softfloat_normRoundPackMToF128M ( bool sign,
int32_t exp,
uint32_t * extSigPtr,
uint32_t * zWPtr )

Definition at line 43 of file s_normRoundPackMToF128M.c.

45{
46 const uint32_t *ptr;
47 int_fast16_t shiftDist;
48 uint32_t wordSig;
49
50 ptr = extSigPtr + indexWordHi( 5 );
51 shiftDist = 0;
52 for (;;) {
53 wordSig = *ptr;
54 if ( wordSig ) break;
55 shiftDist += 32;
56 if ( 160 <= shiftDist ) {
57 zWPtr[indexWordHi( 4 )] = packToF128UI96( sign, 0, 0 );
58 zWPtr[indexWord( 4, 2 )] = 0;
59 zWPtr[indexWord( 4, 1 )] = 0;
60 zWPtr[indexWord( 4, 0 )] = 0;
61 return;
62 }
63 ptr -= wordIncr;
64 }
65 shiftDist += softfloat_countLeadingZeros32( wordSig ) - 15;
66 if ( shiftDist ) {
67 exp -= shiftDist;
68 softfloat_shiftLeft160M( extSigPtr, shiftDist, extSigPtr );
69 }
70 softfloat_roundPackMToF128M( sign, exp, extSigPtr, zWPtr );
71
72}
void softfloat_roundPackMToF128M(bool, int32_t, uint32_t *, uint32_t *)
#define packToF128UI96(sign, exp, sig96)
Definition internals.h:250
#define wordIncr
#define indexWord(total, n)
#define indexWordHi(total)
#define softfloat_shiftLeft160M(aPtr, dist, zPtr)
Definition primitives.h:755
#define softfloat_countLeadingZeros32
unsigned int uint32_t
Definition stdint.h:126
int16_t int_fast16_t
Definition stdint.h:151