kernel/eka/compsupp/rvct2_0/rvct2_0.h
changeset 266 0008ccd16016
parent 259 57b9594f5772
child 272 70a6efdb753f
child 281 13fbfa31d2ba
equal deleted inserted replaced
259:57b9594f5772 266:0008ccd16016
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "ARM EABI LICENCE.txt"
       
     5 // which accompanies this distribution, and is available
       
     6 // in kernel/eka/compsupp.
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // e32\compsupp\rvct2_0\rvct2_0.h
       
    15 // This is the preinclude file for the rvct 2.0 compiler
       
    16 // It contains all the compiler specific definitions required by the SOS source
       
    17 // 
       
    18 //
       
    19 
       
    20 
       
    21 #if defined(__PRODUCT_INCLUDE__)
       
    22 #include __PRODUCT_INCLUDE__
       
    23 #endif
       
    24 
       
    25 
       
    26 // stuff from e32def.h
       
    27 /**
       
    28 @publishedAll
       
    29 @released
       
    30 */
       
    31 #define __NO_CLASS_CONSTS__
       
    32 
       
    33 /**
       
    34 @publishedAll
       
    35 @released
       
    36 */
       
    37 #define __NORETURN__
       
    38 
       
    39 /**
       
    40 @publishedAll
       
    41 @released
       
    42 */
       
    43 #define __NORETURN_TERMINATOR()
       
    44 
       
    45 /**
       
    46 @publishedAll
       
    47 @released
       
    48 */
       
    49 #define IMPORT_C __declspec(dllimport) 
       
    50 
       
    51 /**
       
    52 @publishedAll
       
    53 @released
       
    54 */
       
    55 #define EXPORT_C __declspec(dllexport)
       
    56 
       
    57 /**
       
    58 @publishedAll
       
    59 @released
       
    60 */
       
    61 #define IMPORT_VT __declspec(dllimport) 
       
    62 
       
    63 /**
       
    64 @publishedAll
       
    65 @released
       
    66 */
       
    67 #define __NO_THROW throw ()
       
    68 
       
    69 /**
       
    70 @publishedAll
       
    71 @released
       
    72 */
       
    73 #define __THROW(t) throw (t)
       
    74 
       
    75 /**
       
    76 @publishedAll
       
    77 @released
       
    78 */
       
    79 #define TEMPLATE_SPECIALIZATION template<>
       
    80 
       
    81 #ifndef __int64
       
    82 /**
       
    83 @internalComponent
       
    84 */
       
    85 #define __int64  long long
       
    86 #endif
       
    87 
       
    88 /**
       
    89 @internalComponent
       
    90 */
       
    91 #define __VALUE_IN_REGS__ __value_in_regs
       
    92 
       
    93 /**
       
    94 @publishedAll
       
    95 @released
       
    96 */
       
    97 #define	I64LIT(x)	x##LL
       
    98 
       
    99 /**
       
   100 @publishedAll
       
   101 @released
       
   102 */
       
   103 #define	UI64LIT(x)	x##ULL
       
   104 
       
   105 // __TText from e32cmn.h also e32des16.h
       
   106 #ifdef __cplusplus
       
   107 /**
       
   108 @internalComponent
       
   109 */
       
   110 typedef wchar_t __TText;	// Only ISO C++ has wchar_t as a primitive type
       
   111 
       
   112 /**
       
   113 @internalComponent
       
   114 */
       
   115 #define __wchar_t_defined
       
   116 #else
       
   117 /**
       
   118 @internalComponent
       
   119 */
       
   120 typedef unsigned short __TText;	
       
   121 #endif
       
   122 
       
   123 /**
       
   124 @internalComponent
       
   125 */
       
   126 #define __TText_defined
       
   127 
       
   128 // __NAKED__ from cpudefs.h
       
   129 /**
       
   130 @publishedAll
       
   131 @released
       
   132 */
       
   133 #define __NAKED__ __asm
       
   134 
       
   135 /**
       
   136 @internalComponent
       
   137 */
       
   138 #define ____ONLY_USE_NAKED_IN_CIA____ __asm
       
   139 
       
   140 // Int64 and Uint64 from nkern\nklib.h
       
   141 /**
       
   142 @publishedAll
       
   143 @released
       
   144 */
       
   145 typedef long long Int64;
       
   146 
       
   147 /**
       
   148 @publishedAll
       
   149 @released
       
   150 */
       
   151 typedef unsigned long long Uint64;
       
   152 
       
   153 // Here are RVCT 2.0's definitions for stdarg.h
       
   154 // These should be used by e.g. stdlib
       
   155 
       
   156 // see if we're using the BETA B compiler
       
   157 #if (__ARMCC_VERSION == 200022)
       
   158 #define RVCTBETA
       
   159 #endif
       
   160 
       
   161 #ifdef __cplusplus
       
   162     namespace std {
       
   163         extern "C" {
       
   164 #endif  /* __cplusplus */
       
   165 
       
   166 #ifdef RVCTBETA
       
   167 /**
       
   168 @internalComponent
       
   169 */
       
   170 	  typedef int *va_list[1];
       
   171 #else
       
   172 /**
       
   173 @internalComponent
       
   174 */
       
   175 	  typedef struct __va_list { void *__ap; } va_list;
       
   176 #endif
       
   177 
       
   178 #ifdef __cplusplus
       
   179 	}  /* extern "C" */
       
   180     }  /* namespace std */
       
   181 
       
   182     using ::std::va_list;
       
   183 #endif
       
   184 
       
   185 /**
       
   186 @internalComponent
       
   187 */
       
   188 #define va_start(ap, parmN) __va_start(ap, parmN)
       
   189 
       
   190 /**
       
   191 @internalComponent
       
   192 */
       
   193 #define va_arg(ap, type) __va_arg(ap, type)
       
   194 
       
   195 /**
       
   196 @internalComponent
       
   197 */
       
   198 #define va_end(ap) ((void)0)
       
   199 
       
   200 // These are for Symbian OS C++ code
       
   201 /**
       
   202 @publishedAll
       
   203 @released
       
   204 */
       
   205 #define VA_START(ap,pn) va_start(ap, pn)
       
   206 
       
   207 /**
       
   208 @publishedAll
       
   209 @released
       
   210 */
       
   211 #define VA_ARG(ap,type) va_arg(ap,type)
       
   212 
       
   213 /**
       
   214 @publishedAll
       
   215 @released
       
   216 */
       
   217 #define VA_END(ap)      va_end(ap)
       
   218 
       
   219 /**
       
   220 @publishedAll
       
   221 @released
       
   222 */
       
   223 #define VA_LIST va_list
       
   224 
       
   225 /**
       
   226 @internalComponent
       
   227 */
       
   228 #define __VA_LIST_defined
       
   229 // This should prevent /stdlib/linc/stdarg.h from doing damage.
       
   230 #define _STDARG_H
       
   231 
       
   232 // now deal with stdarg_e.h
       
   233 /**
       
   234 @internalComponent
       
   235 */
       
   236 typedef va_list __e32_va_list;
       
   237 
       
   238 /**
       
   239 @internalComponent
       
   240 */
       
   241 #define _STDARG_E_H
       
   242 
       
   243 // This is an EABI compliant compiler
       
   244 #ifndef __EABI__
       
   245 /**
       
   246 @publishedAll
       
   247 @released
       
   248 */
       
   249 #define __EABI__
       
   250 #endif
       
   251 
       
   252 // these are hopefully temporary
       
   253 
       
   254 // defining this means we don't get __NAKED__ ctors
       
   255 #ifndef __EABI_CTORS__
       
   256 /**
       
   257 @publishedAll
       
   258 @released
       
   259 */
       
   260 #define __EABI_CTORS__
       
   261 #endif
       
   262 
       
   263 //#define __EARLY_DEBUG__
       
   264