From: H.J. Lu Date: Mon, 24 Sep 2012 16:11:12 +0000 (-0700) Subject: Add "()" when casting to uint64_t for 64-bit store X-Git-Tag: glibc-2.17~527 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=620f3d26702ceff24c9d3432ea69ece893247d24;p=glibc.git Add "()" when casting to uint64_t for 64-bit store --- diff --git a/nptl/ChangeLog b/nptl/ChangeLog index ebb9048d1b..f2fded0806 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,9 @@ +2012-09-24 H.J. Lu + + * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting + to uint64_t for 64-bit store. + (THREAD_SETMEM_NC): Likewise. + 2012-09-19 H.J. Lu * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h index f838916058..b651d1cfa8 100644 --- a/nptl/sysdeps/x86_64/tls.h +++ b/nptl/sysdeps/x86_64/tls.h @@ -256,7 +256,7 @@ typedef struct abort (); \ \ asm volatile ("movq %q0,%%fs:%P1" : \ - : IMM_MODE ((uint64_t) value), \ + : IMM_MODE ((uint64_t) (value)), \ "i" (offsetof (struct pthread, member))); \ }}) @@ -281,7 +281,7 @@ typedef struct abort (); \ \ asm volatile ("movq %q0,%%fs:%P1(,%q2,8)" : \ - : IMM_MODE ((uint64_t) value), \ + : IMM_MODE ((uint64_t) (value)), \ "i" (offsetof (struct pthread, member[0])), \ "r" (idx)); \ }})