re PR target/65604 (MIPS -fno-delayed-branch generates incorrect code with -mcheck-zero-division)

PR target/65604
	* config/mips/mips.c (mips_output_division): Check flag_delayed_branch.

From-SVN: r232985
This commit is contained in:
Steve Ellcey 2016-01-29 16:29:58 +00:00 committed by Steve Ellcey
parent 33e89989f6
commit 87a5ab58c5
2 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2016-01-29 Steve Ellcey <sellcey@imgtec.com>
PR target/65604
* config/mips/mips.c (mips_output_division): Check flag_delayed_branch.
2016-01-29 Jakub Jelinek <jakub@redhat.com>
PR target/69551

View File

@ -13712,9 +13712,17 @@ mips_output_division (const char *division, rtx *operands)
}
else
{
output_asm_insn ("%(bne\t%2,%.,1f", operands);
output_asm_insn (s, operands);
s = "break\t7%)\n1:";
if (flag_delayed_branch)
{
output_asm_insn ("%(bne\t%2,%.,1f", operands);
output_asm_insn (s, operands);
s = "break\t7%)\n1:";
}
else
{
output_asm_insn (s, operands);
s = "bne\t%2,%.,1f\n\tnop\n\tbreak\t7\n1:";
}
}
}
return s;