Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
s_propagateNaNExtF80M.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_propagateNaNExtF80M.c:

Go to the source code of this file.

Functions

void softfloat_propagateNaNExtF80M (const struct extFloat80M *aSPtr, const struct extFloat80M *bSPtr, struct extFloat80M *zSPtr)
 

Function Documentation

◆ softfloat_propagateNaNExtF80M()

void softfloat_propagateNaNExtF80M ( const struct extFloat80M * aSPtr,
const struct extFloat80M * bSPtr,
struct extFloat80M * zSPtr )

Definition at line 51 of file s_propagateNaNExtF80M.c.

56{
57 bool isSigNaNA;
58 const struct extFloat80M *sPtr;
59 bool isSigNaNB;
60 uint_fast16_t uiB64;
61 uint64_t uiB0;
62 uint_fast16_t uiA64;
63 uint64_t uiA0;
64 uint_fast16_t uiMagA64, uiMagB64;
65
66 isSigNaNA = extF80M_isSignalingNaN( (const extFloat80_t *) aSPtr );
67 sPtr = aSPtr;
68 if ( ! bSPtr ) {
70 goto copy;
71 }
72 isSigNaNB = extF80M_isSignalingNaN( (const extFloat80_t *) bSPtr );
73 if ( isSigNaNA | isSigNaNB ) {
75 if ( isSigNaNA ) {
76 uiB64 = bSPtr->signExp;
77 if ( isSigNaNB ) goto returnLargerUIMag;
78 uiB0 = bSPtr->signif;
79 if ( isNaNExtF80UI( uiB64, uiB0 ) ) goto copyB;
80 goto copy;
81 } else {
82 uiA64 = aSPtr->signExp;
83 uiA0 = aSPtr->signif;
84 if ( isNaNExtF80UI( uiA64, uiA0 ) ) goto copy;
85 goto copyB;
86 }
87 }
88 uiB64 = bSPtr->signExp;
89 returnLargerUIMag:
90 uiA64 = aSPtr->signExp;
91 uiMagA64 = uiA64 & 0x7FFF;
92 uiMagB64 = uiB64 & 0x7FFF;
93 if ( uiMagA64 < uiMagB64 ) goto copyB;
94 if ( uiMagB64 < uiMagA64 ) goto copy;
95 uiA0 = aSPtr->signif;
96 uiB0 = bSPtr->signif;
97 if ( uiA0 < uiB0 ) goto copyB;
98 if ( uiB0 < uiA0 ) goto copy;
99 if ( uiA64 < uiB64 ) goto copy;
100 copyB:
101 sPtr = bSPtr;
102 copy:
103 zSPtr->signExp = sPtr->signExp;
104 zSPtr->signif = sPtr->signif | UINT64_C( 0xC000000000000000 );
105
106}
void copy(const path &from, const path &to)
bool extF80M_isSignalingNaN(const extFloat80_t *aPtr)
void softfloat_raiseFlags(uint_fast8_t flags)
#define isNaNExtF80UI(a64, a0)
Definition internals.h:150
@ softfloat_flag_invalid
Definition softfloat.h:89
uint16_t uint_fast16_t
Definition stdint.h:155
#define UINT64_C(val)
Definition stdint.h:284
unsigned __int64 uint64_t
Definition stdint.h:136
uint64_t signif
uint16_t signExp
Here is the call graph for this function: