On 4/1/07, David Daney <ddaney@avtrex.com> wrote:
I am looking at how the MIPS backend handles division. For the compiler
configuration in question (mipsel-linux) division operations trap on
division by zero. This is handled in mips_output_division in mips.c
where we unconditionally emit a conditional trap.
Why does the back-end emit a trap for divide by zero if the hardware
does not handle it? Division by zero is undefined by the C/C++
standard so maybe you should just add an option to the MIPS back-end
not to emit the trap.