diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 7d928c3e6eb..b9cbba136df 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -563,7 +563,7 @@ enum ASTNodes { F32Ceil = 0x8d, F32Floor = 0x8e, F32Trunc = 0x8f, - F32NearestInt = 0x90, + F32Nearest = 0x90, F32Sqrt = 0x91, F32Add = 0x92, F32Sub = 0x93, @@ -578,7 +578,7 @@ enum ASTNodes { F64Ceil = 0x9b, F64Floor = 0x9c, F64Trunc = 0x9d, - F64NearestInt = 0x9e, + F64Nearest = 0x9e, F64Sqrt = 0x9f, F64Add = 0xa0, F64Sub = 0xa1, diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index 7ebb401c1f2..82ac422eaa4 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -3097,11 +3097,7 @@ Result<> WasmBinaryReader::readInst() { UNARY_FLOAT(Abs); UNARY_FLOAT(Ceil); UNARY_FLOAT(Floor); - // UNARY_FLOAT(NearestInt); - case BinaryConsts::F32NearestInt: - return builder.makeUnary(NearestFloat32); - case BinaryConsts::F64NearestInt: - return builder.makeUnary(NearestFloat64); + UNARY_FLOAT(Nearest); UNARY_FLOAT(Sqrt); case BinaryConsts::F32UConvertI32: diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp index 7194229fea0..f86fb58b948 100644 --- a/src/wasm/wasm-stack.cpp +++ b/src/wasm/wasm-stack.cpp @@ -902,7 +902,7 @@ void BinaryInstWriter::visitUnary(Unary* curr) { o << int8_t(BinaryConsts::F32Trunc); break; case NearestFloat32: - o << int8_t(BinaryConsts::F32NearestInt); + o << int8_t(BinaryConsts::F32Nearest); break; case SqrtFloat32: o << int8_t(BinaryConsts::F32Sqrt); @@ -923,7 +923,7 @@ void BinaryInstWriter::visitUnary(Unary* curr) { o << int8_t(BinaryConsts::F64Trunc); break; case NearestFloat64: - o << int8_t(BinaryConsts::F64NearestInt); + o << int8_t(BinaryConsts::F64Nearest); break; case SqrtFloat64: o << int8_t(BinaryConsts::F64Sqrt);