summaryrefslogtreecommitdiff
path: root/libc/sysdeps/sh
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/sh')
-rw-r--r--libc/sysdeps/sh/sh4/fpu/bits/fenv.h37
-rw-r--r--libc/sysdeps/sh/sh4/fpu/fclrexcpt.c1
-rw-r--r--libc/sysdeps/sh/tininess.h1
3 files changed, 24 insertions, 15 deletions
diff --git a/libc/sysdeps/sh/sh4/fpu/bits/fenv.h b/libc/sysdeps/sh/sh4/fpu/bits/fenv.h
index 93159499d..a29edfc1f 100644
--- a/libc/sysdeps/sh/sh4/fpu/bits/fenv.h
+++ b/libc/sysdeps/sh/sh4/fpu/bits/fenv.h
@@ -24,16 +24,21 @@
of the appropriate bits in the FPU control word. */
enum
{
- FE_INEXACT = 0x04,
-#define FE_INEXACT FE_INEXACT
- FE_UNDERFLOW = 0x08,
-#define FE_UNDERFLOW FE_UNDERFLOW
- FE_OVERFLOW = 0x10,
-#define FE_OVERFLOW FE_OVERFLOW
- FE_DIVBYZERO = 0x20,
-#define FE_DIVBYZERO FE_DIVBYZERO
- FE_INVALID = 0x40,
-#define FE_INVALID FE_INVALID
+ FE_INEXACT =
+#define FE_INEXACT 0x04
+ FE_INEXACT,
+ FE_UNDERFLOW =
+#define FE_UNDERFLOW 0x08
+ FE_UNDERFLOW,
+ FE_OVERFLOW =
+#define FE_OVERFLOW 0x10
+ FE_OVERFLOW,
+ FE_DIVBYZERO =
+#define FE_DIVBYZERO 0x20
+ FE_DIVBYZERO,
+ FE_INVALID =
+#define FE_INVALID 0x40
+ FE_INVALID,
};
#define FE_ALL_EXCEPT \
@@ -46,10 +51,12 @@ enum
{
__FE_UNDEFINED = -1,
- FE_TONEAREST = 0x0,
-#define FE_TONEAREST FE_TONEAREST
- FE_TOWARDZERO = 0x1,
-#define FE_TOWARDZERO FE_TOWARDZERO
+ FE_TONEAREST =
+#define FE_TONEAREST 0x0
+ FE_TONEAREST,
+ FE_TOWARDZERO =
+#define FE_TOWARDZERO 0x1
+ FE_TOWARDZERO,
};
@@ -66,4 +73,4 @@ typedef struct
fenv_t;
/* If the default argument is used we use this value. */
-#define FE_DFL_ENV ((fenv_t *) -1)
+#define FE_DFL_ENV ((const fenv_t *) -1)
diff --git a/libc/sysdeps/sh/sh4/fpu/fclrexcpt.c b/libc/sysdeps/sh/sh4/fpu/fclrexcpt.c
index b4b2ead02..2d31fa651 100644
--- a/libc/sysdeps/sh/sh4/fpu/fclrexcpt.c
+++ b/libc/sysdeps/sh/sh4/fpu/fclrexcpt.c
@@ -39,3 +39,4 @@ feclearexcept (int excepts)
return 0;
}
+libm_hidden_def (feclearexcept)
diff --git a/libc/sysdeps/sh/tininess.h b/libc/sysdeps/sh/tininess.h
new file mode 100644
index 000000000..1db37790f
--- /dev/null
+++ b/libc/sysdeps/sh/tininess.h
@@ -0,0 +1 @@
+#define TININESS_AFTER_ROUNDING 1