diff --git a/libraries/stdlib/wasm/builtins/kotlin/Primitives.kt b/libraries/stdlib/wasm/builtins/kotlin/Primitives.kt index f43be80ef30..06ba2f918ca 100644 --- a/libraries/stdlib/wasm/builtins/kotlin/Primitives.kt +++ b/libraries/stdlib/wasm/builtins/kotlin/Primitives.kt @@ -854,9 +854,8 @@ public class Int private constructor(val value: Int) : Number(), Comparable this / other.toInt() /** Divides this value by the other value. */ - @WasmOp(WasmOp.I32_DIV_S) public operator fun div(other: Int): Int = - implementedAsIntrinsic + if (this == Int.MIN_VALUE && other == -1) Int.MIN_VALUE else wasm_i32_div_s(this, other) /** Divides this value by the other value. */ public inline operator fun div(other: Long): Long = @@ -1252,9 +1251,8 @@ public class Long private constructor(val value: Long) : Number(), Comparable