Search
lxdream.org :: lxdream/test/include/sys/config.h
lxdream 0.9.1
released Jun 29
Download Now
filename test/include/sys/config.h
changeset 185:6755a04c447f
author nkeynes
date Tue Jul 11 01:35:27 2006 +0000 (15 years ago)
permissions -rw-r--r--
last change First commit of system test framework. 3 initial test cases (incomplete):
testide, testmath, and testta
file annotate diff log raw
nkeynes@185
     1
#ifndef __SYS_CONFIG_H__
nkeynes@185
     2
#define __SYS_CONFIG_H__
nkeynes@185
     3
nkeynes@185
     4
/* exceptions first */
nkeynes@185
     5
/* ??? Why is much of this stuff duplicated with machine/ieeefp.h?  */
nkeynes@185
     6
#if defined(__H8300__) || defined(__H8500__) || defined (__H8300H__) ||  defined(__W65__) || defined (__H8300S__)
nkeynes@185
     7
#define _FLOAT_ARG float
nkeynes@185
     8
#define __SMALL_BITFIELDS
nkeynes@185
     9
#define _DOUBLE_IS_32BITS
nkeynes@185
    10
#define __IEEE_BIG_ENDIAN
nkeynes@185
    11
/* ???  This conditional is true for the h8500 and the w65, defining H8300
nkeynes@185
    12
   in those cases probably isn't the right thing to do.  */
nkeynes@185
    13
#define H8300 1
nkeynes@185
    14
#endif
nkeynes@185
    15
nkeynes@185
    16
#ifdef __W65__
nkeynes@185
    17
#define _DOUBLE_IS_32BITS
nkeynes@185
    18
#define __SMALL_BITFIELDS
nkeynes@185
    19
#define __IEEE_BIG_ENDIAN
nkeynes@185
    20
#undef INT_MAX
nkeynes@185
    21
#undef UINT_MAX
nkeynes@185
    22
#define INT_MAX 32767
nkeynes@185
    23
#define UINT_MAX 65535
nkeynes@185
    24
nkeynes@185
    25
#endif
nkeynes@185
    26
nkeynes@185
    27
/* 16 bit integer machines */
nkeynes@185
    28
#if defined(__Z8001__) || defined(__Z8002__) || defined(__H8300__) || defined(__H8500__) || defined(__W65__) || defined (__H8300H__) || defined (__H8300S__) || defined (__mn10200__)
nkeynes@185
    29
nkeynes@185
    30
#undef INT_MAX
nkeynes@185
    31
#undef UINT_MAX
nkeynes@185
    32
#define INT_MAX 32767
nkeynes@185
    33
#define UINT_MAX 65535
nkeynes@185
    34
#endif
nkeynes@185
    35
nkeynes@185
    36
#if defined(__D10V__)
nkeynes@185
    37
#undef INT_MAX
nkeynes@185
    38
#undef UINT_MAX
nkeynes@185
    39
#define INT_MAX __INT_MAX__
nkeynes@185
    40
#define UINT_MAX (__INT_MAX__ * 2U + 1)
nkeynes@185
    41
#define _DOUBLE_IS_32BITS
nkeynes@185
    42
#define _POINTER_INT short
nkeynes@185
    43
#define __IEEE_BIG_ENDIAN
nkeynes@185
    44
#endif
nkeynes@185
    45
nkeynes@185
    46
#ifdef ___AM29K__
nkeynes@185
    47
#define _FLOAT_RET double
nkeynes@185
    48
#endif
nkeynes@185
    49
nkeynes@185
    50
#ifdef __i386__
nkeynes@185
    51
#ifndef __unix__
nkeynes@185
    52
/* in other words, go32 */
nkeynes@185
    53
#define _FLOAT_RET double
nkeynes@185
    54
#endif
nkeynes@185
    55
#endif
nkeynes@185
    56
nkeynes@185
    57
#ifdef __M32R__
nkeynes@185
    58
#define __IEEE_BIG_ENDIAN
nkeynes@185
    59
#endif
nkeynes@185
    60
nkeynes@185
    61
#ifdef __m68k__
nkeynes@185
    62
/* This is defined in machine/ieeefp.h; need to check is it redundant here? */
nkeynes@185
    63
#define __IEEE_BIG_ENDIAN
nkeynes@185
    64
#endif
nkeynes@185
    65
nkeynes@185
    66
#ifdef __mn10300__
nkeynes@185
    67
#define __IEEE_LITTLE_ENDIAN
nkeynes@185
    68
#endif
nkeynes@185
    69
nkeynes@185
    70
#ifdef __mn10200__
nkeynes@185
    71
#define _DOUBLE_IS_32BITS
nkeynes@185
    72
#define __SMALL_BITFIELDS
nkeynes@185
    73
#define __IEEE_LITTLE_ENDIAN
nkeynes@185
    74
#endif
nkeynes@185
    75
nkeynes@185
    76
#ifdef __TIC80__
nkeynes@185
    77
#define __IEEE_LITTLE_ENDIAN
nkeynes@185
    78
#endif
nkeynes@185
    79
nkeynes@185
    80
#ifdef __v850
nkeynes@185
    81
#define __IEEE_LITTLE_ENDIAN
nkeynes@185
    82
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__sda__))
nkeynes@185
    83
#endif
nkeynes@185
    84
nkeynes@185
    85
#ifdef __D30V__
nkeynes@185
    86
#define __IEEE_BIG_ENDIAN
nkeynes@185
    87
#endif
nkeynes@185
    88
nkeynes@185
    89
/* For the PowerPC eabi, force the _impure_ptr to be in .sdata */
nkeynes@185
    90
#if defined(__PPC__) && defined(_CALL_SYSV)
nkeynes@185
    91
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
nkeynes@185
    92
#endif
nkeynes@185
    93
nkeynes@185
    94
#ifdef __sparc__
nkeynes@185
    95
#ifdef __LITTLE_ENDIAN_DATA__
nkeynes@185
    96
#define __IEEE_LITTLE_ENDIAN
nkeynes@185
    97
#else
nkeynes@185
    98
#define __IEEE_BIG_ENDIAN
nkeynes@185
    99
#endif
nkeynes@185
   100
#endif
nkeynes@185
   101
nkeynes@185
   102
#if INT_MAX == 32767
nkeynes@185
   103
typedef long int __int32_t;
nkeynes@185
   104
typedef unsigned long int __uint32_t;
nkeynes@185
   105
#else
nkeynes@185
   106
typedef int __int32_t;
nkeynes@185
   107
typedef unsigned int __uint32_t;
nkeynes@185
   108
#endif
nkeynes@185
   109
nkeynes@185
   110
#ifndef _POINTER_INT
nkeynes@185
   111
#define _POINTER_INT long
nkeynes@185
   112
#endif
nkeynes@185
   113
nkeynes@185
   114
nkeynes@185
   115
#endif /* __SYS_CONFIG_H__ */
.