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


#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;

}