@@ -176,35 +176,6 @@ inline void UnalignedStore64(void *p, uint64_t v) { memcpy(p, &v, sizeof v); }
176176 #define PHMAP_BLOCK_TAIL_CALL_OPTIMIZATION () if (volatile int x = 0 ) { (void )x; }
177177#endif
178178
179- #if defined(__GNUC__)
180- #pragma GCC diagnostic push
181- #pragma GCC diagnostic ignored "-Wpedantic"
182- #endif
183-
184- #ifdef PHMAP_HAVE_INTRINSIC_INT128
185- __extension__ typedef unsigned __int128 phmap_uint128;
186- inline uint64_t umul128 (uint64_t a, uint64_t b, uint64_t * high)
187- {
188- auto result = static_cast <phmap_uint128>(a) * static_cast <phmap_uint128>(b);
189- *high = static_cast <uint64_t >(result >> 64 );
190- return static_cast <uint64_t >(result);
191- }
192- #define PHMAP_HAS_UMUL128 1
193- #elif (defined(_MSC_VER))
194- #if defined(_M_X64)
195- #pragma intrinsic(_umul128)
196- inline uint64_t umul128 (uint64_t a, uint64_t b, uint64_t * high)
197- {
198- return _umul128 (a, b, high);
199- }
200- #define PHMAP_HAS_UMUL128 1
201- #endif
202- #endif
203-
204- #if defined(__GNUC__)
205- #pragma GCC diagnostic pop
206- #endif
207-
208179#if defined(__GNUC__)
209180 // Cache line alignment
210181 #if defined(__i386__) || defined(__x86_64__)
@@ -268,6 +239,36 @@ inline void UnalignedStore64(void *p, uint64_t v) { memcpy(p, &v, sizeof v); }
268239
269240
270241namespace phmap {
242+
243+ #if defined(__GNUC__)
244+ #pragma GCC diagnostic push
245+ #pragma GCC diagnostic ignored "-Wpedantic"
246+ #endif
247+
248+ #ifdef PHMAP_HAVE_INTRINSIC_INT128
249+ __extension__ typedef unsigned __int128 phmap_uint128;
250+ inline uint64_t umul128 (uint64_t a, uint64_t b, uint64_t * high)
251+ {
252+ auto result = static_cast <phmap_uint128>(a) * static_cast <phmap_uint128>(b);
253+ *high = static_cast <uint64_t >(result >> 64 );
254+ return static_cast <uint64_t >(result);
255+ }
256+ #define PHMAP_HAS_UMUL128 1
257+ #elif (defined(_MSC_VER))
258+ #if defined(_M_X64)
259+ #pragma intrinsic(_umul128)
260+ inline uint64_t umul128 (uint64_t a, uint64_t b, uint64_t * high)
261+ {
262+ return _umul128 (a, b, high);
263+ }
264+ #define PHMAP_HAS_UMUL128 1
265+ #endif
266+ #endif
267+
268+ #if defined(__GNUC__)
269+ #pragma GCC diagnostic pop
270+ #endif
271+
271272namespace base_internal {
272273
273274PHMAP_BASE_INTERNAL_FORCEINLINE uint32_t CountLeadingZeros64Slow (uint64_t n) {
0 commit comments