[PATCH MIPS] Conditional traps for divide by zero checks...

David Daney ddaney@avtrex.com
Thu Sep 2 18:23:00 GMT 2004


This patch lets the MIPS port generate a conditional trap instead of the
two instruction conditional branch and break sequence for detecting
division by zero.

It adds two new options (-mdivide-traps and -mdivide-breaks) to select
compiler behavior.  There is also a new configure option
(--with-divide=[traps|breaks]) so the default behavior can be selected
at configure time.  The default is to use -mdivide-traps on platforms
that have conditional traps.

This is kind of a follow-up to the discussion in this:
http://gcc.gnu.org/ml/gcc/2004-07/msg00022.html
thread.

Configured with --enable-languages=c,c++,java and currently testing with
top level make check.

O.K. to commit if no regressions?

David Daney
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: divide-traps.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040902/a94ab728/attachment.ksh>


More information about the Gcc-patches mailing list