os_defines.h (_GLIBCXX_LLP64): Define if llp64 abi is used.
authorKai Tietz <ktietz@redhat.com>
Fri, 21 Dec 2012 10:12:48 +0000 (11:12 +0100)
committerKai Tietz <ktietz@gcc.gnu.org>
Fri, 21 Dec 2012 10:12:48 +0000 (11:12 +0100)
* 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

libstdc++-v3/ChangeLog
libstdc++-v3/config/os/mingw32-w64/os_defines.h
libstdc++-v3/config/os/mingw32/os_defines.h
libstdc++-v3/libsupc++/cxxabi.h
libstdc++-v3/libsupc++/eh_alloc.cc
libstdc++-v3/libsupc++/hash_bytes.cc

index 07caf0a4e33921ea62023a00b0010cd0358c19a7..7b3973f5456a93864e08b9027223549fd3cb296d 100644 (file)
@@ -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 ...
index 1d3d7d5e16182ea52877427bbe58265b2ae2fa7a..da4953acf7f31cda3b3bdf6e02f6e69480f725ee 100644 (file)
@@ -74,4 +74,8 @@
 #define _GLIBCXX_CDTOR_CALLABI __thiscall
 #endif
 
+#ifdef __x86_64__
+#define _GLIBCXX_LLP64 1
+#endif
+
 #endif
index f82e25c76a7301cc2fbc3f9eb4c03be13d3de515..cbe597456916a4f149441daeb7cab69ad40734d6 100644 (file)
@@ -72,4 +72,8 @@
 #define _GLIBCXX_CDTOR_CALLABI __thiscall
 #endif
 
+#ifdef __x86_64__
+#define _GLIBCXX_LLP64 1
+#endif
+
 #endif
index 582c435435d2eb0db43de8eae0b04d1fe7717ef3..bd6f5efa23abb6d32ce8aec8e73f781c7b34d400 100644 (file)
@@ -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
       {
index 74474d82ec69826166de8ee7d2e17a23a1571582..82ed249af2488f06717137d19dda1f693895d9a7 100644 (file)
@@ -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));
index 07e77cf8d1ddbf09fe07848c642b0e935217bf36..10fec8e73581e2a17a498d2d56a725abaaaa3610 100644 (file)
@@ -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