@@ -861,31 +861,31 @@ wasm_interp_get_frame_ref(WASMInterpFrame *frame)
861861 PUSH_##src_op_type(method(src_val)); \
862862 } while (0)
863863
864- #define TRUNC_FUNCTION (func_name , src_type , dst_type , signed_type , isnan_op ) \
865- static dst_type func_name(src_type src_value, src_type src_min, \
866- src_type src_max, dst_type dst_min, \
867- dst_type dst_max, bool is_sign) \
868- { \
869- dst_type dst_value = 0; \
870- if (!isnan_op (src_value)) { \
871- if (src_value <= src_min) \
872- dst_value = dst_min; \
873- else if (src_value >= src_max) \
874- dst_value = dst_max; \
875- else { \
876- if (is_sign) \
877- dst_value = (dst_type)(signed_type)src_value; \
878- else \
879- dst_value = (dst_type)src_value; \
880- } \
881- } \
882- return dst_value; \
864+ #define TRUNC_FUNCTION (func_name , src_type , dst_type , signed_type ) \
865+ static dst_type func_name(src_type src_value, src_type src_min, \
866+ src_type src_max, dst_type dst_min, \
867+ dst_type dst_max, bool is_sign) \
868+ { \
869+ dst_type dst_value = 0; \
870+ if (!isnan (src_value)) { \
871+ if (src_value <= src_min) \
872+ dst_value = dst_min; \
873+ else if (src_value >= src_max) \
874+ dst_value = dst_max; \
875+ else { \
876+ if (is_sign) \
877+ dst_value = (dst_type)(signed_type)src_value; \
878+ else \
879+ dst_value = (dst_type)src_value; \
880+ } \
881+ } \
882+ return dst_value; \
883883 }
884884
885- TRUNC_FUNCTION (trunc_f32_to_i32 , float32 , uint32 , int32 , isnan )
886- TRUNC_FUNCTION (trunc_f32_to_i64 , float32 , uint64 , int64 , isnan )
887- TRUNC_FUNCTION (trunc_f64_to_i32 , float64 , uint32 , int32 , isnan )
888- TRUNC_FUNCTION (trunc_f64_to_i64 , float64 , uint64 , int64 , isnan )
885+ TRUNC_FUNCTION (trunc_f32_to_i32 , float32 , uint32 , int32 )
886+ TRUNC_FUNCTION (trunc_f32_to_i64 , float32 , uint64 , int64 )
887+ TRUNC_FUNCTION (trunc_f64_to_i32 , float64 , uint32 , int32 )
888+ TRUNC_FUNCTION (trunc_f64_to_i64 , float64 , uint64 , int64 )
889889
890890static bool
891891trunc_f32_to_int (WASMModuleInstance * module , uint32 * frame_sp , float32 src_min ,
0 commit comments