This is the mail archive of the gcc-patches@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: Patch to rework mips divide patterns


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



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