This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] MIPS, use trap instead of break to detect divide by zero
- From: Ralf Baechle <ralf at linux-mips dot org>
- To: David Daney <ddaney at avtrex dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 2 Jul 2004 04:30:59 +0200
- Subject: Re: [RFC] MIPS, use trap instead of break to detect divide by zero
- References: <40E3AE83.4040805@avtrex.com>
On Wed, Jun 30, 2004 at 11:26:11PM -0700, David Daney wrote:
> 3.4.x and 3.5 (and earlier versions as well) use a combination of a
> branch and the break instruction to detect divide by zero.
>
> MIPS2 and above processors seem to all have a trap instruction that can
> do the same job in one instruction. Using a trap instead of branch and
> break can save at least one instruction per divide.
I've been wondering why there is no option to disable this kind of checking
entirely.
Ralf