[Bug target/65604] MIPS -fno-delayed-branch generates incorrect code with -mcheck-zero-division

sje at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 8 23:51:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65604

Steve Ellcey <sje at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sje at gcc dot gnu.org

--- Comment #1 from Steve Ellcey <sje at gcc dot gnu.org> ---
Andrew, are you compiling this for mips1 (or with the -mips16 flag)?   If I
compile for mips2 or anything newer than mips1 I get a 'teq' instruction and
not a bnez or bne instruction.

If I do compile for mips1 I get the bne (with a delay slot).  It looks like
this is a bug in mips_output_division where it does not take the
-fno-delayed-branch flag into account and when GENERATE_DIVIDE_TRAPS is false.


More information about the Gcc-bugs mailing list