summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/arm/bits
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-11-17 02:07:34 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-11-17 02:07:34 +0000
commit94a2a2040adfc4863ab2fb501cdbf4fb87849be2 (patch)
tree39155622b8c9114bf41aa79b2918837e73a933cb /libc/sysdeps/linux/arm/bits
parentf749efc0e5f1f8602c7e4f0c8c5b7d52ac18ab53 (diff)
downloaduClibc-alpine-94a2a2040adfc4863ab2fb501cdbf4fb87849be2.tar.bz2
uClibc-alpine-94a2a2040adfc4863ab2fb501cdbf4fb87849be2.tar.xz
Massive merge from trunk.
Diffstat (limited to 'libc/sysdeps/linux/arm/bits')
-rw-r--r--libc/sysdeps/linux/arm/bits/endian.h11
-rw-r--r--libc/sysdeps/linux/arm/bits/fenv.h41
-rw-r--r--libc/sysdeps/linux/arm/bits/setjmp.h10
3 files changed, 55 insertions, 7 deletions
diff --git a/libc/sysdeps/linux/arm/bits/endian.h b/libc/sysdeps/linux/arm/bits/endian.h
index 1476881cb..27946cdee 100644
--- a/libc/sysdeps/linux/arm/bits/endian.h
+++ b/libc/sysdeps/linux/arm/bits/endian.h
@@ -1,19 +1,18 @@
-/* ARM is (usually) little-endian.
- * Older FPU style (FPA) is always big-endian.
- * Newer FPU style (VFP) is same as host byte-order.
- */
-
#ifndef _ENDIAN_H
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
#endif
+/* ARM can be either big or little endian. */
#ifdef __ARMEB__
# define __BYTE_ORDER __BIG_ENDIAN
#else
# define __BYTE_ORDER __LITTLE_ENDIAN
#endif
-#ifdef __VFP_FP__
+/* FPA floating point units are always big-endian, irrespective of the
+ CPU endianness. VFP floating point units use the same endianness
+ as the rest of the system. */
+#if defined __VFP_FP__ || defined __MAVERICK__
# define __FLOAT_WORD_ORDER __BYTE_ORDER
#else
# define __FLOAT_WORD_ORDER __BIG_ENDIAN
diff --git a/libc/sysdeps/linux/arm/bits/fenv.h b/libc/sysdeps/linux/arm/bits/fenv.h
index 7bd242385..3764d7749 100644
--- a/libc/sysdeps/linux/arm/bits/fenv.h
+++ b/libc/sysdeps/linux/arm/bits/fenv.h
@@ -20,6 +20,45 @@
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
#endif
+#ifdef __MAVERICK__
+
+/* Define bits representing exceptions in the FPU status word. */
+enum
+ {
+ FE_INVALID = 1,
+#define FE_INVALID FE_INVALID
+ FE_OVERFLOW = 4,
+#define FE_OVERFLOW FE_OVERFLOW
+ FE_UNDERFLOW = 8,
+#define FE_UNDERFLOW FE_UNDERFLOW
+ FE_INEXACT = 16,
+#define FE_INEXACT FE_INEXACT
+ };
+
+/* Amount to shift by to convert an exception to a mask bit. */
+#define FE_EXCEPT_SHIFT 5
+
+/* All supported exceptions. */
+#define FE_ALL_EXCEPT \
+ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
+
+/* IEEE rounding modes. */
+enum
+ {
+ FE_TONEAREST = 0,
+#define FE_TONEAREST FE_TONEAREST
+ FE_TOWARDZERO = 0x400,
+#define FE_TOWARDZERO FE_TOWARDZERO
+ FE_DOWNWARD = 0x800,
+#define FE_DOWNWARD FE_DOWNWARD
+ FE_UPWARD = 0xc00,
+#define FE_UPWARD FE_UPWARD
+ };
+
+#define FE_ROUND_MASK (FE_UPWARD)
+
+#else /* !__MAVERICK__ */
+
/* Define bits representing exceptions in the FPU status word. */
enum
{
@@ -44,6 +83,8 @@ enum
modes exist, but you have to encode them in the actual instruction. */
#define FE_TONEAREST 0
+#endif /* __MAVERICK__ */
+
/* Type representing exception flags. */
typedef unsigned long int fexcept_t;
diff --git a/libc/sysdeps/linux/arm/bits/setjmp.h b/libc/sysdeps/linux/arm/bits/setjmp.h
index dd8524303..ad42f96cd 100644
--- a/libc/sysdeps/linux/arm/bits/setjmp.h
+++ b/libc/sysdeps/linux/arm/bits/setjmp.h
@@ -17,16 +17,22 @@
02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. ARM version. */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
-#ifndef _SETJMP_H
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
#ifndef _ASM
/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
saved. */
+#ifdef __MAVERICK__
+typedef int __jmp_buf[34];
+#else
typedef int __jmp_buf[22];
#endif
+#endif
#define __JMP_BUF_SP 20
@@ -34,3 +40,5 @@ typedef int __jmp_buf[22];
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
+
+#endif /* bits/setjmp.h */