This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Cast to _Unwind_Exception_Class when setting exc.exception_class
On Sun, Sep 23, 2012 at 5:41 PM, Andreas Jaeger <aj@suse.com> wrote:
> On 09/19/2012 09:15 AM, H.J. Lu wrote:
>>
>> 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
>
>
> could you do the change for x86_64 as well that Roland suggested?
>
I am checking in this.
Thanks.
--
H.J.
--
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index ebb9048..f2fded0 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * 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 <hongjiu.lu@intel.com>
* 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 f838916..b651d1c 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)); \
}})