This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR70674: S/390: Add memory barrier to stack pointer restore from fpr.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, uweigand at de dot ibm dot com
- Date: Tue, 19 Apr 2016 12:54:00 +0200
- Subject: Re: [PATCH] PR70674: S/390: Add memory barrier to stack pointer restore from fpr.
- Authentication-results: sourceware.org; auth=none
- References: <1461056554-18150-1-git-send-email-krebbel at linux dot vnet dot ibm dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Apr 19, 2016 at 11:02:34AM +0200, Andreas Krebbel wrote:
> I'll post the patches for the other two parts when gcc 7 entered stage
> 1 again.
It will not reenter stage 1 again, that happened last Friday ;)
> This needs to go into 4.9/5/6 branches.
Ok for 6, but I have formatting nit:
> + rtx_insn *insn;
> +
> + if (!FP_REGNO_P (cfun_gpr_save_slot (i)))
> + continue;
> +
Can you please:
rtx fpr = gen_rtx_REG (DImode, cfun_gpr_save_slot (i));
if (i == STACK_POINTER_REGNUM)
insn = emit_insn (gen_stack_restore_from_fpr (fpr));
else
insn = emit_move_insn (gen_rtx_REG (DImode, i), fpr);
That way IMHO it is more nicely formatted, you avoid the ugly (
at the end of line, it uses fewer lines anyway and additionally
you can make it clear what the gen_rtx_REG (DImode, cfun_gpr_save_slot (i))
means by giving it a name. Of course, choose whatever other var
name you prefer to describe what it is.
> + if (i == STACK_POINTER_REGNUM)
> + insn = emit_insn (gen_stack_restore_from_fpr (
> + gen_rtx_REG (DImode, cfun_gpr_save_slot (i))));
> + else
> + insn =
> + emit_move_insn (gen_rtx_REG (DImode, i),
> + gen_rtx_REG (DImode, cfun_gpr_save_slot (i)));
Jakub