summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wasm-interpreter.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h
index 7752f5356..012c1c347 100644
--- a/src/wasm-interpreter.h
+++ b/src/wasm-interpreter.h
@@ -368,7 +368,7 @@ private:
if (v == 0) return Literal(32);
return Literal(CountTrailingZeroes((uint32_t)v));
}
- case Popcnt: return Literal(PopCount((uint32_t)v));
+ case Popcnt: return Literal((int32_t)PopCount((uint32_t)v));
case ReinterpretInt: {
float v = value.reinterpretf32();
if (isnan(v)) {
@@ -397,7 +397,7 @@ private:
if (low == 0) return Literal(32+(int64_t)CountTrailingZeroes((uint32_t)high));
return Literal((int64_t)CountTrailingZeroes((uint32_t)low));
}
- case Popcnt: return Literal(PopCount((uint64_t)v));
+ case Popcnt: return Literal((int64_t)PopCount((uint64_t)v));
case WrapInt64: return Literal(int32_t(value.geti64()));
case ReinterpretInt: {
return Literal(value.reinterpretf64());