Index: src/arm/simulator-arm.cc |
diff --git a/src/arm/simulator-arm.cc b/src/arm/simulator-arm.cc |
index 461d032b99f56171bb41eec2997de9f34fddb7d5..131a1bbdd8e2858dcc7378c6d56bc58bd9f5027d 100644 |
--- a/src/arm/simulator-arm.cc |
+++ b/src/arm/simulator-arm.cc |
@@ -2733,7 +2733,11 @@ void Simulator::DecodeType3(Instruction* instr) { |
int32_t rs_val = get_register(rs); |
int32_t ret_val = 0; |
ASSERT(rs_val != 0); |
- ret_val = rm_val/rs_val; |
+ if ((rm_val == kMinInt) && (rs_val == -1)) { |
+ ret_val = kMinInt; |
+ } else { |
+ ret_val = rm_val / rs_val; |
+ } |
set_register(rn, ret_val); |
return; |
} |