@@ -478,9 +478,9 @@ function spec_test()
478478 fi
479479
480480 # As of version 1.0.36, wabt is still unable to correctly handle the GC proposal.
481- #
481+ #
482482 # $ $ /opt/wabt-1.0.36/bin/wast2json --enable-all ../spec/test/core/br_if.wast
483- #
483+ #
484484 # ../spec/test/core/br_if.wast:670:26: error: unexpected token "null", expected a numeric index or a name (e.g. 12 or $foo).
485485 # (func $f (param (ref null $t)) (result funcref) (local.get 0))
486486 #
@@ -877,11 +877,23 @@ function do_execute_in_running_mode()
877877{
878878 local RUNNING_MODE=" $1 "
879879
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
881891 if [[ " ${RUNNING_MODE} " != " classic-interp" \
892+ && " ${RUNNING_MODE} " != " fast-interp" \
893+ && " ${RUNNING_MODE} " != " jit" \
882894 && " ${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;
885897 fi
886898 fi
887899
@@ -893,21 +905,19 @@ function do_execute_in_running_mode()
893905 fi
894906 fi
895907
896- if [[ ${ENABLE_MULTI_MODULE } -eq 1 ]]; then
908+ if [[ ${ENABLE_MULTI_MEMORY } -eq 1 ]]; then
897909 if [[ " ${RUNNING_MODE} " != " classic-interp" \
898- && " ${RUNNING_MODE} " != " fast-interp" \
899910 && " ${RUNNING_MODE} " != " aot" ]]; then
900- echo " support multi-module in both interp modes "
911+ echo " support multi-memory in classic- interp mode and aot mode "
901912 return 0
902913 fi
903914 fi
904915
905- if [[ ${SGX_OPT} == " --sgx " ]]; then
916+ if [[ ${ENABLE_MULTI_MODULE} -eq 1 ]]; then
906917 if [[ " ${RUNNING_MODE} " != " classic-interp" \
907918 && " ${RUNNING_MODE} " != " fast-interp" \
908- && " ${RUNNING_MODE} " != " aot" \
909- && " ${RUNNING_MODE} " != " fast-jit" ]]; then
910- echo " support sgx in both interp modes, fast-jit mode and aot mode"
919+ && " ${RUNNING_MODE} " != " aot" ]]; then
920+ echo " support multi-module in both interp modes"
911921 return 0
912922 fi
913923 fi
@@ -919,26 +929,31 @@ function do_execute_in_running_mode()
919929 fi
920930 fi
921931
932+ # filter out uncompatible running mode based on SGX support
933+ if [[ ${SGX_OPT} == " --sgx" ]]; then
934+ if [[ " ${RUNNING_MODE} " != " classic-interp" \
935+ && " ${RUNNING_MODE} " != " fast-interp" \
936+ && " ${RUNNING_MODE} " != " aot" \
937+ && " ${RUNNING_MODE} " != " fast-jit" ]]; then
938+ echo " support sgx in both interp modes, fast-jit mode and aot mode"
939+ return 0
940+ fi
941+ fi
942+
943+ # filter out uncompatible running mode based on architecture
922944 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"
945+ if [[ " ${RUNNING_MODE} " == " jit" || " ${RUNNING_MODE} " == " fast-jit" || " ${RUNNING_MODE} " == " multi-tier-jit " ]]; then
946+ echo " both llvm-jit, fast-jit and multi-tier -jit mode do not support X86_32 target"
925947 return 0;
926948 fi
927- fi
928949
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"
950+ if [[ ${ENABLE_MULTI_MEMORY} -eq 1 ]]; then
951+ echo " multi-memory does not support X86_32 target"
935952 return 0;
936953 fi
937- fi
938954
939- if [[ ${ENABLE_EH} -eq 1 ]]; then
940- if [[ " ${RUNNING_MODE} " != " classic-interp" ]]; then
941- echo " support exception handling in classic-interp"
955+ if [[ ${ENABLE_SIMD} -eq 1 ]]; then
956+ echo " simd does not support X86_32 target"
942957 return 0;
943958 fi
944959 fi
0 commit comments