@@ -478,9 +478,9 @@ function spec_test()
478
478
fi
479
479
480
480
# As of version 1.0.36, wabt is still unable to correctly handle the GC proposal.
481
- #
481
+ #
482
482
# $ $ /opt/wabt-1.0.36/bin/wast2json --enable-all ../spec/test/core/br_if.wast
483
- #
483
+ #
484
484
# ../spec/test/core/br_if.wast:670:26: error: unexpected token "null", expected a numeric index or a name (e.g. 12 or $foo).
485
485
# (func $f (param (ref null $t)) (result funcref) (local.get 0))
486
486
#
@@ -877,11 +877,23 @@ function do_execute_in_running_mode()
877
877
{
878
878
local RUNNING_MODE=" $1 "
879
879
880
- if [[ ${ENABLE_MULTI_MEMORY} -eq 1 ]]; then
880
+ # filter out uncompatible running mode based on targeting proposal features
881
+ # keep alpha order
882
+
883
+ if [[ ${ENABLE_EH} -eq 1 ]]; then
884
+ if [[ " ${RUNNING_MODE} " != " classic-interp" ]]; then
885
+ echo " support exception handling in classic-interp"
886
+ return 0;
887
+ fi
888
+ fi
889
+
890
+ if [[ ${ENABLE_GC} -eq 1 ]]; then
881
891
if [[ " ${RUNNING_MODE} " != " classic-interp" \
892
+ && " ${RUNNING_MODE} " != " fast-interp" \
893
+ && " ${RUNNING_MODE} " != " jit" \
882
894
&& " ${RUNNING_MODE} " != " aot" ]]; then
883
- echo " support multi-memory in classic- interp mode and aot mode"
884
- return 0
895
+ echo " support gc in both interp modes, llvm-jit mode and aot mode"
896
+ return 0;
885
897
fi
886
898
fi
887
899
@@ -893,6 +905,13 @@ function do_execute_in_running_mode()
893
905
fi
894
906
fi
895
907
908
+ if [[ ${ENABLE_MULTI_MEMORY} -eq 1 ]]; then
909
+ if [[ " ${RUNNING_MODE} " != " classic-interp" ]]; then
910
+ echo " support multi-memory in classic-interp mode mode"
911
+ return 0
912
+ fi
913
+ fi
914
+
896
915
if [[ ${ENABLE_MULTI_MODULE} -eq 1 ]]; then
897
916
if [[ " ${RUNNING_MODE} " != " classic-interp" \
898
917
&& " ${RUNNING_MODE} " != " fast-interp" \
@@ -902,6 +921,14 @@ function do_execute_in_running_mode()
902
921
fi
903
922
fi
904
923
924
+ if [[ ${ENABLE_SIMD} -eq 1 ]]; then
925
+ if [[ " ${RUNNING_MODE} " != " jit" && " ${RUNNING_MODE} " != " aot" && " ${RUNNING_MODE} " != " fast-interp" ]]; then
926
+ echo " support simd in llvm-jit, aot and fast-interp mode"
927
+ return 0;
928
+ fi
929
+ fi
930
+
931
+ # filter out uncompatible running mode based on SGX support
905
932
if [[ ${SGX_OPT} == " --sgx" ]]; then
906
933
if [[ " ${RUNNING_MODE} " != " classic-interp" \
907
934
&& " ${RUNNING_MODE} " != " fast-interp" \
@@ -912,33 +939,20 @@ function do_execute_in_running_mode()
912
939
fi
913
940
fi
914
941
915
- if [[ ${ENABLE_SIMD} -eq 1 ]]; then
916
- if [[ " ${RUNNING_MODE} " != " jit" && " ${RUNNING_MODE} " != " aot" && " ${RUNNING_MODE} " != " fast-interp" ]]; then
917
- echo " support simd in llvm-jit, aot and fast-interp mode"
918
- return 0;
919
- fi
920
- fi
921
-
942
+ # filter out uncompatible running mode based on architecture
922
943
if [[ ${TARGET} == " X86_32" ]]; then
923
- if [[ " ${RUNNING_MODE} " == " jit" || " ${RUNNING_MODE} " == " fast-jit" ]]; then
924
- echo " both llvm-jit mode and fast -jit mode do not support X86_32 target"
944
+ if [[ " ${RUNNING_MODE} " == " jit" || " ${RUNNING_MODE} " == " fast-jit" || " ${RUNNING_MODE} " == " multi-tier-jit " ]]; then
945
+ echo " both llvm-jit, fast-jit and multi-tier -jit mode do not support X86_32 target"
925
946
return 0;
926
947
fi
927
- fi
928
948
929
- if [[ ${ENABLE_GC} -eq 1 ]]; then
930
- if [[ " ${RUNNING_MODE} " != " classic-interp" \
931
- && " ${RUNNING_MODE} " != " fast-interp" \
932
- && " ${RUNNING_MODE} " != " jit" \
933
- && " ${RUNNING_MODE} " != " aot" ]]; then
934
- echo " support gc in both interp modes, llvm-jit mode and aot mode"
949
+ if [[ ${ENABLE_MULTI_MEMORY} -eq 1 ]]; then
950
+ echo " multi-memory does not support X86_32 target"
935
951
return 0;
936
952
fi
937
- fi
938
953
939
- if [[ ${ENABLE_EH} -eq 1 ]]; then
940
- if [[ " ${RUNNING_MODE} " != " classic-interp" ]]; then
941
- echo " support exception handling in classic-interp"
954
+ if [[ ${ENABLE_SIMD} -eq 1 ]]; then
955
+ echo " simd does not support X86_32 target"
942
956
return 0;
943
957
fi
944
958
fi
0 commit comments