This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Cast to _Unwind_Exception_Class when setting exc.exception_class


On Tue, Sep 18, 2012 at 3:01 PM, Roland McGrath <roland@hack.frob.com> wrote:
> Andreas correctly points out that it really should have parens, as should
> the x86_64 THREAD_SETMEM (which doesn't).  With that change, it's fine.
>
> But I'll note that it really seems like a compiler bug to me that an "A"
> constraint would ever fail to set %edx.  (Not that I expect it to be fixed.)
>
>
> Thanks,
> Roland

This is what I checked in


-- 
H.J.
---
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 5d784a5..ebb9048 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
+	64-bit store.
+	(THREAD_SETMEM_NC): Likewise.
+
 2012-09-14  Jeff Law  <law@redhat.com>

 	[BZ #14583]
diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h
index ab42708..65497cf 100644
--- a/nptl/sysdeps/i386/tls.h
+++ b/nptl/sysdeps/i386/tls.h
@@ -343,7 +343,7 @@ union user_desc_init
 									      \
 	 asm volatile ("movl %%eax,%%gs:%P1\n\t"			      \
 		       "movl %%edx,%%gs:%P2" :				      \
-		       : "A" (value),					      \
+		       : "A" ((uint64_t) (value)),			      \
 			 "i" (offsetof (struct pthread, member)),	      \
 			 "i" (offsetof (struct pthread, member) + 4));	      \
        }})
@@ -370,7 +370,7 @@ union user_desc_init
 									      \
 	 asm volatile ("movl %%eax,%%gs:%P1(,%2,8)\n\t"			      \
 		       "movl %%edx,%%gs:4+%P1(,%2,8)" :			      \
-		       : "A" (value),					      \
+		       : "A" ((uint64_t) (value)),			      \
 			 "i" (offsetof (struct pthread, member)),	      \
 			 "r" (idx));					      \
        }})


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]