This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] [BZ #19363] Use INTERNAL_SYSCALL_TIMES for Linux times
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 15 Dec 2015 07:50:50 -0800
- Subject: Re: [PATCH] [BZ #19363] Use INTERNAL_SYSCALL_TIMES for Linux times
- Authentication-results: sourceware.org; auth=none
- References: <20151215032733 dot GA14426 at gmail dot com> <20151215035917 dot GF11489 at vapier dot lan> <CAMe9rOoERUBDk7zq-dqiP1wSemAEcvkYaT=cnPm=5_3F5Ca=8A at mail dot gmail dot com> <20151215145842 dot GS11489 at vapier dot lan>
On Tue, Dec 15, 2015 at 6:58 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On 14 Dec 2015 20:33, H.J. Lu wrote:
>> On Mon, Dec 14, 2015 at 7:59 PM, Mike Frysinger wrote:
>> > On 14 Dec 2015 19:27, H.J. Lu wrote:
>> >> + ({ \
>> >> + unsigned long long int resultvar; \
>> >> + LOAD_ARGS_1 (buf) \
>> >> + LOAD_REGS_1 \
>> >> + asm volatile ( \
>> >> + "syscall\n\t" \
>> >> + : "=a" (resultvar) \
>> >> + : "0" (__NR_times) ASM_ARGS_1 : "memory", "cc", "r11", "cx"); \
>> >
>> > should the cc/r11/cx be made into a sysdep define ?
>> > -mike
>>
>> I don't feel strongly about it. Glibc folks work on x86-64 system calls
>> know what they are doing.
>
> that sort of thinking is what leads to desync in code paths (it's not
> obvious at all that updates to the common sysdep.h needs to also be
> deployed to this specific file), plus gcc changes behavior over time
> and refines asm constraints. i'm sure you can find plenty of these
> examples in the diff arches as i recall them going by in the past.
>
> not that i'm strongly saying "make the define", just taking umbrage
> to your statement here.
It belongs a separate patch:
https://sourceware.org/git/?p=glibc.git;a=patch;h=d4f465df65a5723ede4cf933afee5582312fc603
I can submit it if we agree it is necessary.
--
H.J.