os/kernelhwsrv/kernel/eka/compsupp/aehabi/cxxabi.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /* Copyright (c) Edison Design Group, 2002. */
     2 /*
     3 cxxabi.h -- Include file for IA-64 ABI entry points.
     4 */
     5 
     6 #ifndef __CXXABI_H
     7 #define __CXXABI_H
     8 
     9 #ifndef __STDDEF_H
    10 #include <stddef.h>
    11 #endif  /* ifndef __STDDEF_H */
    12 #include <typeinfo>
    13 
    14 #ifdef __EDG_RUNTIME_USES_NAMESPACES
    15 namespace __cxxabiv1 {
    16   using namespace std;
    17 #endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
    18 
    19   /* type_info implementation classes */
    20 
    21 #pragma define_type_info
    22   class __fundamental_type_info : public type_info {
    23   public:
    24     virtual ~__fundamental_type_info();
    25   };
    26 
    27 #pragma define_type_info
    28   class __array_type_info : public type_info {
    29   public:
    30     virtual ~__array_type_info();
    31   };
    32 
    33 #pragma define_type_info
    34   class __function_type_info : public type_info {
    35   public:
    36     virtual ~__function_type_info();
    37   };
    38 
    39 #pragma define_type_info
    40   class __enum_type_info : public type_info {
    41   public:
    42     virtual ~__enum_type_info();
    43   };
    44 
    45 #pragma define_type_info
    46   class __class_type_info : public type_info {
    47   public:
    48     virtual ~__class_type_info();
    49   };
    50 
    51 #pragma define_type_info
    52   class __si_class_type_info : public __class_type_info {
    53   public:
    54     virtual ~__si_class_type_info();
    55     const __class_type_info *__base_type;
    56   };
    57 
    58   struct __base_class_type_info {
    59     const __class_type_info *__base_type;
    60     long __offset_flags;
    61 
    62     enum __offset_flags_masks {
    63       __virtual_mask = 0x1,
    64       __public_mask = 0x2,
    65       __offset_shift = 8
    66     };
    67   };
    68 
    69 #pragma define_type_info
    70   class __vmi_class_type_info : public __class_type_info {
    71   public:
    72     virtual ~__vmi_class_type_info();
    73     unsigned int __flags;
    74     unsigned int __base_count;
    75     __base_class_type_info __base_info[1];
    76 
    77     enum __flags_masks {
    78       __non_diamond_repeat_mask = 0x1,
    79       __diamond_shaped_mask = 0x2
    80     };
    81   };
    82 
    83 #pragma define_type_info
    84   class __pbase_type_info : public type_info {
    85   public:
    86     virtual ~__pbase_type_info();
    87     unsigned int __flags;
    88     const type_info *__pointee;
    89     
    90     enum __masks {
    91       __const_mask = 0x1,
    92       __volatile_mask = 0x2,
    93       __restrict_mask = 0x4,
    94       __incomplete_mask = 0x8,
    95       __incomplete_class_mask = 0x10
    96     };
    97   }; 
    98 
    99 #pragma define_type_info
   100   class __pointer_type_info : public __pbase_type_info {
   101     virtual ~__pointer_type_info();
   102   };
   103 
   104 #pragma define_type_info
   105   class __pointer_to_member_type_info : public __pbase_type_info {
   106     virtual ~__pointer_to_member_type_info();
   107     const __class_type_info *__context;
   108   };
   109 
   110   extern "C" {
   111     /* Pure virtual function calls. */
   112     void __cxa_pure_virtual();
   113   
   114     /* Guard variables for the initialization of variables with static storage
   115        duration. */
   116 #ifdef __CXXABI_USING_64BIT_GUARD_VARIABLES
   117     int __cxa_guard_acquire(unsigned long long *);
   118     void __cxa_guard_release(unsigned long long *);
   119     void __cxa_guard_abort(unsigned long long *);
   120 #else
   121     // C++ ABI for ARM uses 32 bit guard variables
   122     int __cxa_guard_acquire(int *);
   123     void __cxa_guard_release(int *);
   124     void __cxa_guard_abort(int *);
   125 #endif
   126 
   127 // define the 'Structor Return Type
   128 #ifndef __CXXABI_STORS_RETURN_VOID
   129     typedef void* SRT;  // under C++ ABI for ARM 'structors return 'void *'
   130 #else
   131     typedef void  SRT;  // 'structors return 'void'
   132 #endif
   133 
   134     /* Construction and destruction of arrays. */
   135     void *__cxa_vec_new(size_t, size_t, size_t, SRT (*)(void *),
   136                         SRT (*)(void *));
   137     void *__cxa_vec_new2(size_t, size_t, size_t, SRT (*)(void *),
   138                          SRT (*)(void *), void *(*)(size_t),
   139                          void (*)(void *));
   140     void *__cxa_vec_new3(size_t, size_t, size_t, SRT (*)(void *),
   141                          SRT (*)(void *), void *(*)(size_t),
   142                          void (*)(void *, size_t));
   143 #ifndef CXXABI_VEC_CTOR_RETURNS_VOID
   144     /* The C++ ABI says this returns 'void' but we actually return
   145        'void *' to remain compatible with RVCT 2.0 objects.  But the
   146        compiler no longer assumes it. */
   147     void *
   148 #else /* def CXXABI_VEC_CTOR_RETURNS_VOID */
   149     void
   150 #endif /* def CXXABI_VEC_CTOR_RETURNS_VOID */
   151          __cxa_vec_ctor(void *, size_t, size_t, SRT (*)(void *),
   152                         SRT (*)(void *));
   153     void __cxa_vec_dtor(void *, size_t, size_t, SRT (*)(void *));
   154     void __cxa_vec_cleanup(void *, size_t, size_t, SRT (*)(void *));
   155     void __cxa_vec_delete(void *, size_t, size_t, SRT (*)(void *));
   156     void __cxa_vec_delete2(void *, size_t, size_t, SRT (*)(void *),
   157                            void (*)(void *));
   158     void __cxa_vec_delete3(void *, size_t, size_t, SRT (*)(void *),
   159                            void (*)(void *, size_t));
   160 #ifndef CXXABI_VEC_CTOR_RETURNS_VOID
   161     /* The C++ ABI says this returns 'void' but we actually return
   162        'void *' to remain compatible with RVCT 2.0 objects.  But the
   163        compiler no longer assumes it. */
   164     void *
   165 #else /* def CXXABI_VEC_CTOR_RETURNS_VOID */
   166     void
   167 #endif /* def CXXABI_VEC_CTOR_RETURNS_VOID */
   168          __cxa_vec_cctor(void *, void *, size_t, size_t, 
   169                          SRT (*)(void *, void *), SRT (*)(void *));
   170 
   171     /* Finalization. */
   172     int __cxa_atexit(void (*)(void *), void *, void *);
   173     void __cxa_finalize(void *);
   174 
   175     /* Exception-handling support. */
   176     void __cxa_bad_cast();
   177     void __cxa_bad_typeid();
   178 
   179     /* Demangling interface. */
   180     char *__cxa_demangle(const char* __mangled_name,
   181                          char        *__buf,
   182                          size_t      *__n,
   183                          int         *__status);
   184 
   185   }  /* extern "C" */
   186 #ifdef __EDG_RUNTIME_USES_NAMESPACES
   187 }  /* namespace __cxxabiv1 */
   188 
   189 /* Create the "abi" namespace alias. */
   190 namespace abi = __cxxabiv1;
   191 #endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
   192 
   193 #endif /* ifndef __CXXABI_H */