s390.c (s390_can_use_return_insn): Check for call-saved FPRs on 31 bit.

2014-03-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/s390.c (s390_can_use_return_insn): Check for
	call-saved FPRs on 31 bit.

2014-03-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* gcc.target/s390/20140327-1.c: New testcase.

From-SVN: r208867
This commit is contained in:
Andreas Krebbel 2014-03-27 15:38:29 +00:00 committed by Andreas Krebbel
parent ba1925c368
commit 6e77facf95
4 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2014-03-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.c (s390_can_use_return_insn): Check for
call-saved FPRs on 31 bit.
2014-03-27 Jakub Jelinek <jakub@redhat.com> 2014-03-27 Jakub Jelinek <jakub@redhat.com>
PR middle-end/60682 PR middle-end/60682

View File

@ -9225,6 +9225,13 @@ s390_can_use_return_insn (void)
if (cfun_gpr_save_slot (i)) if (cfun_gpr_save_slot (i))
return false; return false;
/* For 31 bit this is not covered by the frame_size check below
since f4, f6 are saved in the register save area without needing
additional stack space. */
if (!TARGET_64BIT
&& (cfun_fpr_save_p (FPR4_REGNUM) || cfun_fpr_save_p (FPR6_REGNUM)))
return false;
if (cfun->machine->base_reg if (cfun->machine->base_reg
&& !call_really_used_regs[REGNO (cfun->machine->base_reg)]) && !call_really_used_regs[REGNO (cfun->machine->base_reg)])
return false; return false;

View File

@ -1,3 +1,7 @@
2014-03-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* gcc.target/s390/20140327-1.c: New testcase.
2014-03-27 Jakub Jelinek <jakub@redhat.com> 2014-03-27 Jakub Jelinek <jakub@redhat.com>
PR middle-end/60682 PR middle-end/60682

View File

@ -0,0 +1,10 @@
/* { dg-do compile } */
/* { dg-options "-O3 -m31 -mzarch" } */
void
foo ()
{
asm ("" ::: "%f4");
}
/* { dg-final { scan-assembler "ld" } } */