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

Go to the source code of this file.

Functions

struct uint128 softfloat_propagateNaNExtF80UI (uint_fast16_t uiA64, uint_fast64_t uiA0, uint_fast16_t uiB64, uint_fast64_t uiB0)
 

Function Documentation

◆ softfloat_propagateNaNExtF80UI()

struct uint128 softfloat_propagateNaNExtF80UI ( uint_fast16_t uiA64,
uint_fast64_t uiA0,
uint_fast16_t uiB64,
uint_fast64_t uiB0 )

Definition at line 54 of file s_propagateNaNExtF80UI.c.

60{
61 bool isSigNaNA, isSigNaNB;
62 uint_fast64_t uiNonsigA0, uiNonsigB0;
63 uint_fast16_t uiMagA64, uiMagB64;
64 struct uint128 uiZ;
65
66 /*------------------------------------------------------------------------
67 *------------------------------------------------------------------------*/
68 isSigNaNA = softfloat_isSigNaNExtF80UI( uiA64, uiA0 );
69 isSigNaNB = softfloat_isSigNaNExtF80UI( uiB64, uiB0 );
70 /*------------------------------------------------------------------------
71 | Make NaNs non-signaling.
72 *------------------------------------------------------------------------*/
73 uiNonsigA0 = uiA0 | UINT64_C( 0xC000000000000000 );
74 uiNonsigB0 = uiB0 | UINT64_C( 0xC000000000000000 );
75 /*------------------------------------------------------------------------
76 *------------------------------------------------------------------------*/
77 if ( isSigNaNA | isSigNaNB ) {
79 if ( isSigNaNA ) {
80 if ( isSigNaNB ) goto returnLargerMag;
81 if ( isNaNExtF80UI( uiB64, uiB0 ) ) goto returnB;
82 goto returnA;
83 } else {
84 if ( isNaNExtF80UI( uiA64, uiA0 ) ) goto returnA;
85 goto returnB;
86 }
87 }
88 returnLargerMag:
89 uiMagA64 = uiA64 & 0x7FFF;
90 uiMagB64 = uiB64 & 0x7FFF;
91 if ( uiMagA64 < uiMagB64 ) goto returnB;
92 if ( uiMagB64 < uiMagA64 ) goto returnA;
93 if ( uiA0 < uiB0 ) goto returnB;
94 if ( uiB0 < uiA0 ) goto returnA;
95 if ( uiA64 < uiB64 ) goto returnA;
96 returnB:
97 uiZ.v64 = uiB64;
98 uiZ.v0 = uiNonsigB0;
99 return uiZ;
100 returnA:
101 uiZ.v64 = uiA64;
102 uiZ.v0 = uiNonsigA0;
103 return uiZ;
104
105}
void softfloat_raiseFlags(uint_fast8_t flags)
#define softfloat_isSigNaNExtF80UI(uiA64, uiA0)
Definition specialize.h:202
#define isNaNExtF80UI(a64, a0)
Definition internals.h:150
@ softfloat_flag_invalid
Definition softfloat.h:89
uint16_t uint_fast16_t
Definition stdint.h:155
uint64_t uint_fast64_t
Definition stdint.h:157
#define UINT64_C(val)
Definition stdint.h:284
Here is the call graph for this function: