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] x86-64: Use direct TLS initial-exec access to update errno


On Mon, Dec 4, 2017 at 3:33 PM, Carlos O'Donell <carlos@redhat.com> wrote:
> On 12/04/2017 05:13 PM, H.J. Lu wrote:
>> Replace __errno_location call with direct TLS initial-exec access to
>> update errno.
>>
>> Any comments?
>
> What are the consequences of this change?

3 function calls are removed.

> Have you tried debugging this code in gdb and does it make it easier or
> harder to debug a single threaded application?

gdb 8 works fine:

(gdb) r
Starting program: /export/build/gnu/glibc/build-x86_64-linux/math/test-float-sin
testing float (without inline functions)

Breakpoint 1, sinf () at ../sysdeps/x86_64/fpu/s_sinf.S:339
339 movq errno@gottpoff(%rip), %rax
(gdb) p errno
$1 = 0
(gdb) next
340 movl $EDOM, %fs:(%rax)
(gdb)
345 movaps %xmm7, %xmm0 /* load x */
(gdb) p errno
$2 = 33
(gdb)


> Why make these changes?

It is motivated by

https://sourceware.org/ml/libc-alpha/2017-12/msg00101.html

-- 
H.J.


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