glibc 2.21 - Machine maintainers, please test your machines.
H.J. Lu
hjl.tools@gmail.com
Mon Jan 26 13:42:00 GMT 2015
On Mon, Jan 26, 2015 at 5:32 AM, Torvald Riegel <triegel@redhat.com> wrote:
> On Mon, 2015-01-26 at 05:25 -0800, H.J. Lu wrote:
>> On Mon, Jan 26, 2015 at 4:50 AM, Torvald Riegel <triegel@redhat.com> wrote:
>> > way? If so, then using __alignof__(sem_t) in Chris' patch would be good
>> > because then to_new_sem would resolve to a noop in x32 with your
>> > alignment change applied.
>>
>> I don't want a noop. I want compiler not to generate a noop at all.
>
> Yes, that's what I mean. Compiler should figure out that no conversion
> is necessary and not emit any code for this conversion.
>
If it is true, we should drop "&& !defined (_LP64)" in:
+#if __HAVE_64B_ATOMICS && !defined (_LP64)
+# define to_new_sem(s) ((struct new_sem *)(((uintptr_t)(s) + 4) & -8))
+#else
+# define to_new_sem(s) ((struct new_sem *)(s))
+#endif
--
H.J.
More information about the Libc-alpha
mailing list