Ensure we differentiate between division by zero and overflow
authorJan Vorlicek <janvorli@microsoft.com>
Thu, 16 Apr 2015 12:04:29 +0000 (14:04 +0200)
committerJan Vorlicek <janvorli@microsoft.com>
Sat, 18 Apr 2015 00:31:42 +0000 (02:31 +0200)
commitac0ce45eb3603e52d6dee3fb8b0f4059917e39f1
tree96be582d468e9e8d8cad4fb0fd47da6849bbd01d
parent055ae91a3383d75ef9bb42c6215db3985b82d9e5
Ensure we differentiate between division by zero and overflow

This change implements parsing of the IDIV instruction operand so that
we can find whether an integer division error was a division by zero or
an integer overflow.
It replaces the previous functionality that was implemented for OSX only
and was incomplete (it didn't handle memory operands) and partially incorrect
(not handling R8..R15 properly).
src/debug/ee/amd64/amd64walker.cpp
src/pal/src/exception/machexception.cpp
src/vm/exceptionhandling.cpp