diff options
author | Kai Tietz <ktietz@redhat.com> | 2012-12-21 11:12:48 +0100 |
---|---|---|
committer | Kai Tietz <ktietz@gcc.gnu.org> | 2012-12-21 11:12:48 +0100 |
commit | 3cc6dd4dce2f275e8d539d0a32493ee563352ac9 (patch) | |
tree | 3b042de82fe9dabadeec27e4fc35d6f7a8f94be1 | |
parent | ffeffdcb913ff6273c6bb95dd4872cd9a4e492c7 (diff) | |
download | gcc-3cc6dd4dce2f275e8d539d0a32493ee563352ac9.zip gcc-3cc6dd4dce2f275e8d539d0a32493ee563352ac9.tar.gz gcc-3cc6dd4dce2f275e8d539d0a32493ee563352ac9.tar.bz2 |
os_defines.h (_GLIBCXX_LLP64): Define if llp64 abi is used.
* config/os/mingw32/os_defines.h (_GLIBCXX_LLP64): Define if llp64
abi is used.
* config/os/mingw32-w64/os_defines.h: Likewise.
* libsupc++/cxxabi.h (__base_class_type_info): Adjust
type of __offset_flags for llp64.
* libsupc++/eh_alloc.cc (EMERGENCY_OBJ_SIZE): Define proper
for llp64 abi.
(EMERGENCY_OBJ_COUNT): Likewise.
(bitmask_type): Likewise.
* libsupc++/hash_bytes.cc (_Hash_bytes): Handle llp64.
From-SVN: r194658
-rw-r--r-- | libstdc++-v3/ChangeLog | 13 | ||||
-rw-r--r-- | libstdc++-v3/config/os/mingw32-w64/os_defines.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/config/os/mingw32/os_defines.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/cxxabi.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/eh_alloc.cc | 6 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/hash_bytes.cc | 3 |
6 files changed, 32 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 07caf0a..7b3973f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,16 @@ +2012-12-21 Kai Tietz <ktietz@redhat.com> + + * config/os/mingw32/os_defines.h (_GLIBCXX_LLP64): Define if llp64 + abi is used. + * config/os/mingw32-w64/os_defines.h: Likewise. + * libsupc++/cxxabi.h (__base_class_type_info): Adjust + type of __offset_flags for llp64. + * libsupc++/eh_alloc.cc (EMERGENCY_OBJ_SIZE): Define proper + for llp64 abi. + (EMERGENCY_OBJ_COUNT): Likewise. + (bitmask_type): Likewise. + * libsupc++/hash_bytes.cc (_Hash_bytes): Handle llp64. + 2012-12-20 Jonathan Wakely <jwakely.gcc@gmail.com> * include/std/functional (_Require): Move to ... diff --git a/libstdc++-v3/config/os/mingw32-w64/os_defines.h b/libstdc++-v3/config/os/mingw32-w64/os_defines.h index 1d3d7d5..da4953a 100644 --- a/libstdc++-v3/config/os/mingw32-w64/os_defines.h +++ b/libstdc++-v3/config/os/mingw32-w64/os_defines.h @@ -74,4 +74,8 @@ #define _GLIBCXX_CDTOR_CALLABI __thiscall #endif +#ifdef __x86_64__ +#define _GLIBCXX_LLP64 1 +#endif + #endif diff --git a/libstdc++-v3/config/os/mingw32/os_defines.h b/libstdc++-v3/config/os/mingw32/os_defines.h index f82e25c..cbe5974 100644 --- a/libstdc++-v3/config/os/mingw32/os_defines.h +++ b/libstdc++-v3/config/os/mingw32/os_defines.h @@ -72,4 +72,8 @@ #define _GLIBCXX_CDTOR_CALLABI __thiscall #endif +#ifdef __x86_64__ +#define _GLIBCXX_LLP64 1 +#endif + #endif diff --git a/libstdc++-v3/libsupc++/cxxabi.h b/libstdc++-v3/libsupc++/cxxabi.h index 582c435..bd6f5ef 100644 --- a/libstdc++-v3/libsupc++/cxxabi.h +++ b/libstdc++-v3/libsupc++/cxxabi.h @@ -356,7 +356,11 @@ namespace __cxxabiv1 { public: const __class_type_info* __base_type; // Base class type. +#ifdef _GLIBCXX_LLP64 + long long __offset_flags; // Offset and info. +#else long __offset_flags; // Offset and info. +#endif enum __offset_flags_masks { diff --git a/libstdc++-v3/libsupc++/eh_alloc.cc b/libstdc++-v3/libsupc++/eh_alloc.cc index 74474d8..82ed249 100644 --- a/libstdc++-v3/libsupc++/eh_alloc.cc +++ b/libstdc++-v3/libsupc++/eh_alloc.cc @@ -60,7 +60,7 @@ using namespace __cxxabiv1; #if INT_MAX == 32767 # define EMERGENCY_OBJ_SIZE 128 # define EMERGENCY_OBJ_COUNT 16 -#elif LONG_MAX == 2147483647 +#elif !defined (_GLIBCXX_LLP64) && LONG_MAX == 2147483647 # define EMERGENCY_OBJ_SIZE 512 # define EMERGENCY_OBJ_COUNT 32 #else @@ -76,8 +76,12 @@ using namespace __cxxabiv1; #if INT_MAX == 32767 || EMERGENCY_OBJ_COUNT <= 32 typedef unsigned int bitmask_type; #else +#if defined (_GLIBCXX_LLP64) +typedef unsigned long long bitmask_type; +#else typedef unsigned long bitmask_type; #endif +#endif typedef char one_buffer[EMERGENCY_OBJ_SIZE] __attribute__((aligned)); diff --git a/libstdc++-v3/libsupc++/hash_bytes.cc b/libstdc++-v3/libsupc++/hash_bytes.cc index 07e77cf..10fec8e 100644 --- a/libstdc++-v3/libsupc++/hash_bytes.cc +++ b/libstdc++-v3/libsupc++/hash_bytes.cc @@ -128,7 +128,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION size_t _Hash_bytes(const void* ptr, size_t len, size_t seed) { - static const size_t mul = (0xc6a4a793UL << 32UL) + 0x5bd1e995UL; + static const size_t mul = (((size_t) 0xc6a4a793UL) << 32UL) + + (size_t) 0x5bd1e995UL; const char* const buf = static_cast<const char*>(ptr); // Remove the bytes not divisible by the sizeof(size_t). This |