cxxabi.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. /*****************************************************************************/
  2. /* cxxabi.h v8.2.2 */
  3. /* Copyright (c) 1996-2017 Texas Instruments Inc., all rights reserved */
  4. /*****************************************************************************/
  5. /******************************************************************************
  6. * \ ___ / *
  7. * Edison Design Group C++ Runtime / \ *
  8. * - | \^/ | - *
  9. * Copyright 1992-2011 Edison Design Group, Inc. \ / *
  10. * / | | \ *
  11. * [_] *
  12. * *
  13. ******************************************************************************/
  14. /*
  15. Redistribution and use in source and binary forms are permitted
  16. provided that the above copyright notice and this paragraph are
  17. duplicated in all source code forms. The name of Edison Design
  18. Group, Inc. may not be used to endorse or promote products derived
  19. from this software without specific prior written permission.
  20. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
  21. IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  22. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  23. Any use of this software is at the user's own risk.
  24. */
  25. /*
  26. cxxabi.h -- Include file for IA-64 ABI entry points.
  27. */
  28. #ifndef __CXXABI_H
  29. #define __CXXABI_H
  30. #ifndef __STDDEF_H
  31. #include <stddef.h>
  32. #endif /* ifndef __STDDEF_H */
  33. #include <typeinfo>
  34. #ifdef __EDG_RUNTIME_USES_NAMESPACES
  35. namespace __cxxabiv1 {
  36. using namespace std;
  37. #endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
  38. /* type_info implementation classes */
  39. #pragma define_type_info
  40. class __fundamental_type_info : public type_info {
  41. public:
  42. virtual ~__fundamental_type_info();
  43. };
  44. #pragma define_type_info
  45. class __array_type_info : public type_info {
  46. public:
  47. virtual ~__array_type_info();
  48. };
  49. #pragma define_type_info
  50. class __function_type_info : public type_info {
  51. public:
  52. virtual ~__function_type_info();
  53. };
  54. #pragma define_type_info
  55. class __enum_type_info : public type_info {
  56. public:
  57. virtual ~__enum_type_info();
  58. };
  59. #pragma define_type_info
  60. class __class_type_info : public type_info {
  61. public:
  62. virtual ~__class_type_info();
  63. };
  64. #pragma define_type_info
  65. class __si_class_type_info : public __class_type_info {
  66. public:
  67. virtual ~__si_class_type_info();
  68. const __class_type_info *__base_type;
  69. };
  70. struct __base_class_type_info {
  71. const __class_type_info *__base_type;
  72. long __offset_flags;
  73. enum __offset_flags_masks {
  74. __virtual_mask = 0x1,
  75. __public_mask = 0x2,
  76. __offset_shift = 8
  77. };
  78. };
  79. #pragma define_type_info
  80. class __vmi_class_type_info : public __class_type_info {
  81. public:
  82. virtual ~__vmi_class_type_info();
  83. unsigned int __flags;
  84. unsigned int __base_count;
  85. __base_class_type_info __base_info[1];
  86. enum __flags_masks {
  87. __non_diamond_repeat_mask = 0x1,
  88. __diamond_shaped_mask = 0x2
  89. };
  90. };
  91. #pragma define_type_info
  92. class __pbase_type_info : public type_info {
  93. public:
  94. virtual ~__pbase_type_info();
  95. unsigned int __flags;
  96. const type_info *__pointee;
  97. enum __masks {
  98. __const_mask = 0x1,
  99. __volatile_mask = 0x2,
  100. __restrict_mask = 0x4,
  101. __incomplete_mask = 0x8,
  102. __incomplete_class_mask = 0x10
  103. };
  104. };
  105. #pragma define_type_info
  106. class __pointer_type_info : public __pbase_type_info {
  107. virtual ~__pointer_type_info();
  108. };
  109. #pragma define_type_info
  110. class __pointer_to_member_type_info : public __pbase_type_info {
  111. virtual ~__pointer_to_member_type_info();
  112. const __class_type_info *__context;
  113. };
  114. extern "C" {
  115. /* Pure virtual function calls. */
  116. void __cxa_pure_virtual();
  117. /* Deleted virtual function calls. */
  118. void __cxa_deleted_virtual();
  119. /* Constructors return void in the IA-64 ABI. But in the ARM EABI
  120. variant, they return void*. */
  121. #ifdef __EDG_IA64_ABI_VARIANT_CTORS_AND_DTORS_RETURN_THIS
  122. typedef void* __ctor_dtor_return_type;
  123. #else /* ifndef __EDG_IA64_ABI_VARIANT_CTORS_AND_DTORS_RETURN_THIS */
  124. typedef void __ctor_dtor_return_type;
  125. #endif /* ifdef __EDG_IA64_ABI_VARIANT_CTORS_AND_DTORS_RETURN_THIS */
  126. /* Guard variables are 64 bits in the IA-64 ABI but only 32 bits in
  127. the ARM EABI. */
  128. #ifdef __EDG_IA64_ABI_USE_INT_STATIC_INIT_GUARD
  129. /*** START TI ADD ***/
  130. /*------------------------------------------------------------------------*/
  131. /* ARM EABI specifies that guard variables are 4 bytes long */
  132. /* Also, type of parameter passed to these functions is int* */
  133. /* C++ ABI for the ARM Architecture, Section 3.1 */
  134. /*------------------------------------------------------------------------*/
  135. /*** END TI ADD ***/
  136. typedef int __guard_variable_type;
  137. /*** START TI ADD ***/
  138. #elif defined(__EDG_IA64_ABI_USE_VARIANT_INT_STATIC_INIT_GUARD)
  139. /*-----------------------------------------------------------------------*/
  140. /* C6x ELF ABI specifies that guard variables are 4 bytes. IA64 C++ ABI */
  141. /* uses 64-bits. The One time construction API under C6x ELF ABI uses */
  142. /* unsigned int * as the pararmeter, accordingly. */
  143. /*-----------------------------------------------------------------------*/
  144. typedef unsigned int __guard_variable_type;
  145. /*** END TI ADD ***/
  146. #else /* ifndef __EDG_IA64_ABI_USE_INT_STATIC_INIT_GUARD */
  147. typedef unsigned long long __guard_variable_type;
  148. #endif /* ifdef __EDG_IA64_ABI_USE_INT_STATIC_INIT_GUARD */
  149. /* Guard variables for the initialization of variables with static storage
  150. duration. */
  151. int __cxa_guard_acquire(__guard_variable_type *);
  152. void __cxa_guard_release(__guard_variable_type *);
  153. void __cxa_guard_abort(__guard_variable_type *);
  154. /* Construction and destruction of arrays. */
  155. void *__cxa_vec_new(size_t, size_t, size_t,
  156. __ctor_dtor_return_type (*)(void *),
  157. __ctor_dtor_return_type (*)(void *));
  158. void *__cxa_vec_new2(size_t, size_t, size_t,
  159. __ctor_dtor_return_type (*)(void *),
  160. __ctor_dtor_return_type (*)(void *),
  161. void *(*)(size_t),
  162. void (*)(void *));
  163. void *__cxa_vec_new3(size_t, size_t, size_t,
  164. __ctor_dtor_return_type (*)(void *),
  165. __ctor_dtor_return_type (*)(void *),
  166. void *(*)(size_t),
  167. void (*)(void *, size_t));
  168. /*** START TI REPLACE ***/
  169. /*
  170. EABI Requires __cxa_vec_ctor and __cxa_vec_cctor to return void* . The value
  171. returned is the same as the first parameter - a pointer to the array being
  172. constructed
  173. C++ ABI for the ARM Architecture, Section 3.2.2.3
  174. */
  175. __ctor_dtor_return_type __cxa_vec_ctor(void *, size_t, size_t,
  176. __ctor_dtor_return_type (*)(void *),
  177. __ctor_dtor_return_type (*)(void *));
  178. /*** END TI REPLACE ***/
  179. void __cxa_vec_dtor(void *, size_t, size_t,
  180. __ctor_dtor_return_type (*)(void *));
  181. void __cxa_vec_cleanup(void *, size_t, size_t,
  182. __ctor_dtor_return_type (*)(void *));
  183. void __cxa_vec_delete(void *, size_t, size_t,
  184. __ctor_dtor_return_type (*)(void *));
  185. void __cxa_vec_delete2(void *, size_t, size_t,
  186. __ctor_dtor_return_type (*)(void *),
  187. void (*)(void *));
  188. void __cxa_vec_delete3(void *, size_t, size_t,
  189. __ctor_dtor_return_type (*)(void *),
  190. void (*)(void *, size_t));
  191. /*** START TI REPLACE ***/
  192. __ctor_dtor_return_type __cxa_vec_cctor(void *, void *, size_t, size_t,
  193. __ctor_dtor_return_type (*)(void *, void *),
  194. __ctor_dtor_return_type (*)(void *));
  195. /*** END TI REPLACE ***/
  196. /* Finalization. */
  197. int __cxa_atexit(void (*)(void *), void *, void *);
  198. void __cxa_finalize(void *);
  199. /*** START TI ADD ***/
  200. void __cxa_ia64_exit(int status);
  201. /*** END TI ADD ***/
  202. /* Exception-handling support. */
  203. void __cxa_bad_cast();
  204. void __cxa_bad_typeid();
  205. /* Demangling interface. */
  206. char *__cxa_demangle(const char* __mangled_name,
  207. char *__buf,
  208. size_t *__n,
  209. int *__status);
  210. /*** START TI ADD ***/
  211. void *__dynamic_cast(void *class_ptr,
  212. const __cxxabiv1::__class_type_info *source_tiip,
  213. const __cxxabiv1::__class_type_info *tiip,
  214. std::ptrdiff_t hint);
  215. /*** END TI ADD ***/
  216. } /* extern "C" */
  217. #ifdef __EDG_RUNTIME_USES_NAMESPACES
  218. } /* namespace __cxxabiv1 */
  219. /* Create the "abi" namespace alias. */
  220. namespace abi = __cxxabiv1;
  221. #endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
  222. #ifdef __TI_EABI_SUPPORT__
  223. namespace __aeabiv1 {
  224. /* EABI parameter order: object ptr, dtor ptr, dso handle */
  225. extern "C" int __aeabi_atexit(void *, void (*)(void *), void *);
  226. } /* namespace __aeabiv1 */
  227. #endif
  228. #endif /* ifndef __CXXABI_H */
  229. /******************************************************************************
  230. * \ ___ / *
  231. * Edison Design Group C++ Runtime / \ *
  232. * - | \^/ | - *
  233. * Copyright 1992-2011 Edison Design Group, Inc. \ / *
  234. * / | | \ *
  235. * [_] *
  236. * *
  237. ******************************************************************************/