Skip to content

Commit f724bd5

Browse files
committed
format
1 parent bd26ac6 commit f724bd5

3 files changed

Lines changed: 38 additions & 37 deletions

File tree

core/iwasm/interpreter/wasm_interp_classic.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -862,24 +862,24 @@ wasm_interp_get_frame_ref(WASMInterpFrame *frame)
862862
} while (0)
863863

864864
#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; \
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; \
883883
}
884884

885885
TRUNC_FUNCTION(trunc_f32_to_i32, float32, uint32, int32, isnanf)

core/iwasm/interpreter/wasm_interp_fast.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -720,24 +720,24 @@ wasm_interp_get_frame_ref(WASMInterpFrame *frame)
720720
} while (0)
721721

722722
#define TRUNC_FUNCTION(func_name, src_type, dst_type, signed_type, isnan_op) \
723-
static dst_type func_name(src_type src_value, src_type src_min, \
724-
src_type src_max, dst_type dst_min, \
725-
dst_type dst_max, bool is_sign) \
726-
{ \
727-
dst_type dst_value = 0; \
728-
if (!isnan_op(src_value)) { \
729-
if (src_value <= src_min) \
730-
dst_value = dst_min; \
731-
else if (src_value >= src_max) \
732-
dst_value = dst_max; \
733-
else { \
734-
if (is_sign) \
735-
dst_value = (dst_type)(signed_type)src_value; \
736-
else \
737-
dst_value = (dst_type)src_value; \
738-
} \
739-
} \
740-
return dst_value; \
723+
static dst_type func_name(src_type src_value, src_type src_min, \
724+
src_type src_max, dst_type dst_min, \
725+
dst_type dst_max, bool is_sign) \
726+
{ \
727+
dst_type dst_value = 0; \
728+
if (!isnan_op(src_value)) { \
729+
if (src_value <= src_min) \
730+
dst_value = dst_min; \
731+
else if (src_value >= src_max) \
732+
dst_value = dst_max; \
733+
else { \
734+
if (is_sign) \
735+
dst_value = (dst_type)(signed_type)src_value; \
736+
else \
737+
dst_value = (dst_type)src_value; \
738+
} \
739+
} \
740+
return dst_value; \
741741
}
742742

743743
TRUNC_FUNCTION(trunc_f32_to_i32, float32, uint32, int32, isnanf)

core/shared/platform/linux/platform_internal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ os_sigreturn();
122122
void
123123
os_set_signal_number_for_blocking_op(int signo);
124124

125-
int signbitf(float x);
125+
int
126+
signbitf(float x);
126127

127128
typedef int os_file_handle;
128129
typedef DIR *os_dir_stream;

0 commit comments

Comments
 (0)