This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Use uint64_t on 64-bit integer
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 11 May 2012 06:53:24 -0700
- Subject: PATCH: Use uint64_t on 64-bit integer
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
This patch uses uint64_t on 64-bit integer. Tested on Linux/x32 and
Linux/x86-64. OK to install?
Thanks.
H.J.
----
* sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
integer.
(THREAD_SETMEM_NC): Likewise.
diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h
index 454c66a..9610fcd 100644
--- a/nptl/sysdeps/x86_64/tls.h
+++ b/nptl/sysdeps/x86_64/tls.h
@@ -261,7 +264,7 @@ typedef struct
abort (); \
\
asm volatile ("movq %q0,%%fs:%P1" : \
- : IMM_MODE ((unsigned long int) value), \
+ : IMM_MODE ((uint64_t) value), \
"i" (offsetof (struct pthread, member))); \
}})
@@ -286,7 +289,7 @@ typedef struct
abort (); \
\
asm volatile ("movq %q0,%%fs:%P1(,%q2,8)" : \
- : IMM_MODE ((unsigned long int) value), \
+ : IMM_MODE ((uint64_t) value), \
"i" (offsetof (struct pthread, member[0])), \
"r" (idx)); \
}})