On 4/1/07, David Daney <[EMAIL PROTECTED]> 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.

I Know on PPC, we don't emit a trap for division by zero and the
hardware does not trap either.

Thanks,
Andrew Pinski

Reply via email to