diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/print-call-graph.txt | 185 | ||||
-rw-r--r-- | test/unit.asm.js | 4 | ||||
-rw-r--r-- | test/unit.fromasm.imprecise.no-opts | 5 | ||||
-rw-r--r-- | test/unit.fromasm.no-opts | 5 |
4 files changed, 91 insertions, 108 deletions
diff --git a/test/passes/print-call-graph.txt b/test/passes/print-call-graph.txt index 4558194ef..b12b95828 100644 --- a/test/passes/print-call-graph.txt +++ b/test/passes/print-call-graph.txt @@ -1,146 +1,115 @@ digraph call { rankdir = LR; subgraph cluster_key { - node [shape=box, style=rounded, fontname=courier, fontsize=10]; + node [shape=box, fontname=courier, fontsize=10]; edge [fontname=courier, fontsize=10]; label = "Key"; - "Import" [style="filled, rounded", fillcolor="turquoise"]; - "Export" [style="filled, rounded", fillcolor="gray"]; + "Import" [style="filled", fillcolor="turquoise"]; + "Export" [style="filled", fillcolor="gray"]; + "Indirect Target" [style="filled, rounded", fillcolor="white"]; "A" -> "B" [style="filled, rounded", label = "Direct Call"]; - "C" -> "D" [style="filled, rounded, dashed", label = "Possible Indirect Call"]; } - node [shape=box,style=rounded, fontname=courier, fontsize=10]; - "$abort" [style="filled, rounded", fillcolor="turquoise"]; - "$_pthread_cleanup_pop" [style="filled, rounded", fillcolor="turquoise"]; - "$___lock" [style="filled, rounded", fillcolor="turquoise"]; - "$___syscall6" [style="filled, rounded", fillcolor="turquoise"]; - "$_pthread_cleanup_push" [style="filled, rounded", fillcolor="turquoise"]; - "$___syscall140" [style="filled, rounded", fillcolor="turquoise"]; - "$_emscripten_memcpy_big" [style="filled, rounded", fillcolor="turquoise"]; - "$___syscall54" [style="filled, rounded", fillcolor="turquoise"]; - "$___unlock" [style="filled, rounded", fillcolor="turquoise"]; - "$___syscall146" [style="filled, rounded", fillcolor="turquoise"]; - "$_fflush" [style="filled, rounded", fillcolor="gray"]; - "$_main" [style="filled, rounded", fillcolor="gray"]; - "$_pthread_self" [style="filled, rounded", fillcolor="gray"]; - "$_memset" [style="filled, rounded", fillcolor="gray"]; - "$_malloc" [style="filled, rounded", fillcolor="gray"]; - "$_memcpy" [style="filled, rounded", fillcolor="gray"]; - "$_free" [style="filled, rounded", fillcolor="gray"]; - "$___errno_location" [style="filled, rounded", fillcolor="gray"]; - "$runPostSets" [style="filled, rounded", fillcolor="gray"]; - "$stackAlloc" [style="filled, rounded", fillcolor="gray"]; - "$stackSave" [style="filled, rounded", fillcolor="gray"]; - "$stackRestore" [style="filled, rounded", fillcolor="gray"]; - "$establishStackSpace" [style="filled, rounded", fillcolor="gray"]; - "$setThrew" [style="filled, rounded", fillcolor="gray"]; - "$setTempRet0" [style="filled, rounded", fillcolor="gray"]; - "$getTempRet0" [style="filled, rounded", fillcolor="gray"]; - "$dynCall_ii" [style="filled, rounded", fillcolor="gray"]; - "$dynCall_iiii" [style="filled, rounded", fillcolor="gray"]; - "$dynCall_vi" [style="filled, rounded", fillcolor="gray"]; - "$dynCall_v" [style="filled, rounded", fillcolor="gray"]; - "$stackAlloc"; - "$stackSave"; - "$stackRestore"; - "$establishStackSpace"; - "$setThrew"; - "$setTempRet0"; - "$getTempRet0"; - "$_malloc"; - "$_free"; - "$_main"; + node [shape=box, fontname=courier, fontsize=10]; + "$stackAlloc" [style="filled", fillcolor="white"]; + "$stackSave" [style="filled", fillcolor="white"]; + "$stackRestore" [style="filled", fillcolor="white"]; + "$establishStackSpace" [style="filled", fillcolor="white"]; + "$setThrew" [style="filled", fillcolor="white"]; + "$setTempRet0" [style="filled", fillcolor="white"]; + "$getTempRet0" [style="filled", fillcolor="white"]; + "$_malloc" [style="filled", fillcolor="white"]; + "$_free" [style="filled", fillcolor="white"]; + "$_main" [style="filled", fillcolor="white"]; + "$___stdio_close" [style="filled", fillcolor="white"]; + "$___stdio_write" [style="filled", fillcolor="white"]; + "$___stdio_seek" [style="filled", fillcolor="white"]; + "$___syscall_ret" [style="filled", fillcolor="white"]; + "$___errno_location" [style="filled", fillcolor="white"]; + "$_cleanup_387" [style="filled", fillcolor="white"]; + "$___stdout_write" [style="filled", fillcolor="white"]; + "$_fflush" [style="filled", fillcolor="white"]; + "$___fflush_unlocked" [style="filled", fillcolor="white"]; + "$__Znwj" [style="filled", fillcolor="white"]; + "$__ZSt15get_new_handlerv" [style="filled", fillcolor="white"]; + "$runPostSets" [style="filled", fillcolor="white"]; + "$_memset" [style="filled", fillcolor="white"]; + "$_memcpy" [style="filled", fillcolor="white"]; + "$_pthread_self" [style="filled", fillcolor="white"]; + "$dynCall_ii" [style="filled", fillcolor="white"]; + "$dynCall_iiii" [style="filled", fillcolor="white"]; + "$dynCall_vi" [style="filled", fillcolor="white"]; + "$dynCall_v" [style="filled", fillcolor="white"]; + "$b0" [style="filled", fillcolor="white"]; + "$b1" [style="filled", fillcolor="white"]; + "$b2" [style="filled", fillcolor="white"]; + "$b3" [style="filled", fillcolor="white"]; + "$abort" [style="filled", fillcolor="turquoise"]; + "$_pthread_cleanup_pop" [style="filled", fillcolor="turquoise"]; + "$___lock" [style="filled", fillcolor="turquoise"]; + "$___syscall6" [style="filled", fillcolor="turquoise"]; + "$_pthread_cleanup_push" [style="filled", fillcolor="turquoise"]; + "$___syscall140" [style="filled", fillcolor="turquoise"]; + "$_emscripten_memcpy_big" [style="filled", fillcolor="turquoise"]; + "$___syscall54" [style="filled", fillcolor="turquoise"]; + "$___unlock" [style="filled", fillcolor="turquoise"]; + "$___syscall146" [style="filled", fillcolor="turquoise"]; + "$_fflush" [style="filled", fillcolor="gray"]; + "$_main" [style="filled", fillcolor="gray"]; + "$_pthread_self" [style="filled", fillcolor="gray"]; + "$_memset" [style="filled", fillcolor="gray"]; + "$_malloc" [style="filled", fillcolor="gray"]; + "$_memcpy" [style="filled", fillcolor="gray"]; + "$_free" [style="filled", fillcolor="gray"]; + "$___errno_location" [style="filled", fillcolor="gray"]; + "$runPostSets" [style="filled", fillcolor="gray"]; + "$stackAlloc" [style="filled", fillcolor="gray"]; + "$stackSave" [style="filled", fillcolor="gray"]; + "$stackRestore" [style="filled", fillcolor="gray"]; + "$establishStackSpace" [style="filled", fillcolor="gray"]; + "$setThrew" [style="filled", fillcolor="gray"]; + "$setTempRet0" [style="filled", fillcolor="gray"]; + "$getTempRet0" [style="filled", fillcolor="gray"]; + "$dynCall_ii" [style="filled", fillcolor="gray"]; + "$dynCall_iiii" [style="filled", fillcolor="gray"]; + "$dynCall_vi" [style="filled", fillcolor="gray"]; + "$dynCall_v" [style="filled", fillcolor="gray"]; "$_main" -> "$__Znwj"; // call - "$___stdio_close"; "$___stdio_close" -> "$___syscall6"; // callImport "$___stdio_close" -> "$___syscall_ret"; // call - "$___stdio_write"; "$___stdio_write" -> "$_pthread_cleanup_push"; // callImport "$___stdio_write" -> "$___syscall146"; // callImport "$___stdio_write" -> "$___syscall_ret"; // call "$___stdio_write" -> "$_pthread_cleanup_pop"; // callImport - "$___stdio_seek"; "$___stdio_seek" -> "$___syscall140"; // callImport "$___stdio_seek" -> "$___syscall_ret"; // call - "$___syscall_ret"; "$___syscall_ret" -> "$___errno_location"; // call - "$___errno_location"; "$___errno_location" -> "$_pthread_self"; // call - "$_cleanup_387"; "$_cleanup_387" -> "$_free"; // call - "$___stdout_write"; "$___stdout_write" -> "$___syscall54"; // callImport "$___stdout_write" -> "$___stdio_write"; // call - "$_fflush"; "$_fflush" -> "$___fflush_unlocked"; // call "$_fflush" -> "$_malloc"; // call "$_fflush" -> "$_free"; // call "$_fflush" -> "$_fflush"; // call "$_fflush" -> "$___lock"; // callImport "$_fflush" -> "$___unlock"; // callImport - "$___fflush_unlocked"; - "$___fflush_unlocked" -> "$b0" [style="dashed"]; // callIndirect - "$___fflush_unlocked" -> "$___stdio_close" [style="dashed"]; // callIndirect - "$___fflush_unlocked" -> "$b2" [style="dashed"]; // callIndirect - "$___fflush_unlocked" -> "$_cleanup_387" [style="dashed"]; // callIndirect - "$___fflush_unlocked" -> "$b3" [style="dashed"]; // callIndirect - "$__Znwj"; "$__Znwj" -> "$_malloc"; // call "$__Znwj" -> "$__ZSt15get_new_handlerv"; // call - "$__Znwj" -> "$b0" [style="dashed"]; // callIndirect - "$__Znwj" -> "$___stdio_close" [style="dashed"]; // callIndirect - "$__Znwj" -> "$b1" [style="dashed"]; // callIndirect - "$__Znwj" -> "$___stdout_write" [style="dashed"]; // callIndirect - "$__Znwj" -> "$___stdio_seek" [style="dashed"]; // callIndirect - "$__Znwj" -> "$___stdio_write" [style="dashed"]; // callIndirect - "$__Znwj" -> "$b2" [style="dashed"]; // callIndirect - "$__Znwj" -> "$_cleanup_387" [style="dashed"]; // callIndirect - "$__ZSt15get_new_handlerv"; - "$runPostSets"; - "$_memset"; - "$_memcpy"; "$_memcpy" -> "$_emscripten_memcpy_big"; // callImport - "$_pthread_self"; - "$dynCall_ii"; - "$dynCall_ii" -> "$b1" [style="dashed"]; // callIndirect - "$dynCall_ii" -> "$___stdout_write" [style="dashed"]; // callIndirect - "$dynCall_ii" -> "$___stdio_seek" [style="dashed"]; // callIndirect - "$dynCall_ii" -> "$___stdio_write" [style="dashed"]; // callIndirect - "$dynCall_ii" -> "$b2" [style="dashed"]; // callIndirect - "$dynCall_ii" -> "$_cleanup_387" [style="dashed"]; // callIndirect - "$dynCall_ii" -> "$b3" [style="dashed"]; // callIndirect - "$dynCall_iiii"; - "$dynCall_iiii" -> "$b0" [style="dashed"]; // callIndirect - "$dynCall_iiii" -> "$___stdio_close" [style="dashed"]; // callIndirect - "$dynCall_iiii" -> "$b2" [style="dashed"]; // callIndirect - "$dynCall_iiii" -> "$_cleanup_387" [style="dashed"]; // callIndirect - "$dynCall_iiii" -> "$b3" [style="dashed"]; // callIndirect - "$dynCall_vi"; - "$dynCall_vi" -> "$b0" [style="dashed"]; // callIndirect - "$dynCall_vi" -> "$___stdio_close" [style="dashed"]; // callIndirect - "$dynCall_vi" -> "$b1" [style="dashed"]; // callIndirect - "$dynCall_vi" -> "$___stdout_write" [style="dashed"]; // callIndirect - "$dynCall_vi" -> "$___stdio_seek" [style="dashed"]; // callIndirect - "$dynCall_vi" -> "$___stdio_write" [style="dashed"]; // callIndirect - "$dynCall_vi" -> "$b3" [style="dashed"]; // callIndirect - "$dynCall_v"; - "$dynCall_v" -> "$b0" [style="dashed"]; // callIndirect - "$dynCall_v" -> "$___stdio_close" [style="dashed"]; // callIndirect - "$dynCall_v" -> "$b1" [style="dashed"]; // callIndirect - "$dynCall_v" -> "$___stdout_write" [style="dashed"]; // callIndirect - "$dynCall_v" -> "$___stdio_seek" [style="dashed"]; // callIndirect - "$dynCall_v" -> "$___stdio_write" [style="dashed"]; // callIndirect - "$dynCall_v" -> "$b2" [style="dashed"]; // callIndirect - "$dynCall_v" -> "$_cleanup_387" [style="dashed"]; // callIndirect - "$b0"; "$b0" -> "$abort"; // callImport - "$b1"; "$b1" -> "$abort"; // callImport - "$b2"; "$b2" -> "$abort"; // callImport - "$b3"; "$b3" -> "$abort"; // callImport + "$b0" [style="filled, rounded"]; + "$___stdio_close" [style="filled, rounded"]; + "$b1" [style="filled, rounded"]; + "$___stdout_write" [style="filled, rounded"]; + "$___stdio_seek" [style="filled, rounded"]; + "$___stdio_write" [style="filled, rounded"]; + "$b2" [style="filled, rounded"]; + "$_cleanup_387" [style="filled, rounded"]; + "$b3" [style="filled, rounded"]; } (module (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) diff --git a/test/unit.asm.js b/test/unit.asm.js index 6ccf6c489..f002965ec 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -589,6 +589,10 @@ function asm(global, env, buffer) { return; } + function big_fround() { + return Math_fround(4294967295); + } + function dropIgnoredImportsInIf($0,$1,$2) { $0 = $0|0; $1 = $1|0; diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index f372b2d57..608d68dcb 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -1677,6 +1677,11 @@ ) (return) ) + (func $big_fround (result f32) + (return + (f32.const 4294967296) + ) + ) (func $dropIgnoredImportsInIf (param $$0 i32) (param $$1 i32) (param $$2 i32) (block $do-once (if diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 0b90cb3b8..0b8a67ca7 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -1683,6 +1683,11 @@ ) (return) ) + (func $big_fround (result f32) + (return + (f32.const 4294967296) + ) + ) (func $dropIgnoredImportsInIf (param $$0 i32) (param $$1 i32) (param $$2 i32) (block $do-once (if |