commit | 51127181cfac0315720e6ca502eb133a353f6b11 | [log] [tgz] |
---|---|---|
author | Aurelien Jarno <aurelien@aurel32.net> | Tue Oct 09 21:53:21 2012 +0200 |
committer | Aurelien Jarno <aurelien@aurel32.net> | Wed Oct 31 22:20:48 2012 +0100 |
tree | 19573138089d6e5d3e95948b3bee16bfcb3a35a4 | |
parent | acf124655873cf7256877a35efd8dacca1b199d8 [diff] |
target-mips: optimize ddiv/ddivu/div/divu with movcond The result of a division by 0, or a division of INT_MIN by -1 in the signed case, is unpredictable. Just replace 0 by 1 in that case so that it doesn't trigger a floating point exception on the host. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>