00001 // Control various target specific ABI tweaks. Generic version. 00002 00003 // Copyright (C) 2004, 2006, 2008, 2009 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 cxxabi_tweaks.h 00026 * The header provides an CPU-variable interface to the C++ ABI. 00027 */ 00028 00029 #ifndef _CXXABI_TWEAKS_H 00030 #define _CXXABI_TWEAKS_H 1 00031 00032 #ifdef __cplusplus 00033 namespace __cxxabiv1 00034 { 00035 extern "C" 00036 { 00037 #endif 00038 00039 // The generic ABI uses the first byte of a 64-bit guard variable. 00040 #define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0) 00041 #define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1 00042 #define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1) 00043 #define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1) 00044 #define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1) 00045 __extension__ typedef int __guard __attribute__((mode (__DI__))); 00046 00047 // __cxa_vec_ctor has void return type. 00048 typedef void __cxa_vec_ctor_return_type; 00049 #define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return 00050 // Constructors and destructors do not return a value. 00051 typedef void __cxa_cdtor_return_type; 00052 00053 #ifdef __cplusplus 00054 } 00055 } // namespace __cxxabiv1 00056 #endif 00057 00058 #endif