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

Go to the source code of this file.

Functions

int softfloat_shiftNormSigF128M (const uint32_t *wPtr, uint_fast8_t shiftDist, uint32_t *sigPtr)
 

Function Documentation

◆ softfloat_shiftNormSigF128M()

int softfloat_shiftNormSigF128M ( const uint32_t * wPtr,
uint_fast8_t shiftDist,
uint32_t * sigPtr )

Definition at line 42 of file s_shiftNormSigF128M.c.

44{
45 uint32_t wordSig;
46 int32_t exp;
47 uint32_t leadingBit;
48
49 wordSig = wPtr[indexWordHi( 4 )];
50 exp = expF128UI96( wordSig );
51 if ( exp ) {
52 softfloat_shortShiftLeft128M( wPtr, shiftDist, sigPtr );
53 leadingBit = 0x00010000<<shiftDist;
54 sigPtr[indexWordHi( 4 )] =
55 (sigPtr[indexWordHi( 4 )] & (leadingBit - 1)) | leadingBit;
56 } else {
57 exp = 16;
58 wordSig &= 0x7FFFFFFF;
59 if ( ! wordSig ) {
60 exp = -16;
61 wordSig = wPtr[indexWord( 4, 2 )];
62 if ( ! wordSig ) {
63 exp = -48;
64 wordSig = wPtr[indexWord( 4, 1 )];
65 if ( ! wordSig ) {
66 wordSig = wPtr[indexWord( 4, 0 )];
67 if ( ! wordSig ) return -128;
68 exp = -80;
69 }
70 }
71 }
72 exp -= softfloat_countLeadingZeros32( wordSig );
73 softfloat_shiftLeft128M( wPtr, 1 - exp + shiftDist, sigPtr );
74 }
75 return exp;
76
77}
#define expF128UI96(a96)
Definition internals.h:248
#define indexWord(total, n)
#define indexWordHi(total)
#define softfloat_shortShiftLeft128M(aPtr, dist, zPtr)
Definition primitives.h:703
#define softfloat_shiftLeft128M(aPtr, dist, zPtr)
Definition primitives.h:747
#define softfloat_countLeadingZeros32
unsigned int uint32_t
Definition stdint.h:126
signed int int32_t
Definition stdint.h:123
Here is the caller graph for this function: