diff options
Diffstat (limited to 'newlib/libc/include')
-rw-r--r-- | newlib/libc/include/machine/ieeefp.h | 5 | ||||
-rw-r--r-- | newlib/libc/include/machine/setjmp.h | 9 | ||||
-rw-r--r-- | newlib/libc/include/sys/config.h | 16 |
3 files changed, 30 insertions, 0 deletions
diff --git a/newlib/libc/include/machine/ieeefp.h b/newlib/libc/include/machine/ieeefp.h index 333603cd8..9da91332d 100644 --- a/newlib/libc/include/machine/ieeefp.h +++ b/newlib/libc/include/machine/ieeefp.h @@ -269,6 +269,11 @@ #endif /* __ARMEL__ */ #endif /* __MAVERICK__ */ +#ifdef __m32c__ +#define __IEEE_LITTLE_ENDIAN +#define __SMALL_BITFIELDS +#endif + #ifdef __CRIS__ #define __IEEE_LITTLE_ENDIAN #endif diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h index efc11f06e..f38123aba 100644 --- a/newlib/libc/include/machine/setjmp.h +++ b/newlib/libc/include/machine/setjmp.h @@ -213,6 +213,15 @@ _BEGIN_STD_C #define _JBLEN 18 #endif +#ifdef __m32c__ +#if defined(__r8c_cpu__) || defined(__m16c_cpu__) +#define _JBLEN (22/2) +#else +#define _JBLEN (34/2) +#endif +#define _JBTYPE unsigned short +#endif /* __m32c__ */ + #ifdef _JBLEN #ifdef _JBTYPE typedef _JBTYPE jmp_buf[_JBLEN]; diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h index 1dd045498..b287b5e28 100644 --- a/newlib/libc/include/sys/config.h +++ b/newlib/libc/include/sys/config.h @@ -105,6 +105,22 @@ #define __BUFSIZ__ 16 #define _REENT_SMALL #endif +#ifdef __m32c__ +#define __SMALL_BITFIELDS +#undef INT_MAX +#undef UINT_MAX +#define INT_MAX __INT_MAX__ +#define UINT_MAX (__INT_MAX__ * 2U + 1) +#define MALLOC_ALIGNMENT 8 +#if defined(__r8c_cpu__) || defined(__m16c_cpu__) +#define _POINTER_INT short +#else +#define _POINTER_INT long +#endif +#define __BUFSIZ__ 16 +#define _REENT_SMALL +#endif /* __m32c__ */ + /* This block should be kept in sync with GCC's limits.h. The point of having these definitions here is to not include limits.h, which |