Merge softfloat_riscv into softfloat
[riscv-isa-sim.git] / softfloat / s_propagateNaNF32UI.c
1
2 /*** UPDATE COMMENTS. ***/
3
4 #include <stdbool.h>
5 #include <stdint.h>
6 #include "platform.h"
7 #include "internals.h"
8 #include "specialize.h"
9 #include "softfloat.h"
10
11 /*----------------------------------------------------------------------------
12 | Takes two single-precision floating-point values `a' and `b', one of which
13 | is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a
14 | signaling NaN, the invalid exception is raised.
15 *----------------------------------------------------------------------------*/
16
17 uint_fast32_t
18 softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB )
19 {
20 if ( softfloat_isSigNaNF32UI( uiA ) | softfloat_isSigNaNF32UI( uiB ) ) {
21 softfloat_raiseFlags( softfloat_flag_invalid );
22 }
23 return defaultNaNF32UI;
24 }
25