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

Go to the source code of this file.

Functions

uint_fast32_t softfloat_propagateNaNF32UI (uint_fast32_t uiA, uint_fast32_t uiB)
 

Function Documentation

◆ softfloat_propagateNaNF32UI()

uint_fast32_t softfloat_propagateNaNF32UI ( uint_fast32_t uiA,
uint_fast32_t uiB )

Definition at line 51 of file s_propagateNaNF32UI.c.

52{
53 bool isSigNaNA, isSigNaNB;
54 uint_fast32_t uiNonsigA, uiNonsigB, uiMagA, uiMagB;
55
56 /*------------------------------------------------------------------------
57 *------------------------------------------------------------------------*/
58 isSigNaNA = softfloat_isSigNaNF32UI( uiA );
59 isSigNaNB = softfloat_isSigNaNF32UI( uiB );
60 /*------------------------------------------------------------------------
61 | Make NaNs non-signaling.
62 *------------------------------------------------------------------------*/
63 uiNonsigA = uiA | 0x00400000;
64 uiNonsigB = uiB | 0x00400000;
65 /*------------------------------------------------------------------------
66 *------------------------------------------------------------------------*/
67 if ( isSigNaNA | isSigNaNB ) {
69 if ( isSigNaNA ) {
70 if ( isSigNaNB ) goto returnLargerMag;
71 return isNaNF32UI( uiB ) ? uiNonsigB : uiNonsigA;
72 } else {
73 return isNaNF32UI( uiA ) ? uiNonsigA : uiNonsigB;
74 }
75 }
76 returnLargerMag:
77 uiMagA = uiA & 0x7FFFFFFF;
78 uiMagB = uiB & 0x7FFFFFFF;
79 if ( uiMagA < uiMagB ) return uiNonsigB;
80 if ( uiMagB < uiMagA ) return uiNonsigA;
81 return (uiNonsigA < uiNonsigB) ? uiNonsigA : uiNonsigB;
82
83}
void softfloat_raiseFlags(uint_fast8_t flags)
#define softfloat_isSigNaNF32UI(uiA)
Definition specialize.h:130
#define isNaNF32UI(a)
Definition internals.h:109
@ softfloat_flag_invalid
Definition softfloat.h:89
uint32_t uint_fast32_t
Definition stdint.h:156
Here is the call graph for this function: