This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][AArch64] Add more cfi annotations to tlsdesc entry points
- From: Richard Henderson <rth at twiddle dot net>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Cc: nd at arm dot com, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, Florian Weimer <fweimer at redhat dot com>
- Date: Fri, 9 Dec 2016 09:38:29 -0800
- Subject: Re: [PATCH][AArch64] Add more cfi annotations to tlsdesc entry points
- Authentication-results: sourceware.org; auth=none
- References: <584AB057.5050605@arm.com>
On 12/09/2016 05:23 AM, Szabolcs Nagy wrote:
> stp x1, x2, [sp, #32+16*0]
> + cfi_rel_offset (x1, 32)
> + cfi_rel_offset (x2, 32+8)
> stp x3, x4, [sp, #32+16*1]
> + cfi_rel_offset (x3, 32+16)
> + cfi_rel_offset (x4, 32+24)
FWIW, you'll produce equivalent, but smaller unwind info if you put all of the
cfi_rel_offsets together (constrained by the assembly for when the original
register values change. So
stp x1, x2, [sp, #32+16*0]
stp x3, x4, [sp, #32+16*1]
cfi_rel_offset (x1, 32)
cfi_rel_offset (x2, 32+8)
cfi_rel_offset (x3, 32+16)
cfi_rel_offset (x4, 32+24)
> stp x5, x6, [sp, #-16*NSAVEXREGPAIRS]!
> cfi_adjust_cfa_offset (16*NSAVEXREGPAIRS)
> + cfi_rel_offset (x5, 0)
> + cfi_rel_offset (x6, 8)
> stp x7, x8, [sp, #16*1]
> + cfi_rel_offset (x7, 16)
> + cfi_rel_offset (x8, 16+8)
> stp x9, x10, [sp, #16*2]
> + cfi_rel_offset (x9, 16*2)
> + cfi_rel_offset (x10, 16*2+8)
> stp x11, x12, [sp, #16*3]
> + cfi_rel_offset (x11, 16*3)
> + cfi_rel_offset (x12, 16*3+8)
> stp x13, x14, [sp, #16*4]
> + cfi_rel_offset (x13, 16*4)
> + cfi_rel_offset (x14, 16*4+8)
> stp x15, x16, [sp, #16*5]
> + cfi_rel_offset (x15, 16*5)
> + cfi_rel_offset (x16, 16*5+8)
> stp x17, x18, [sp, #16*6]
> + cfi_rel_offset (x17, 16*6)
> + cfi_rel_offset (x18, 16*6+8)
Likewise. But of course you can't move the cfi_adjust_cfa_offset.
r~