re PR target/74563 (Classic MIPS16 (non-MIPS16e) function return broken)

PR target/74563
	* mips.md ({return,simple_return}_internal): Do not overwrite
	operands[0].

	PR target/74563
	* gcc.target/mips/pr74563: New test.

From-SVN: r246987
This commit is contained in:
Jeff Law 2017-04-18 22:52:54 -06:00 committed by Jeff Law
parent 90e87d4f1a
commit d904a98328
4 changed files with 25 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2017-04-18 Jeff Law <law@redhat.com>
PR target/74563
* mips.md ({return,simple_return}_internal): Do not overwrite
operands[0].
2017-04-18 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/80443

View File

@ -6585,7 +6585,6 @@
(use (match_operand 0 "pmode_register_operand" ""))]
""
{
operands[0] = gen_rtx_REG (Pmode, RETURN_ADDR_REGNUM);
return mips_output_jump (operands, 0, -1, false);
}
[(set_attr "type" "jump")

View File

@ -1,3 +1,8 @@
2017-04-18 Jeff Law <law@redhat.com>
PR target/74563
* gcc.target/mips/pr74563: New test.
2017-04-18 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/80443

View File

@ -0,0 +1,14 @@
/* { dg-do compile } */
/* { dg-options "-mips3 -mips16 -msoft-float" } */
void f2(void);
void f1(void)
{
f2();
}
/* { dg-final { scan-assembler-not "\tjr\t\\\$31" } } */
/* { dg-final { scan-assembler "\tjr\t\\\$7" } } */