This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH, AArch64] Add optimized strchrnul
- From: Kyle McMartin <kmcmarti at redhat dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>, Richard Earnshaw <rearnsha at arm dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Tue, 9 Dec 2014 18:46:27 -0500
- Subject: Re: [PATCH, AArch64] Add optimized strchrnul
- Authentication-results: sourceware.org; auth=none
- References: <539AD11E dot 50507 at arm dot com> <CAFqB+PyiWb1Bj+UJa2HRvyCMhn-H57r3Wn05mHpnOn1n_qhzrQ at mail dot gmail dot com> <20141203174546 dot GG4170 at redacted dot bos dot redhat dot com> <CA+=Sn1kkD88LSLyzxVyAdc5zkmsrHJP5at1fvsnLfA0G7fg+=w at mail dot gmail dot com>
On Tue, Dec 09, 2014 at 02:38:11PM -0800, Andrew Pinski wrote:
> > Hrm, I've bisected this commit as the cause of localedef segfaulting as
> > part of install-locales... it ends up crashing weirdly inside of
> > vsprintf's internals. Have either of you seen anything similar?
>
> I just ran into this with an ILP32 compiled glibc (with thunderX
> tuning and some extra patches) where printf was crashing. The problem
> is v15 is being used but it is a callee saved register. Here is the
> documentation from the ABI:
> Registers v8-v15 must be preserved by a callee across subroutine
> calls; the remaining registers (v0-v7, v16-v31)
> do not need to be preserved (or should be preserved by the caller).
>
Aha, I'd debugged to the same point today after comparing logs between
the C and assembler versions of strchrnul. I swapped vrepmask for v7 and
things chugged along as expected.
--Kyle
> Thanks,
> Andrew Pinski
>