libstdc++
|
00001 // Control various target specific ABI tweaks. ARM version. 00002 00003 // Copyright (C) 2004, 2006, 2008, 2009, 2011 Free Software Foundation, Inc. 00004 // 00005 // This file is part of the GNU ISO C++ Library. This library is free 00006 // software; you can redistribute it and/or modify it under the 00007 // terms of the GNU General Public License as published by the 00008 // Free Software Foundation; either version 3, or (at your option) 00009 // any later version. 00010 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 // GNU General Public License for more details. 00015 00016 // Under Section 7 of GPL version 3, you are granted additional 00017 // permissions described in the GCC Runtime Library Exception, version 00018 // 3.1, as published by the Free Software Foundation. 00019 00020 // You should have received a copy of the GNU General Public License and 00021 // a copy of the GCC Runtime Library Exception along with this program; 00022 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 00023 // <http://www.gnu.org/licenses/>. 00024 00025 /** @file bits/cxxabi_tweaks.h 00026 * This is an internal header file, included by other library headers. 00027 * Do not attempt to use it directly. @headername{cxxabi.h} 00028 */ 00029 00030 #ifndef _CXXABI_TWEAKS_H 00031 #define _CXXABI_TWEAKS_H 1 00032 00033 #ifdef __cplusplus 00034 namespace __cxxabiv1 00035 { 00036 extern "C" 00037 { 00038 #endif 00039 00040 #ifdef __ARM_EABI__ 00041 // The ARM EABI uses the least significant bit of a 32-bit 00042 // guard variable. */ 00043 #define _GLIBCXX_GUARD_TEST(x) ((*(x) & 1) != 0) 00044 #define _GLIBCXX_GUARD_SET(x) *(x) = 1 00045 #define _GLIBCXX_GUARD_BIT 1 00046 #define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1) 00047 #define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1) 00048 typedef int __guard; 00049 00050 // We also want the element size in array cookies. 00051 #define _GLIBCXX_ELTSIZE_IN_COOKIE 1 00052 00053 // __cxa_vec_ctor should return a pointer to the array. 00054 typedef void * __cxa_vec_ctor_return_type; 00055 #define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return x 00056 // Constructors and destructors return the "this" pointer. 00057 typedef void * __cxa_cdtor_return_type; 00058 00059 #else // __ARM_EABI__ 00060 00061 // The generic ABI uses the first byte of a 64-bit guard variable. 00062 #define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0) 00063 #define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1 00064 #define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1) 00065 #define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1) 00066 #define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1) 00067 __extension__ typedef int __guard __attribute__((mode (__DI__))); 00068 00069 // __cxa_vec_ctor has void return type. 00070 typedef void __cxa_vec_ctor_return_type; 00071 #define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return 00072 // Constructors and destructors do not return a value. 00073 typedef void __cxa_cdtor_return_type; 00074 00075 #endif //!__ARM_EABI__ 00076 00077 #ifdef __cplusplus 00078 } 00079 } // namespace __cxxabiv1 00080 #endif 00081 00082 #endif