This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] MIPS, use trap instead of break to detect divide by zero


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]