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 | 7 | ||||
-rw-r--r-- | newlib/libc/include/sys/config.h | 16 |
3 files changed, 28 insertions, 0 deletions
diff --git a/newlib/libc/include/machine/ieeefp.h b/newlib/libc/include/machine/ieeefp.h index 65f1c1050..5554c65df 100644 --- a/newlib/libc/include/machine/ieeefp.h +++ b/newlib/libc/include/machine/ieeefp.h @@ -360,6 +360,11 @@ #endif +#if (defined(__CR16__) || defined(__CR16C__) ||defined(__CR16CP__)) +#define __IEEE_LITTLE_ENDIAN +#define __SMALL_BITFIELDS /* 16 Bit INT */ +#endif + #ifndef __IEEE_BIG_ENDIAN #ifndef __IEEE_LITTLE_ENDIAN #error Endianess not declared!! diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h index 428ef2906..a46996511 100644 --- a/newlib/libc/include/machine/setjmp.h +++ b/newlib/libc/include/machine/setjmp.h @@ -204,6 +204,13 @@ _BEGIN_STD_C #define _JBLEN 9 #endif +#if (defined(__CR16__) || defined(__CR16C__) ||defined(__CR16CP__)) +/* r6, r7, r8, r9, r10, r11, r12 (r12L, r12H), + * r13 (r13L, r13H), ra(raL, raH), sp(spL, spH) */ +#define _JBLEN 14 +#define _JBTYPE unsigned short +#endif + #ifdef __fr30__ #define _JBLEN 10 #endif diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h index 71f9d281d..49c81f915 100644 --- a/newlib/libc/include/sys/config.h +++ b/newlib/libc/include/sys/config.h @@ -30,6 +30,22 @@ #define UINT_MAX (__INT_MAX__ * 2U + 1) #endif +#if (defined(__CR16__) || defined(__CR16C__) ||defined(__CR16CP__)) +#ifndef __INT32__ +#define __SMALL_BITFIELDS +#undef INT_MAX +#undef UINT_MAX +#define INT_MAX 32767 +#define UINT_MAX (__INT_MAX__ * 2U + 1) +#else /* INT32 */ +#undef INT_MAX +#undef UINT_MAX +#define INT_MAX 2147483647 +#define UINT_MAX (__INT_MAX__ * 2U + 1) +#endif /* INT32 */ + +#endif /* CR16C */ + #if defined (__xc16x__) || defined (__xc16xL__) || defined (__xc16xS__) #define __SMALL_BITFIELDS #endif |