os/ossrv/genericopenlibs/cstdlib/LINCMACH/IEEEFP.H
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/cstdlib/LINCMACH/IEEEFP.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,177 @@
     1.4 +/*
     1.5 +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +
    1.23 +/**
    1.24 + @file
    1.25 + @publishedAll
    1.26 + @released
    1.27 +*/
    1.28 +
    1.29 +#ifndef __IEEE_BIG_ENDIAN
    1.30 +#ifndef __IEEE_LITTLE_ENDIAN
    1.31 +
    1.32 +/**
    1.33 +EPOC safety net - Check various EPOC defines to ensure that
    1.34 +we get an appropriate endianness choice
    1.35 +*/
    1.36 +#if (defined(__WINS__) || defined(__MX86__) || defined(__X86GCC__)) && !defined(__i386__)
    1.37 +#define __i386__
    1.38 +#elif defined(__MARM__) && !defined(__arm__)
    1.39 +#define __arm__
    1.40 +#endif
    1.41 +
    1.42 +#ifdef __arm__
    1.43 +	#ifdef __EABI__
    1.44 +	/**
    1.45 +	EABI supports the VFP specification, where the ordering of the words
    1.46 +	matches the endianness.
    1.47 +	*/
    1.48 +	#define __IEEE_LITTLE_ENDIAN
    1.49 +#else
    1.50 +	/** 
    1.51 +	Pre-VFP, ARM used the big endian ordering of the words, regardless of
    1.52 +	the endianess. 
    1.53 +	*/
    1.54 +	#define __IEEE_BIG_ENDIAN
    1.55 +	#endif
    1.56 +#endif
    1.57 +
    1.58 +#ifdef __hppa__
    1.59 +
    1.60 +#define __IEEE_BIG_ENDIAN
    1.61 +#endif
    1.62 +
    1.63 +#ifdef __sparc__
    1.64 +
    1.65 +#define __IEEE_BIG_ENDIAN
    1.66 +#endif
    1.67 +
    1.68 +#if defined(__m68k__) || defined(__mc68000__)
    1.69 +
    1.70 +#define __IEEE_BIG_ENDIAN
    1.71 +#endif
    1.72 +
    1.73 +#if defined (__H8300__) || defined (__H8300H__)
    1.74 +
    1.75 +#define __IEEE_BIG_ENDIAN
    1.76 +#define __SMALL_BITFIELDS
    1.77 +#define _DOUBLE_IS_32BITS
    1.78 +#endif
    1.79 +
    1.80 +#ifdef __H8500__
    1.81 +
    1.82 +#define __IEEE_BIG_ENDIAN
    1.83 +#define __SMALL_BITFIELDS
    1.84 +#define _DOUBLE_IS_32BITS
    1.85 +#endif
    1.86 +
    1.87 +#ifdef __sh__
    1.88 +#ifdef __LITTLE_ENDIAN__
    1.89 +
    1.90 +#define __IEEE_LITTLE_ENDIAN
    1.91 +#else
    1.92 +#define __IEEE_BIG_ENDIAN
    1.93 +#endif
    1.94 +#ifdef __SH3E__
    1.95 +
    1.96 +#define _DOUBLE_IS_32BITS
    1.97 +#endif
    1.98 +#endif
    1.99 +
   1.100 +#ifdef _AM29K
   1.101 +
   1.102 +#define __IEEE_BIG_ENDIAN
   1.103 +#endif
   1.104 +
   1.105 +/* Added "&& !defined(__arm__)" to avoid the duplicate definition of the
   1.106 +   __ieee_[float|double]_shape_type structures in stdlib\LINC\IEEEFP.h 
   1.107 +   conditionally compiled using the __IEEE_LITTLE_ENDIAN && __IEEE_BIG_ENDIAN 
   1.108 +   in GCCXML builds. This is a work around as we can't get gccxml to stop 
   1.109 +   defining __i386__ as it's defined in the "<built-in>" header file of the 
   1.110 +   compiler.
   1.111 +*/
   1.112 +#if defined(__i386__) && !defined(__arm__)
   1.113 +
   1.114 +#define __IEEE_LITTLE_ENDIAN
   1.115 +#endif
   1.116 +
   1.117 +#ifdef __i960__
   1.118 +
   1.119 +#define __IEEE_LITTLE_ENDIAN
   1.120 +#endif
   1.121 +
   1.122 +#ifdef __MIPSEL__
   1.123 +
   1.124 +#define __IEEE_LITTLE_ENDIAN
   1.125 +#endif
   1.126 +#ifdef __MIPSEB__
   1.127 +
   1.128 +#define __IEEE_BIG_ENDIAN
   1.129 +#endif
   1.130 +
   1.131 +/**
   1.132 +necv70 was __IEEE_LITTLE_ENDIAN. 
   1.133 +*/
   1.134 +
   1.135 +#ifdef __W65__
   1.136 +
   1.137 +#define __IEEE_LITTLE_ENDIAN
   1.138 +#define __SMALL_BITFIELDS
   1.139 +#define _DOUBLE_IS_32BITS
   1.140 +#endif
   1.141 +
   1.142 +#if defined(__Z8001__) || defined(__Z8002__)
   1.143 +
   1.144 +#define __IEEE_BIG_ENDIAN
   1.145 +#endif
   1.146 +
   1.147 +#ifdef __m88k__
   1.148 +
   1.149 +#define __IEEE_BIG_ENDIAN
   1.150 +#endif
   1.151 +
   1.152 +#ifdef __v800
   1.153 +
   1.154 +#define __IEEE_LITTLE_ENDIAN
   1.155 +#endif
   1.156 +
   1.157 +#ifdef __PPC__
   1.158 +#ifdef _BIG_ENDIAN
   1.159 +
   1.160 +#define __IEEE_BIG_ENDIAN
   1.161 +#else
   1.162 +
   1.163 +#define __IEEE_LITTLE_ENDIAN
   1.164 +#endif
   1.165 +#endif
   1.166 +
   1.167 +#ifdef __mcore__
   1.168 +
   1.169 +#define __IEEE_LITTLE_ENDIAN	/* always little-endian M*Core for EPOC */
   1.170 +#endif
   1.171 +
   1.172 +#ifndef __IEEE_BIG_ENDIAN
   1.173 +#ifndef __IEEE_LITTLE_ENDIAN
   1.174 +#error Endianess not declared!!
   1.175 +#endif /* not __IEEE_LITTLE_ENDIAN */
   1.176 +#endif /* not __IEEE_BIG_ENDIAN */
   1.177 +
   1.178 +#endif /* not __IEEE_LITTLE_ENDIAN */
   1.179 +#endif /* not __IEEE_BIG_ENDIAN */
   1.180 +