about summary refs log tree commit diff
path: root/nptl/sysdeps/x86_64
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-14 09:45:53 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-14 09:45:53 +0000
commit7f2936863ec9512b3cfc001c61873f096a520546 (patch)
treea5dd991f4116ba033a6ad27a272cad06a8d8f990 /nptl/sysdeps/x86_64
parent365eccdb099f7cff2fdc589bef7be7806a4bc9c7 (diff)
downloadglibc-7f2936863ec9512b3cfc001c61873f096a520546.tar.gz
glibc-7f2936863ec9512b3cfc001c61873f096a520546.tar.xz
glibc-7f2936863ec9512b3cfc001c61873f096a520546.zip
(THREAD_GETMEM): Makr asms volatile. (THREAD_GETMEM_NC): Likewise.
Diffstat (limited to 'nptl/sysdeps/x86_64')
-rw-r--r--nptl/sysdeps/x86_64/tls.h39
1 files changed, 20 insertions, 19 deletions
diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h
index 69c8bc52e6..fb35b7b40a 100644
--- a/nptl/sysdeps/x86_64/tls.h
+++ b/nptl/sysdeps/x86_64/tls.h
@@ -156,13 +156,13 @@ typedef struct
 # define THREAD_GETMEM(descr, member) \
   ({ __typeof (descr->member) __value;					      \
      if (sizeof (__value) == 1)						      \
-       asm ("movb %%fs:%P2,%b0"						      \
-	    : "=q" (__value)						      \
-	    : "0" (0), "i" (offsetof (struct pthread, member)));	      \
+       asm volatile ("movb %%fs:%P2,%b0"				      \
+		     : "=q" (__value)					      \
+		     : "0" (0), "i" (offsetof (struct pthread, member)));     \
      else if (sizeof (__value) == 4)					      \
-       asm ("movl %%fs:%P1,%0"						      \
-	    : "=r" (__value)						      \
-	    : "i" (offsetof (struct pthread, member)));			      \
+       asm volatile ("movl %%fs:%P1,%0"					      \
+		     : "=r" (__value)					      \
+		     : "i" (offsetof (struct pthread, member)));	      \
      else								      \
        {								      \
 	 if (sizeof (__value) != 8)					      \
@@ -170,9 +170,9 @@ typedef struct
 	      4 or 8.  */						      \
 	   abort ();							      \
 									      \
-	 asm ("movq %%fs:%P1,%q0"					      \
-	      : "=r" (__value)						      \
-	      : "i" (offsetof (struct pthread, member)));		      \
+	 asm volatile ("movq %%fs:%P1,%q0"				      \
+		       : "=r" (__value)					      \
+		       : "i" (offsetof (struct pthread, member)));	      \
        }								      \
      __value; })
 
@@ -181,14 +181,14 @@ typedef struct
 # define THREAD_GETMEM_NC(descr, member, idx) \
   ({ __typeof (descr->member[0]) __value;				      \
      if (sizeof (__value) == 1)						      \
-       asm ("movb %%fs:%P2(%q3),%b0"					      \
-	    : "=q" (__value)						      \
-	    : "0" (0), "i" (offsetof (struct pthread, member[0])),	      \
-	      "r" (idx));						      \
+       asm volatile ("movb %%fs:%P2(%q3),%b0"				      \
+		     : "=q" (__value)					      \
+		     : "0" (0), "i" (offsetof (struct pthread, member[0])),   \
+		       "r" (idx));					      \
      else if (sizeof (__value) == 4)					      \
-       asm ("movl %%fs:%P1(,%q2,4),%0"					      \
-	    : "=r" (__value)						      \
-	    : "i" (offsetof (struct pthread, member[0])), "r" (idx));	      \
+       asm volatile ("movl %%fs:%P1(,%q2,4),%0"				      \
+		     : "=r" (__value)					      \
+		     : "i" (offsetof (struct pthread, member[0])), "r" (idx));\
      else								      \
        {								      \
 	 if (sizeof (__value) != 8)					      \
@@ -196,9 +196,10 @@ typedef struct
 	      4 or 8.  */						      \
 	   abort ();							      \
 									      \
-	 asm ("movq %%fs:%P1(,%q2,8),%q0"				      \
-	      : "=r" (__value)						      \
-	      : "i" (offsetof (struct pthread, member[0])), "r" (idx));	      \
+	 asm volatile ("movq %%fs:%P1(,%q2,8),%q0"			      \
+		       : "=r" (__value)					      \
+		       : "i" (offsetof (struct pthread, member[0])),	      \
+			 "r" (idx));					      \
        }								      \
      __value; })