This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: var-tracking and s390's LM(G)
- From: Richard Henderson <rth at redhat dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>, jakub at redhat dot com, gcc-patches at gcc dot gnu dot org, Andreas dot Krebbel at de dot ibm dot com, rsandifo at linux dot vnet dot ibm dot com
- Date: Thu, 06 Feb 2014 05:37:46 -0800
- Subject: Re: var-tracking and s390's LM(G)
- Authentication-results: sourceware.org; auth=none
- References: <201402052230 dot s15MUR30016660 at d06av02 dot portsmouth dot uk dot ibm dot com> <52F2E969 dot 1080300 at redhat dot com> <87a9e4a7ks dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com>
On 02/06/2014 01:55 AM, Richard Sandiford wrote:
> OK, I agree that's not 4.9 material. What about the other change
> of replacing:
>
> REF_CFA_DEF_CFA (plus (stack_pointer_rtx) (const_int 160/96))
>
> with:
>
> REF_CFA_ADJUST_CFA (set (stack_pointer_rtx)
> (plus (current_cfa_base) (const_int offset)))
>
> ? That works on its own, but having both a REG_CFA_ADJUST_CFA that assigns
> to stack_pointer_rtx and a REG_CFA_RESTORE for stack_pointer_rtx feels like
> a double assignment.
It does seem like it. I suppose it would be easy to suppress the RESTORE of
the stack pointer, without changing the save at all.
> Personally I'd prefer to leave the REG_CFA_DEF_CFA
> as-is for now and change all three (the save, the restore and the CFA
> definition) at the same time.
Yeah, well...
> * var-tracking.c (insn_stack_adjust_offset_pre_post): Handle
> REG_CFA_ADJUST_CFA.
> * config/s390/s390.c (s390_add_restore_cfa_note): New function.
> (s390_emit_epilogue): Use it.
Looks fine to me, as far as it goes.
r~