Patch to rework mips divide patterns

Jim Wilson wilson@tuliptree.org
Mon Jun 9 20:32:00 GMT 2003


Richard Sandiford wrote:
> We have this undocumented -mcheck-range-division option. 

It looks like maybe it is trying to trap on integer divide overflow. 
There is only one combination of operations that can overflow MIN_INT / 
-1 = MAX_INT + 1.  Some hardware does give a trap for this case, some 
doesn't.  The code is testing the right values, but it gets the operand 
number wrong for the MIN_INT check.  Plus it is trapping if either 
operand matches instead of trapping only if both operands match.

Jim




More information about the Gcc-patches mailing list