aboutsummaryrefslogtreecommitdiff
path: root/softfloat/s_normSubnormalF32Sig.c
blob: 399319357f045b41ca52ab50796c2bea0b8dd15c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// See LICENSE.SoftFloat for license details.


#include <stdint.h>
#include "platform.h"
#include "primitives.h"
#include "internals.h"

struct exp16_sig32 softfloat_normSubnormalF32Sig( uint_fast32_t sig )
{
    int shiftCount;
    struct exp16_sig32 z;

    shiftCount = softfloat_countLeadingZeros32( sig ) - 8;
    z.exp = 1 - shiftCount;
    z.sig = sig<<shiftCount;
    return z;

}