aboutsummaryrefslogtreecommitdiff
path: root/softfloat/8086/s_commonNaNToF64UI.c
blob: 474ceee98d9abc660ade5763b1c3e65f86fc2ca9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

#include <stdint.h>
#include "platform.h"
#include "specialize.h"

/*----------------------------------------------------------------------------
| Returns the result of converting the canonical NaN `a' to the double-
| precision floating-point format.
*----------------------------------------------------------------------------*/

uint_fast64_t softfloat_commonNaNToF64UI( struct commonNaN a )
{

    return
        (uint_fast64_t) a.sign<<63 | UINT64_C( 0x7FF8000000000000 )
            | a.v64>>12;

}