This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH][SH] CFI directives patch
- From: Richard Henderson <rth at twiddle dot net>
- To: Chung-Lin Tang <cltang at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org, Thomas Schwinge <thomas_schwinge at mentor dot com>
- Date: Fri, 04 May 2012 10:29:14 -0700
- Subject: Re: [PATCH][SH] CFI directives patch
- References: <4FA37F28.email@example.com>
On 05/04/12 00:03, Chung-Lin Tang wrote:
> + cfi_remember_state
> mov.l @r15+, r12
> + cfi_adjust_cfa_offset (-4)
> + cfi_restore (r12)
> + cfi_restore_state
This really has no effect. All cfi operations at a given address are evaluated for a given pc. This adjustment and restore are immediately over-ridden by the restore_state.
CFI operations are not well-defined inside delay slots, because in general the consumers have no insight as to how to differentiate the CFA state of the branch from the CFA state of the delay slot. Within GCC, we avoid moving frame-related insns into a delay slot. That's probably the safest resolution in this case.
Anything else would require that you can somehow teach the unwinder how asynchronous interrupts and delay slots interact (for SH at least).