Skip to content

Commit 9b7763b

Browse files
committed
machine/sh: SH2E doesn't support FE_OVERFLOW, FE_UNDERFLOW or FE_INEXACT
Don't set these values when building for SH2E. Signed-off-by: Keith Packard <[email protected]>
1 parent 41a7635 commit 9b7763b

File tree

1 file changed

+4
-0
lines changed
  • newlib/libc/machine/sh/sys

1 file changed

+4
-0
lines changed

newlib/libc/machine/sh/sys/fenv.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,15 @@ typedef int fexcept_t;
6060
/* Exception flags */
6161
#define FE_INVALID 0x0040
6262
#define FE_DIVBYZERO 0x0020
63+
#if defined(__SH2E__)
64+
#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INVALID)
65+
#else
6366
#define FE_OVERFLOW 0x0010
6467
#define FE_UNDERFLOW 0x0008
6568
#define FE_INEXACT 0x0004
6669
#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \
6770
FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
71+
#endif
6872

6973
/* Rounding modes */
7074
#define FE_TONEAREST 0x0000

0 commit comments

Comments
 (0)