kernel/eka/compsupp/gcce/gcce.h
author Mike Kinghan <mikek@symbian.org>
Tue, 27 Jul 2010 07:53:26 +0100
branchGCC_SURGE
changeset 236 7dc50dc94301
parent 171 b2a73696d15a
permissions -rw-r--r--
1) Fix for bug 3413 - [GCCE] Namespace 'abi' not declared in e32test build. 2) Revert fix for bug 3389; fix for 3431 replaces it. 3) Correct typo in fix for bug 3391.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     1
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     2
// All rights reserved.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     3
// This component and the accompanying materials are made available
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     4
// under the terms of the License "ARM EABI LICENCE.txt"
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     5
// which accompanies this distribution, and is available
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     6
// in kernel/eka/compsupp.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     7
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     8
// Initial Contributors:
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    10
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    11
// Contributors:
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    12
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    13
// Description:
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    14
// e32\compsupp\gcce\gcce.h
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    15
// This is the preinclude file for the GCC-E compiler
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    16
// It contains all the compiler specific definitions required by the SOS source
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    17
// 
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    18
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    19
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    20
/**
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    21
 @file
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    22
 @publishedAll
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    23
 @released
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    24
*/
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    25
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    26
#if defined(__PRODUCT_INCLUDE__)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    27
#include __PRODUCT_INCLUDE__
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    28
#endif
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    29
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    30
// stuff from e32def.h
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    31
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    32
#define __NO_CLASS_CONSTS__
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    33
#define __NORETURN__ __declspec(noreturn)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    34
#define __NORETURN_TERMINATOR()
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    35
171
b2a73696d15a Remove the experimental changes to gcce.h, and revert the widespread freezing of exports (was a suggested fix for Bug 3025)
William Roberts <williamr@symbian.org>
parents: 169
diff changeset
    36
#define IMPORT_C __declspec(dllimport) 
b2a73696d15a Remove the experimental changes to gcce.h, and revert the widespread freezing of exports (was a suggested fix for Bug 3025)
William Roberts <williamr@symbian.org>
parents: 169
diff changeset
    37
#define EXPORT_C __declspec(dllexport)
0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    38
171
b2a73696d15a Remove the experimental changes to gcce.h, and revert the widespread freezing of exports (was a suggested fix for Bug 3025)
William Roberts <williamr@symbian.org>
parents: 169
diff changeset
    39
#define IMPORT_D __declspec(dllimport) 
b2a73696d15a Remove the experimental changes to gcce.h, and revert the widespread freezing of exports (was a suggested fix for Bug 3025)
William Roberts <williamr@symbian.org>
parents: 169
diff changeset
    40
#define EXPORT_D __declspec(dllexport)
0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    41
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    42
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    43
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    44
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    45
/**
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    46
Declares a class as being non-sharable.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    47
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    48
If a class is non-sharable, then a class implemented in another DLL cannot
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    49
derive (inherit) from that class.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    50
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    51
Declaring a class as non-sharable prevents the compiler from exporting compiler
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    52
implementation-specific symbols, i.e. run-time type-information and virtual
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    53
tables. This prevents classes in other DLLs from being able to derive from it.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    54
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    55
Note :
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    56
- if a class is marked as non-sharable, then Symbian OS requires all
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    57
classes that are derived from that class, and which are also implemented in the same DLL, 
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    58
to be declared as non-sharable.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    59
- by default, a class is sharable.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    60
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    61
The following code fragment shows how a non-sharable class is declared.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    62
@code
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    63
NONSHARABLE_CLASS(CMyClass) : public CBase
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    64
	{
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    65
	public :
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    66
	...
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    67
	private :
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    68
	...
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    69
	}
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    70
@endcode
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    71
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    72
@param x  The name of the class to be declared as non-sharable.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    73
*/
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    74
#define NONSHARABLE_CLASS(x) class __declspec(notshared) x
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    75
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    76
#define NONSHARABLE_STRUCT(x) struct __declspec(notshared) x
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    77
#define __NO_THROW throw ()
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    78
#define __THROW(t) throw (t)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    79
#define TEMPLATE_SPECIALIZATION template<>
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    80
#ifndef __int64
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    81
#define __int64  long long
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    82
#endif
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    83
#define __VALUE_IN_REGS__
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    84
#define	I64LIT(x)	x##LL
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    85
#define	UI64LIT(x)	x##ULL
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    86
#define __SOFTFP
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    87
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    88
// __TText from e32cmn.h also e32des16.h
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    89
#ifdef __cplusplus
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    90
typedef wchar_t __TText;	// Only ISO C++ has wchar_t as a primitive type
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    91
#define __wchar_t_defined
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    92
#else
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    93
typedef unsigned short __TText;	
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    94
#endif
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    95
#define __TText_defined
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    96
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    97
// __NAKED__ from cpudefs.h
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    98
#define __NAKED__ __declspec(naked)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    99
#define ____ONLY_USE_NAKED_IN_CIA____ __declspec(naked)
104
466a0df5c15a RVCT 4.0 support, gcce fixes (Bug 2283)
Chetan Kapoor <chetank@symbian.org>
parents: 0
diff changeset
   100
#define __WEAK__  __attribute__((weak))
0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   101
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   102
// Int64 and Uint64 from nkern\nklib.h
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   103
typedef long long Int64;
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   104
typedef unsigned long long Uint64;
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   105
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   106
// Here are GCC-E's definitions for stdarg.h
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   107
// These should be used by e.g. stdlib
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   108
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   109
#ifdef __cplusplus
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   110
    namespace std { extern "C" {
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   111
#endif
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   112
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   113
    #if __GNUC__ < 4
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   114
    typedef struct __va_list { void *__ap; } va_list;
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   115
    #else
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   116
    typedef __builtin_va_list va_list;
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   117
    #endif
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   118
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   119
#ifdef __cplusplus
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   120
	} }
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   121
    using ::std::va_list;
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   122
#endif
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   123
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   124
#if __GNUC__ < 4
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   125
#define va_start(ap, parmN) __builtin_va_start(ap.__ap, parmN)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   126
#define va_arg(ap, type)    __builtin_va_arg(ap.__ap, type)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   127
#define va_end(ap)          __builtin_va_end(ap.__ap)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   128
#else
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   129
#define va_start(ap, parmN) __builtin_va_start(ap, parmN)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   130
#define va_arg(ap, type)    __builtin_va_arg(ap, type)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   131
#define va_end(ap)          __builtin_va_end(ap)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   132
#endif
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   133
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   134
#define VA_LIST va_list
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   135
#define _VA_LIST_DEFINED //To deal with stdarg.h
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   136
#define __VA_LIST_defined //To deal with e32def.h
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   137
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   138
// These are for Symbian OS C++ code
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   139
#define VA_START(ap,pn) va_start(ap, pn)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   140
#define VA_ARG(ap,type) va_arg(ap,type)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   141
#define VA_END(ap)      va_end(ap)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   142
// This should prevent /stdlib/linc/stdarg.h from doing damage.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   143
#define _STDARG_H
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   144
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   145
// now deal with stdarg_e.h
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   146
typedef va_list __e32_va_list;
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   147
#define _STDARG_E_H
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   148
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   149
// This is an EABI compliant compiler
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   150
#ifndef __EABI__
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   151
#define __EABI__
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   152
#endif
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   153
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   154
// these are hopefully temporary
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   155
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   156
// defining this means we don't get __NAKED__ ctors
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   157
#ifndef __EABI_CTORS__
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   158
#define __EABI_CTORS__
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   159
#endif
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   160
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   161
//#define __EARLY_DEBUG__
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   162
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   163
#ifndef __SYMBIAN_STDCPP_SUPPORT__
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   164
	#include <symcpp.h>
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   165
#endif
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   166
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   167
#ifdef __cplusplus
236
7dc50dc94301 1) Fix for bug 3413 - [GCCE] Namespace 'abi' not declared in e32test build.
Mike Kinghan <mikek@symbian.org>
parents: 171
diff changeset
   168
7dc50dc94301 1) Fix for bug 3413 - [GCCE] Namespace 'abi' not declared in e32test build.
Mike Kinghan <mikek@symbian.org>
parents: 171
diff changeset
   169
// To compile rtti support
7dc50dc94301 1) Fix for bug 3413 - [GCCE] Namespace 'abi' not declared in e32test build.
Mike Kinghan <mikek@symbian.org>
parents: 171
diff changeset
   170
#define __EDG_RUNTIME_USES_NAMESPACES
0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   171
// Support for throwing exceptions through embedded assembler
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   172
// Should only be needed user side
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   173
150
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   174
#define __VSTR(x) #x
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   175
#define __STR(x) __VSTR(x)
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   176
#define __GAS_SAVE_REG(reg) ".save {" __STR(reg) " }"
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   177
#define __ASM_GAS_SAVE_REG(reg) asm( __GAS_SAVE_REG(reg) );
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   178
#define __GAS_SAVE_REGS2(reg1,reg2) ".save {" __STR(reg1) "," __STR(reg2) "}"
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   179
#define __ASM_GAS_SAVE_REGS2(reg1,reg2) asm( __GAS_SAVE_REGS2(reg1,reg2) );
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   180
#define __GAS_SETFP(reg,offset) ".setfp fp," __STR(reg) ",#" __STR(offset)
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   181
#define __ASM_GAS_SETFP(reg,offset) asm( __GAS_SETFP(reg,offset) );
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   182
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   183
#define	__EH_FRAME_ADDRESS(reg,offset)	\
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   184
		__ASM_GAS_SETFP(reg,offset)
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   185
#define __EH_FRAME_PUSH2(reg1,reg2) __ASM_GAS_SAVE_REGS2(reg1,reg2)
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   186
#define __EH_FRAME_SAVE1(reg,offset) \
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   187
	__EH_FRAME_ADDRESS(fp,offset) \
9b2dbb18d44b Speculative fix for bug #1409 as per comment #4. Can't test until can build kernel.
mikek
parents: 104
diff changeset
   188
	__ASM_GAS_SAVE_REG(reg)
0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   189
156
12b6722e7753 1) Revised fix for Bug 2975 - [GCCE] Illegal inline assembler in kernel/eka/drivers/debug/rmdebug/d_rmd_stepping.cpp.
mikek
parents: 150
diff changeset
   190
#define __EH_FNSTART asm(".fnstart");
12b6722e7753 1) Revised fix for Bug 2975 - [GCCE] Illegal inline assembler in kernel/eka/drivers/debug/rmdebug/d_rmd_stepping.cpp.
mikek
parents: 150
diff changeset
   191
#define __EH_FNEND asm(".fnend");
12b6722e7753 1) Revised fix for Bug 2975 - [GCCE] Illegal inline assembler in kernel/eka/drivers/debug/rmdebug/d_rmd_stepping.cpp.
mikek
parents: 150
diff changeset
   192
0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   193
#endif
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   194