]> git.proxmox.com Git - qemu.git/blobdiff - target-arm/helper.c
target-arm: fix sdiv helper
[qemu.git] / target-arm / helper.c
index 656b5df9ec90d63bf61c2a7fbcc76a7fac27ceaf..021d121df9c117215cff6e287bd78b4b8bdce8f8 100644 (file)
@@ -402,6 +402,8 @@ int32_t HELPER(sdiv)(int32_t num, int32_t den)
 {
     if (den == 0)
       return 0;
+    if (num == INT_MIN && den == -1)
+      return INT_MIN;
     return num / den;
 }