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

Go to the source code of this file.

Functions

void softfloat_propagateNaNF128M (const uint32_t *aWPtr, const uint32_t *bWPtr, uint32_t *zWPtr)
 

Function Documentation

◆ softfloat_propagateNaNF128M()

void softfloat_propagateNaNF128M ( const uint32_t * aWPtr,
const uint32_t * bWPtr,
uint32_t * zWPtr )

Definition at line 53 of file s_propagateNaNF128M.c.

55{
56 bool isSigNaNA;
57 const uint32_t *ptr;
58 bool isSigNaNB;
59 uint32_t uiA96, uiB96, wordMagA, wordMagB;
60
61 isSigNaNA = f128M_isSignalingNaN( (const float128_t *) aWPtr );
62 ptr = aWPtr;
63 if ( ! bWPtr ) {
65 goto copy;
66 }
67 isSigNaNB = f128M_isSignalingNaN( (const float128_t *) bWPtr );
68 if ( isSigNaNA | isSigNaNB ) {
70 if ( isSigNaNA ) {
71 if ( isSigNaNB ) goto returnLargerUIMag;
72 if ( softfloat_isNaNF128M( bWPtr ) ) goto copyB;
73 goto copy;
74 } else {
75 if ( softfloat_isNaNF128M( aWPtr ) ) goto copy;
76 goto copyB;
77 }
78 }
79 returnLargerUIMag:
80 uiA96 = aWPtr[indexWordHi( 4 )];
81 uiB96 = bWPtr[indexWordHi( 4 )];
82 wordMagA = uiA96 & 0x7FFFFFFF;
83 wordMagB = uiB96 & 0x7FFFFFFF;
84 if ( wordMagA < wordMagB ) goto copyB;
85 if ( wordMagB < wordMagA ) goto copy;
86 wordMagA = aWPtr[indexWord( 4, 2 )];
87 wordMagB = bWPtr[indexWord( 4, 2 )];
88 if ( wordMagA < wordMagB ) goto copyB;
89 if ( wordMagB < wordMagA ) goto copy;
90 wordMagA = aWPtr[indexWord( 4, 1 )];
91 wordMagB = bWPtr[indexWord( 4, 1 )];
92 if ( wordMagA < wordMagB ) goto copyB;
93 if ( wordMagB < wordMagA ) goto copy;
94 wordMagA = aWPtr[indexWord( 4, 0 )];
95 wordMagB = bWPtr[indexWord( 4, 0 )];
96 if ( wordMagA < wordMagB ) goto copyB;
97 if ( wordMagB < wordMagA ) goto copy;
98 if ( uiA96 < uiB96 ) goto copy;
99 copyB:
100 ptr = bWPtr;
101 copy:
102 zWPtr[indexWordHi( 4 )] = ptr[indexWordHi( 4 )] | 0x00008000;
103 zWPtr[indexWord( 4, 2 )] = ptr[indexWord( 4, 2 )];
104 zWPtr[indexWord( 4, 1 )] = ptr[indexWord( 4, 1 )];
105 zWPtr[indexWord( 4, 0 )] = ptr[indexWord( 4, 0 )];
106
107}
void copy(const path &from, const path &to)
bool f128M_isSignalingNaN(const float128_t *aPtr)
void softfloat_raiseFlags(uint_fast8_t flags)
bool softfloat_isNaNF128M(const uint32_t *)
#define indexWord(total, n)
#define indexWordHi(total)
@ softfloat_flag_invalid
Definition softfloat.h:89
unsigned int uint32_t
Definition stdint.h:126
Here is the call graph for this function: