This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PowerPC64 power8 strncpy cfi fixes
- From: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: Alan Modra <amodra at gmail dot com>, libc-alpha at sourceware dot org
- Cc:
- Date: Fri, 20 Oct 2017 22:09:09 -0200
- Subject: Re: PowerPC64 power8 strncpy cfi fixes
- Authentication-results: sourceware.org; auth=none
- References: <20171020130627.GC27132@bubble.grove.modra.org>
Alan Modra <amodra@gmail.com> writes:
> cfi info for stack adjust needs to be on the insn doing the adjust.
> cfi describing register saves can be anywhere after the save insn but
> before the reg is altered. Fewer locations with cfi result in smaller
> cfi programs and possibly slightly faster exception handling. Thus
> the LR cfi_offset move.
>
> The idea behind ajusting sp after restoring regs is to break a
> register dependency chain, in this case not be using r1 immediately
> after it is modified.
>
> The missing LR cfi_restore meant that code after the blr,
> unaligned_lt_16 and other labels, would have cfi that said LR was at
> cfa+16, but that code is reached without LR being saved.
>
> * sysdeps/powerpc/powerpc64/power8/strncpy.S: Move LR cfi.
> Adjust stack after restoring regs. Add missing LR cfi_restore.
Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
--
Tulio Magno