From: Jeff Law Date: Wed, 19 Apr 2017 04:52:54 +0000 (-0600) Subject: re PR target/74563 (Classic MIPS16 (non-MIPS16e) function return broken) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d904a98328774c6df5d0aa6e2940b749dc36b12c;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ea44ddb553e..7aa8c03c45b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-04-18 Jeff Law + + PR target/74563 + * mips.md ({return,simple_return}_internal): Do not overwrite + operands[0]. + 2017-04-18 Jakub Jelinek PR tree-optimization/80443 diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 7acf00d0451..28e0a444ba9 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -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") diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 11410bb7045..c21e3733ed4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-04-18 Jeff Law + + PR target/74563 + * gcc.target/mips/pr74563: New test. + 2017-04-18 Jakub Jelinek PR tree-optimization/80443 diff --git a/gcc/testsuite/gcc.target/mips/pr74563.c b/gcc/testsuite/gcc.target/mips/pr74563.c new file mode 100644 index 00000000000..09545fcb5bd --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/pr74563.c @@ -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" } } */ + +