diff --git a/src/wasm/baseline/ppc/liftoff-assembler-ppc.h b/src/wasm/baseline/ppc/liftoff-assembler-ppc.h index da111ed054b8..07c483b93c41 100644 --- a/src/wasm/baseline/ppc/liftoff-assembler-ppc.h +++ b/src/wasm/baseline/ppc/liftoff-assembler-ppc.h @@ -1464,6 +1464,7 @@ bool LiftoffAssembler::emit_type_conversion(WasmOpcode opcode, fcmpu(src.fp(), kScratchDoubleReg); bunordered(trap); + mtfsb0(VXCVI); // clear FPSCR:VXCVI bit fctiwz(kScratchDoubleReg, src.fp()); MovDoubleLowToInt(dst.gp(), kScratchDoubleReg); mcrfs(cr7, VXCVI); @@ -1472,6 +1473,7 @@ bool LiftoffAssembler::emit_type_conversion(WasmOpcode opcode, } case kExprI32UConvertF64: case kExprI32UConvertF32: { + mtfsb0(VXCVI); // clear FPSCR:VXCVI bit ConvertDoubleToUnsignedInt64(src.fp(), r0, kScratchDoubleReg, kRoundToZero); mcrfs(cr7, VXCVI); // extract FPSCR field containing VXCVI into cr7 @@ -1487,6 +1489,7 @@ bool LiftoffAssembler::emit_type_conversion(WasmOpcode opcode, fcmpu(src.fp(), kScratchDoubleReg); bunordered(trap); + mtfsb0(VXCVI); // clear FPSCR:VXCVI bit fctidz(kScratchDoubleReg, src.fp()); MovDoubleToInt64(dst.gp(), kScratchDoubleReg); mcrfs(cr7, VXCVI); @@ -1499,6 +1502,7 @@ bool LiftoffAssembler::emit_type_conversion(WasmOpcode opcode, fcmpu(src.fp(), kScratchDoubleReg); bunordered(trap); + mtfsb0(VXCVI); // clear FPSCR:VXCVI bit fctiduz(kScratchDoubleReg, src.fp()); MovDoubleToInt64(dst.gp(), kScratchDoubleReg); mcrfs(cr7, VXCVI);