]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/65604 (MIPS -fno-delayed-branch generates incorrect code with -mcheck...
authorSteve Ellcey <sellcey@imgtec.com>
Fri, 29 Jan 2016 16:29:58 +0000 (16:29 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Fri, 29 Jan 2016 16:29:58 +0000 (16:29 +0000)
PR target/65604
* config/mips/mips.c (mips_output_division): Check flag_delayed_branch.

From-SVN: r232985

gcc/ChangeLog
gcc/config/mips/mips.c

index 9f998427113f74b9c6ad969dc5f442918c071464..2450e4fca91bb28f0d567cd72c1edea9790efc9a 100644 (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
index 84fbc9776df91787b3791f81191bb7af39ee0c54..9ec2dcb8f86d81f50bd1b32ea13bfed35f6c9ffc 100644 (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;