From 79ace73e1d49ff3436697c882fdf14cf8b63e02c Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 24 Mar 2017 01:20:55 +0300 Subject: [PATCH] Use __int64 instead of 'long long' in LONG_MULT if appropriate * include/private/gc_pmark.h [!I386 || !__GNUC__ || NACL] (ULONG_MULT_T): Define new private macro (to unsigned __int64 or unsigned long long). * include/private/gc_pmark.h [!I386 || !__GNUC__ || NACL] (LONG_MULT): Use ULONG_MULT_T instead of unsigned long long. --- include/private/gc_pmark.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/private/gc_pmark.h b/include/private/gc_pmark.h index 1d48fe3d..1511763f 100644 --- a/include/private/gc_pmark.h +++ b/include/private/gc_pmark.h @@ -210,10 +210,14 @@ GC_INNER mse * GC_signal_mark_stack_overflow(mse *msp); : "g"(y), "0"(x)); \ } while (0) #else +# if defined(__int64) && !defined(__GNUC__) && !defined(CPPCHECK) +# define ULONG_MULT_T unsigned __int64 +# else +# define ULONG_MULT_T unsigned long long +# endif # define LONG_MULT(hprod, lprod, x, y) \ do { \ - unsigned long long prod = (unsigned long long)(x) \ - * (unsigned long long)(y); \ + ULONG_MULT_T prod = (ULONG_MULT_T)(x) * (ULONG_MULT_T)(y); \ GC_STATIC_ASSERT(sizeof(x) + sizeof(y) <= sizeof(prod)); \ hprod = prod >> 32; \ lprod = (unsigned32)prod; \ -- 2.40.0