[PATCH][SH] CFI directives patch
Richard Henderson
rth@twiddle.net
Fri May 4 17:29:00 GMT 2012
On 05/04/12 00:03, Chung-Lin Tang wrote:
> 5:
> + cfi_remember_state
> rts
> 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).
r~
More information about the Libc-alpha
mailing list