@@ -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,6 +905,13 @@ function do_execute_in_running_mode()
893905 fi
894906 fi
895907
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+
896915 if [[ ${ENABLE_MULTI_MODULE} -eq 1 ]]; then
897916 if [[ " ${RUNNING_MODE} " != " classic-interp" \
898917 && " ${RUNNING_MODE} " != " fast-interp" \
@@ -902,6 +921,14 @@ function do_execute_in_running_mode()
902921 fi
903922 fi
904923
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
905932 if [[ ${SGX_OPT} == " --sgx" ]]; then
906933 if [[ " ${RUNNING_MODE} " != " classic-interp" \
907934 && " ${RUNNING_MODE} " != " fast-interp" \
@@ -912,33 +939,20 @@ function do_execute_in_running_mode()
912939 fi
913940 fi
914941
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
922943 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"
925946 return 0;
926947 fi
927- fi
928948
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"
935951 return 0;
936952 fi
937- fi
938953
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"
942956 return 0;
943957 fi
944958 fi
0 commit comments