A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Change the default collector to the copying collector (#13439)
Nick Fitzgeraldf4f14d552c89
diff --git a/ci/miri-provenance-test.sh b/ci/miri-provenance-test.shindex 7d11356343..80f762704b 100755--- a/ci/miri-provenance-test.sh+++ b/ci/miri-provenance-test.sh@@ -12,7 +12,7 @@set -excompile() {- cargo run --no-default-features --features compile,pulley,wat,gc-drc,component-model,component-model-async,debug \+ cargo run --no-default-features --features compile,pulley,wat,gc-copying,component-model,component-model-async,debug \compile --target pulley64 $1 \-o ${1%.wat}.cwasm \-O memory-reservation=$((1 << 20)) \diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rsindex 3180c64be3..7051fab450 100644--- a/crates/wasmtime/src/config.rs+++ b/crates/wasmtime/src/config.rs@@ -3394,9 +3394,9 @@ impl Strategy {////// | Collector | Collects Garbage[^1] | Latency[^2] | Throughput[^3] | Allocation Speed[^4] | Heap Utilization[^5] |/// |-----------------------------|-----------------------|-------------|----------------|----------------------|----------------------|+/// | `Copying` | Yes, including cycles | π | π | π | π |/// | `DeferredReferenceCounting` | Yes, but not cycles | π | π | π | π |/// | `Null` | No | π | π | π | π |-/// | `Copying`[^copying] | Yes, including cycles | π | π | π | π |////// [^1]: Whether or not the collector is capable of collecting garbage and cyclic garbage.///@@ -3416,9 +3416,6 @@ impl Strategy {/// require? Less space taken up by metadata means more space for/// additional objects. Reference counts are larger than mark bits and/// free lists are larger than bump pointers, for example.-///-/// [^copying]: The copying collector is still under construction and is not yet-/// functional.#[non_exhaustive]#[derive(PartialEq, Eq, Clone, Debug, Copy)]pub enum Collector {@@ -3427,10 +3424,10 @@ pub enum Collector {////// This is generally what you want for most projects and indicates that the/// `wasmtime` crate itself should make the decision about what the best- /// collector for a wasm module is.+ /// collector to use is.///- /// Currently this always defaults to the deferred reference-counting- /// collector, but the default value may change over time.+ /// Currently this always defaults to the copying collector, but the default+ /// value may change over time.Auto,/// The deferred reference-counting collector.@@ -3491,7 +3488,9 @@ impl Collector {fn not_auto(&self) -> Option<Collector> {match self {Collector::Auto => {- if cfg!(feature = "gc-drc") {+ if cfg!(feature = "gc-copying") {+ Some(Collector::Copying)+ } else if cfg!(feature = "gc-drc") {Some(Collector::DeferredReferenceCounting)} else if cfg!(feature = "gc-null") {Some(Collector::Null)diff --git a/crates/wasmtime/src/runtime/vm/gc/enabled/copying.rs b/crates/wasmtime/src/runtime/vm/gc/enabled/copying.rsindex a9781d724f..685f506327 100644--- a/crates/wasmtime/src/runtime/vm/gc/enabled/copying.rs+++ b/crates/wasmtime/src/runtime/vm/gc/enabled/copying.rs@@ -844,7 +844,11 @@ unsafe impl GcHeap for CopyingHeap {.ok_or_else(|| crate::Trap::AllocationTooLarge)?;let gc_ref = match self.allocate(size) {- None => return Ok(Err(u64::try_from(layout.size()).unwrap())),+ None => {+ // Multiply by two because we need capacity in both semi-spaces.+ let bytes_needed = u64::try_from(layout.size()).unwrap().saturating_mul(2);+ return Ok(Err(bytes_needed));+ }Some(index) => {debug_assert_ne!(index, 0, "index 0 is reserved; bump_ptr should skip it");VMGcRef::from_heap_index(NonZeroU32::new(index).unwrap()).unwrap()diff --git a/tests/all/fuel.rs b/tests/all/fuel.rsindex 6df70a25f0..8a9c0d41ef 100644--- a/tests/all/fuel.rs+++ b/tests/all/fuel.rs@@ -60,6 +60,8 @@ fn fuel_consumed(config: &Config, wasm: &[u8]) -> Result<u64> {#[wasmtime_test(wasm_features(gc, function_references, bulk_memory))]#[cfg_attr(miri, ignore)]fn iloop(config: &mut Config) -> Result<()> {+ let _ = env_logger::try_init();+config.consume_fuel(true);iloop_aborts(&config,@@ -301,7 +303,7 @@ fn iloop(config: &mut Config) -> Result<()> {(type $a (array i8))(start 0)(func- i32.const 20000+ i32.const 2_0000array.new_default $adrop)@@ -448,6 +450,7 @@ fn iloop(config: &mut Config) -> Result<()> {)?;fn iloop_aborts(config: &Config, wat: &str) -> Result<()> {+ log::debug!("Testing infinite loop:\n{wat}");let engine = Engine::new(&config)?;let module = Module::new(&engine, wat)?;let mut store = Store::new(&engine, ());diff --git a/tests/all/gc.rs b/tests/all/gc.rsindex 4eff3bc4b4..00067d2951 100644--- a/tests/all/gc.rs+++ b/tests/all/gc.rs@@ -77,6 +77,7 @@ fn smoke_test_gc_impl(use_epochs: bool) -> Result<()> {// Exiting the scope and unrooting `r` should have dropped the inner// `SetFlagOnDrop` value.+ store.gc(None)?;assert!(inner_dropped.load(SeqCst));Ok(())@@ -265,6 +266,7 @@ fn drop_externref_via_table_set() -> Result<()> {assert!(!bar_is_dropped.load(SeqCst));table_set.call(&mut store, &[Val::ExternRef(None)], &mut [])?;+ store.gc(None)?;assert!(foo_is_dropped.load(SeqCst));assert!(bar_is_dropped.load(SeqCst));diff --git a/tests/all/main.rs b/tests/all/main.rsindex ec61178b34..2d2d6c5737 100644--- a/tests/all/main.rs+++ b/tests/all/main.rs@@ -96,6 +96,11 @@ pub(crate) fn skip_pooling_allocator_tests() -> bool {// There are a couple of issues when running the pooling allocator tests under QEMU:// - high memory usage that may exceed the limits imposed by the environment (e.g. CI)// - https://github.com/bytecodealliance/wasmtime/pull/2518#issuecomment-747280133+ no_hog_memory()+}++/// Whether tests that hog memory should be skipped.+pub(crate) fn no_hog_memory() -> bool {std::env::var("WASMTIME_TEST_NO_HOG_MEMORY").is_ok()}diff --git a/tests/disas/array-copy-i64.wat b/tests/disas/array-copy-i64.watindex 1d89ee657d..95f384c36d 100644--- a/tests/disas/array-copy-i64.wat+++ b/tests/disas/array-copy-i64.wat@@ -27,8 +27,8 @@;; @002b v8 = load.i64 notrap aligned readonly can_move v81+32;; @002b v7 = uextend.i64 v2;; @002b v9 = iadd v8, v7-;; @002b v10 = iconst.i64 24-;; @002b v11 = iadd v9, v10 ; v10 = 24+;; @002b v10 = iconst.i64 16+;; @002b v11 = iadd v9, v10 ; v10 = 16;; @002b v12 = load.i32 user2 readonly v11;; @002b v14 = uextend.i64 v3;; @002b v15 = uextend.i64 v6@@ -39,7 +39,7 @@;; @002b trapz v4, user16;; @002b v26 = uextend.i64 v4;; @002b v28 = iadd v8, v26-;; @002b v30 = iadd v28, v10 ; v10 = 24+;; @002b v30 = iadd v28, v10 ; v10 = 16;; @002b v31 = load.i32 user2 readonly v30;; @002b v33 = uextend.i64 v5;; @002b v36 = iadd v33, v15@@ -47,8 +47,8 @@;; @002b v37 = icmp ugt v36, v32;; @002b trapnz v37, user17;; @002b v49 = load.i64 notrap aligned v81+40-;; v77 = iconst.i64 32-;; @002b v22 = iadd v9, v77 ; v77 = 32+;; v77 = iconst.i64 24+;; @002b v22 = iadd v9, v77 ; v77 = 24;; v85 = iconst.i64 3;; v86 = ishl v14, v85 ; v85 = 3;; @002b v25 = iadd v22, v86@@ -57,7 +57,7 @@;; @002b v50 = iadd v8, v49;; @002b v52 = icmp ugt v51, v50;; @002b trapnz v52, user2-;; @002b v41 = iadd v28, v77 ; v77 = 32+;; @002b v41 = iadd v28, v77 ; v77 = 24;; v88 = ishl v33, v85 ; v85 = 3;; @002b v44 = iadd v41, v88;; @002b v56 = uadd_overflow_trap v44, v90, user2diff --git a/tests/disas/array-copy-i8.wat b/tests/disas/array-copy-i8.watindex 55794a179c..9c7586f7dd 100644--- a/tests/disas/array-copy-i8.wat+++ b/tests/disas/array-copy-i8.wat@@ -27,8 +27,8 @@;; @002b v8 = load.i64 notrap aligned readonly can_move v81+32;; @002b v7 = uextend.i64 v2;; @002b v9 = iadd v8, v7-;; @002b v10 = iconst.i64 24-;; @002b v11 = iadd v9, v10 ; v10 = 24+;; @002b v10 = iconst.i64 16+;; @002b v11 = iadd v9, v10 ; v10 = 16;; @002b v12 = load.i32 user2 readonly v11;; @002b v14 = uextend.i64 v3;; @002b v15 = uextend.i64 v6@@ -39,7 +39,7 @@;; @002b trapz v4, user16;; @002b v26 = uextend.i64 v4;; @002b v28 = iadd v8, v26-;; @002b v30 = iadd v28, v10 ; v10 = 24+;; @002b v30 = iadd v28, v10 ; v10 = 16;; @002b v31 = load.i32 user2 readonly v30;; @002b v33 = uextend.i64 v5;; @002b v36 = iadd v33, v15@@ -47,14 +47,14 @@;; @002b v37 = icmp ugt v36, v32;; @002b trapnz v37, user17;; @002b v49 = load.i64 notrap aligned v81+40-;; v77 = iconst.i64 28-;; @002b v22 = iadd v9, v77 ; v77 = 28+;; v77 = iconst.i64 20+;; @002b v22 = iadd v9, v77 ; v77 = 20;; @002b v25 = iadd v22, v14;; @002b v51 = uadd_overflow_trap v25, v15, user2;; @002b v50 = iadd v8, v49;; @002b v52 = icmp ugt v51, v50;; @002b trapnz v52, user2-;; @002b v41 = iadd v28, v77 ; v77 = 28+;; @002b v41 = iadd v28, v77 ; v77 = 20;; @002b v44 = iadd v41, v33;; @002b v56 = uadd_overflow_trap v44, v15, user2;; @002b v57 = icmp ugt v56, v50diff --git a/tests/disas/array-fill-f32.wat b/tests/disas/array-fill-f32.watindex d1a7d8f0da..79b095b60e 100644--- a/tests/disas/array-fill-f32.wat+++ b/tests/disas/array-fill-f32.wat@@ -33,8 +33,8 @@;; @0030 v7 = load.i64 notrap aligned readonly can_move v49+32;; @0030 v6 = uextend.i64 v2;; @0030 v8 = iadd v7, v6-;; @0030 v9 = iconst.i64 24-;; @0030 v10 = iadd v8, v9 ; v9 = 24+;; @0030 v9 = iconst.i64 16+;; @0030 v10 = iadd v8, v9 ; v9 = 16;; @0030 v11 = load.i32 user2 readonly v10;; @0030 v13 = uextend.i64 v3;; @0030 v14 = uextend.i64 v5@@ -43,8 +43,8 @@;; @0030 v17 = icmp ugt v16, v12;; @0030 trapnz v17, user17;; @0030 v28 = load.i64 notrap aligned v49+40-;; v45 = iconst.i64 28-;; @0030 v21 = iadd v8, v45 ; v45 = 28+;; v45 = iconst.i64 20+;; @0030 v21 = iadd v8, v45 ; v45 = 20;; v53 = iconst.i64 2;; v54 = ishl v13, v53 ; v53 = 2;; @0030 v24 = iadd v21, v54@@ -91,8 +91,8 @@;; @0041 v7 = load.i64 notrap aligned readonly can_move v44+32;; @0041 v6 = uextend.i64 v2;; @0041 v8 = iadd v7, v6-;; @0041 v9 = iconst.i64 24-;; @0041 v10 = iadd v8, v9 ; v9 = 24+;; @0041 v9 = iconst.i64 16+;; @0041 v10 = iadd v8, v9 ; v9 = 16;; @0041 v11 = load.i32 user2 readonly v10;; @0041 v13 = uextend.i64 v3;; @0041 v14 = uextend.i64 v4@@ -101,8 +101,8 @@;; @0041 v17 = icmp ugt v16, v12;; @0041 trapnz v17, user17;; @0041 v28 = load.i64 notrap aligned v44+40-;; v40 = iconst.i64 28-;; @0041 v21 = iadd v8, v40 ; v40 = 28+;; v40 = iconst.i64 20+;; @0041 v21 = iadd v8, v40 ; v40 = 20;; v48 = iconst.i64 2;; v49 = ishl v13, v48 ; v48 = 2;; @0041 v24 = iadd v21, v49@@ -135,8 +135,8 @@;; @0052 v7 = load.i64 notrap aligned readonly can_move v49+32;; @0052 v6 = uextend.i64 v2;; @0052 v8 = iadd v7, v6-;; @0052 v9 = iconst.i64 24-;; @0052 v10 = iadd v8, v9 ; v9 = 24+;; @0052 v9 = iconst.i64 16+;; @0052 v10 = iadd v8, v9 ; v9 = 16;; @0052 v11 = load.i32 user2 readonly v10;; @0052 v13 = uextend.i64 v3;; @0052 v14 = uextend.i64 v4@@ -145,8 +145,8 @@;; @0052 v17 = icmp ugt v16, v12;; @0052 trapnz v17, user17;; @0052 v28 = load.i64 notrap aligned v49+40-;; v45 = iconst.i64 28-;; @0052 v21 = iadd v8, v45 ; v45 = 28+;; v45 = iconst.i64 20+;; @0052 v21 = iadd v8, v45 ; v45 = 20;; v53 = iconst.i64 2;; v54 = ishl v13, v53 ; v53 = 2;; @0052 v24 = iadd v21, v54diff --git a/tests/disas/array-fill-f64.wat b/tests/disas/array-fill-f64.watindex 2731686a0b..37b84267e9 100644--- a/tests/disas/array-fill-f64.wat+++ b/tests/disas/array-fill-f64.wat@@ -33,8 +33,8 @@;; @0030 v7 = load.i64 notrap aligned readonly can_move v49+32;; @0030 v6 = uextend.i64 v2;; @0030 v8 = iadd v7, v6-;; @0030 v9 = iconst.i64 24-;; @0030 v10 = iadd v8, v9 ; v9 = 24+;; @0030 v9 = iconst.i64 16+;; @0030 v10 = iadd v8, v9 ; v9 = 16;; @0030 v11 = load.i32 user2 readonly v10;; @0030 v13 = uextend.i64 v3;; @0030 v14 = uextend.i64 v5@@ -43,8 +43,8 @@;; @0030 v17 = icmp ugt v16, v12;; @0030 trapnz v17, user17;; @0030 v28 = load.i64 notrap aligned v49+40-;; v45 = iconst.i64 32-;; @0030 v21 = iadd v8, v45 ; v45 = 32+;; v45 = iconst.i64 24+;; @0030 v21 = iadd v8, v45 ; v45 = 24;; v53 = iconst.i64 3;; v54 = ishl v13, v53 ; v53 = 3;; @0030 v24 = iadd v21, v54@@ -91,8 +91,8 @@;; @0045 v7 = load.i64 notrap aligned readonly can_move v44+32;; @0045 v6 = uextend.i64 v2;; @0045 v8 = iadd v7, v6-;; @0045 v9 = iconst.i64 24-;; @0045 v10 = iadd v8, v9 ; v9 = 24+;; @0045 v9 = iconst.i64 16+;; @0045 v10 = iadd v8, v9 ; v9 = 16;; @0045 v11 = load.i32 user2 readonly v10;; @0045 v13 = uextend.i64 v3;; @0045 v14 = uextend.i64 v4@@ -101,8 +101,8 @@;; @0045 v17 = icmp ugt v16, v12;; @0045 trapnz v17, user17;; @0045 v28 = load.i64 notrap aligned v44+40-;; v40 = iconst.i64 32-;; @0045 v21 = iadd v8, v40 ; v40 = 32+;; v40 = iconst.i64 24+;; @0045 v21 = iadd v8, v40 ; v40 = 24;; v48 = iconst.i64 3;; v49 = ishl v13, v48 ; v48 = 3;; @0045 v24 = iadd v21, v49@@ -135,8 +135,8 @@;; @005a v7 = load.i64 notrap aligned readonly can_move v49+32;; @005a v6 = uextend.i64 v2;; @005a v8 = iadd v7, v6-;; @005a v9 = iconst.i64 24-;; @005a v10 = iadd v8, v9 ; v9 = 24+;; @005a v9 = iconst.i64 16+;; @005a v10 = iadd v8, v9 ; v9 = 16;; @005a v11 = load.i32 user2 readonly v10;; @005a v13 = uextend.i64 v3;; @005a v14 = uextend.i64 v4@@ -145,8 +145,8 @@;; @005a v17 = icmp ugt v16, v12;; @005a trapnz v17, user17;; @005a v28 = load.i64 notrap aligned v49+40-;; v45 = iconst.i64 32-;; @005a v21 = iadd v8, v45 ; v45 = 32+;; v45 = iconst.i64 24+;; @005a v21 = iadd v8, v45 ; v45 = 24;; v53 = iconst.i64 3;; v54 = ishl v13, v53 ; v53 = 3;; @005a v24 = iadd v21, v54diff --git a/tests/disas/array-fill-funcref.wat b/tests/disas/array-fill-funcref.watindex f86fc7d571..4f594096bb 100644--- a/tests/disas/array-fill-funcref.wat+++ b/tests/disas/array-fill-funcref.wat@@ -38,8 +38,8 @@;; @003b v7 = load.i64 notrap aligned readonly can_move v52+32;; @003b v6 = uextend.i64 v2;; @003b v8 = iadd v7, v6-;; @003b v9 = iconst.i64 24-;; @003b v10 = iadd v8, v9 ; v9 = 24+;; @003b v9 = iconst.i64 16+;; @003b v10 = iadd v8, v9 ; v9 = 16;; @003b v11 = load.i32 user2 readonly v10;; @003b v13 = uextend.i64 v3;; @003b v14 = uextend.i64 v5@@ -48,8 +48,8 @@;; @003b v17 = icmp ugt v16, v12;; @003b trapnz v17, user17;; @003b v28 = load.i64 notrap aligned v52+40-;; v48 = iconst.i64 28-;; @003b v21 = iadd v8, v48 ; v48 = 28+;; v48 = iconst.i64 20+;; @003b v21 = iadd v8, v48 ; v48 = 20;; v56 = iconst.i64 2;; v57 = ishl v13, v56 ; v56 = 2;; @003b v24 = iadd v21, v57@@ -98,8 +98,8 @@;; @0049 v7 = load.i64 notrap aligned readonly can_move v44+32;; @0049 v6 = uextend.i64 v2;; @0049 v8 = iadd v7, v6-;; @0049 v9 = iconst.i64 24-;; @0049 v10 = iadd v8, v9 ; v9 = 24+;; @0049 v9 = iconst.i64 16+;; @0049 v10 = iadd v8, v9 ; v9 = 16;; @0049 v11 = load.i32 user2 readonly v10;; @0049 v13 = uextend.i64 v3;; @0049 v14 = uextend.i64 v4@@ -108,8 +108,8 @@;; @0049 v17 = icmp ugt v16, v12;; @0049 trapnz v17, user17;; @0049 v28 = load.i64 notrap aligned v44+40-;; v40 = iconst.i64 28-;; @0049 v21 = iadd v8, v40 ; v40 = 28+;; v40 = iconst.i64 20+;; @0049 v21 = iadd v8, v40 ; v40 = 20;; v47 = iconst.i64 2;; v48 = ishl v13, v47 ; v47 = 2;; @0049 v24 = iadd v21, v48@@ -152,8 +152,8 @@;; @0057 v9 = load.i64 notrap aligned readonly can_move v58+32;; @0057 v8 = uextend.i64 v44;; @0057 v10 = iadd v9, v8-;; @0057 v11 = iconst.i64 24-;; @0057 v12 = iadd v10, v11 ; v11 = 24+;; @0057 v11 = iconst.i64 16+;; @0057 v12 = iadd v10, v11 ; v11 = 16;; @0057 v13 = load.i32 user2 readonly v12;; @0057 v15 = uextend.i64 v3;; @0057 v16 = uextend.i64 v4@@ -162,8 +162,8 @@;; @0057 v19 = icmp ugt v18, v14;; @0057 trapnz v19, user17;; @0057 v30 = load.i64 notrap aligned v58+40-;; v53 = iconst.i64 28-;; @0057 v23 = iadd v10, v53 ; v53 = 28+;; v53 = iconst.i64 20+;; @0057 v23 = iadd v10, v53 ; v53 = 20;; v65 = iconst.i64 2;; v66 = ishl v15, v65 ; v65 = 2;; @0057 v26 = iadd v23, v66diff --git a/tests/disas/array-fill-i16.wat b/tests/disas/array-fill-i16.watindex e64a437d43..363eb72634 100644--- a/tests/disas/array-fill-i16.wat+++ b/tests/disas/array-fill-i16.wat@@ -37,8 +37,8 @@;; @0031 v7 = load.i64 notrap aligned readonly can_move v49+32;; @0031 v6 = uextend.i64 v2;; @0031 v8 = iadd v7, v6-;; @0031 v9 = iconst.i64 24-;; @0031 v10 = iadd v8, v9 ; v9 = 24+;; @0031 v9 = iconst.i64 16+;; @0031 v10 = iadd v8, v9 ; v9 = 16;; @0031 v11 = load.i32 user2 readonly v10;; @0031 v13 = uextend.i64 v3;; @0031 v14 = uextend.i64 v5@@ -47,8 +47,8 @@;; @0031 v17 = icmp ugt v16, v12;; @0031 trapnz v17, user17;; @0031 v28 = load.i64 notrap aligned v49+40-;; v45 = iconst.i64 28-;; @0031 v21 = iadd v8, v45 ; v45 = 28+;; v45 = iconst.i64 20+;; @0031 v21 = iadd v8, v45 ; v45 = 20;; v48 = iconst.i64 1;; v54 = ishl v13, v48 ; v48 = 1;; @0031 v24 = iadd v21, v54@@ -95,8 +95,8 @@;; @003f v7 = load.i64 notrap aligned readonly can_move v44+32;; @003f v6 = uextend.i64 v2;; @003f v8 = iadd v7, v6-;; @003f v9 = iconst.i64 24-;; @003f v10 = iadd v8, v9 ; v9 = 24+;; @003f v9 = iconst.i64 16+;; @003f v10 = iadd v8, v9 ; v9 = 16;; @003f v11 = load.i32 user2 readonly v10;; @003f v13 = uextend.i64 v3;; @003f v14 = uextend.i64 v4@@ -105,8 +105,8 @@;; @003f v17 = icmp ugt v16, v12;; @003f trapnz v17, user17;; @003f v28 = load.i64 notrap aligned v44+40-;; v40 = iconst.i64 28-;; @003f v21 = iadd v8, v40 ; v40 = 28+;; v40 = iconst.i64 20+;; @003f v21 = iadd v8, v40 ; v40 = 20;; v43 = iconst.i64 1;; v49 = ishl v13, v43 ; v43 = 1;; @003f v24 = iadd v21, v49@@ -141,8 +141,8 @@;; @004d v7 = load.i64 notrap aligned readonly can_move v44+32;; @004d v6 = uextend.i64 v2;; @004d v8 = iadd v7, v6-;; @004d v9 = iconst.i64 24-;; @004d v10 = iadd v8, v9 ; v9 = 24+;; @004d v9 = iconst.i64 16+;; @004d v10 = iadd v8, v9 ; v9 = 16;; @004d v11 = load.i32 user2 readonly v10;; @004d v13 = uextend.i64 v3;; @004d v14 = uextend.i64 v4@@ -151,8 +151,8 @@;; @004d v17 = icmp ugt v16, v12;; @004d trapnz v17, user17;; @004d v28 = load.i64 notrap aligned v44+40-;; v40 = iconst.i64 28-;; @004d v21 = iadd v8, v40 ; v40 = 28+;; v40 = iconst.i64 20+;; @004d v21 = iadd v8, v40 ; v40 = 20;; v43 = iconst.i64 1;; v49 = ishl v13, v43 ; v43 = 1;; @004d v24 = iadd v21, v49@@ -185,8 +185,8 @@;; @005d v7 = load.i64 notrap aligned readonly can_move v49+32;; @005d v6 = uextend.i64 v2;; @005d v8 = iadd v7, v6-;; @005d v9 = iconst.i64 24-;; @005d v10 = iadd v8, v9 ; v9 = 24+;; @005d v9 = iconst.i64 16+;; @005d v10 = iadd v8, v9 ; v9 = 16;; @005d v11 = load.i32 user2 readonly v10;; @005d v13 = uextend.i64 v3;; @005d v14 = uextend.i64 v4@@ -195,8 +195,8 @@;; @005d v17 = icmp ugt v16, v12;; @005d trapnz v17, user17;; @005d v28 = load.i64 notrap aligned v49+40-;; v45 = iconst.i64 28-;; @005d v21 = iadd v8, v45 ; v45 = 28+;; v45 = iconst.i64 20+;; @005d v21 = iadd v8, v45 ; v45 = 20;; v48 = iconst.i64 1;; v54 = ishl v13, v48 ; v48 = 1;; @005d v24 = iadd v21, v54diff --git a/tests/disas/array-fill-i32.wat b/tests/disas/array-fill-i32.watindex 1badbb90db..4a20eb0a3d 100644--- a/tests/disas/array-fill-i32.wat+++ b/tests/disas/array-fill-i32.wat@@ -37,8 +37,8 @@;; @0031 v7 = load.i64 notrap aligned readonly can_move v49+32;; @0031 v6 = uextend.i64 v2;; @0031 v8 = iadd v7, v6-;; @0031 v9 = iconst.i64 24-;; @0031 v10 = iadd v8, v9 ; v9 = 24+;; @0031 v9 = iconst.i64 16+;; @0031 v10 = iadd v8, v9 ; v9 = 16;; @0031 v11 = load.i32 user2 readonly v10;; @0031 v13 = uextend.i64 v3;; @0031 v14 = uextend.i64 v5@@ -47,8 +47,8 @@;; @0031 v17 = icmp ugt v16, v12;; @0031 trapnz v17, user17;; @0031 v28 = load.i64 notrap aligned v49+40-;; v45 = iconst.i64 28-;; @0031 v21 = iadd v8, v45 ; v45 = 28+;; v45 = iconst.i64 20+;; @0031 v21 = iadd v8, v45 ; v45 = 20;; v53 = iconst.i64 2;; v54 = ishl v13, v53 ; v53 = 2;; @0031 v24 = iadd v21, v54@@ -95,8 +95,8 @@;; @003f v7 = load.i64 notrap aligned readonly can_move v44+32;; @003f v6 = uextend.i64 v2;; @003f v8 = iadd v7, v6-;; @003f v9 = iconst.i64 24-;; @003f v10 = iadd v8, v9 ; v9 = 24+;; @003f v9 = iconst.i64 16+;; @003f v10 = iadd v8, v9 ; v9 = 16;; @003f v11 = load.i32 user2 readonly v10;; @003f v13 = uextend.i64 v3;; @003f v14 = uextend.i64 v4@@ -105,8 +105,8 @@;; @003f v17 = icmp ugt v16, v12;; @003f trapnz v17, user17;; @003f v28 = load.i64 notrap aligned v44+40-;; v40 = iconst.i64 28-;; @003f v21 = iadd v8, v40 ; v40 = 28+;; v40 = iconst.i64 20+;; @003f v21 = iadd v8, v40 ; v40 = 20;; v48 = iconst.i64 2;; v49 = ishl v13, v48 ; v48 = 2;; @003f v24 = iadd v21, v49@@ -141,8 +141,8 @@;; @004d v7 = load.i64 notrap aligned readonly can_move v44+32;; @004d v6 = uextend.i64 v2;; @004d v8 = iadd v7, v6-;; @004d v9 = iconst.i64 24-;; @004d v10 = iadd v8, v9 ; v9 = 24+;; @004d v9 = iconst.i64 16+;; @004d v10 = iadd v8, v9 ; v9 = 16;; @004d v11 = load.i32 user2 readonly v10;; @004d v13 = uextend.i64 v3;; @004d v14 = uextend.i64 v4@@ -151,8 +151,8 @@;; @004d v17 = icmp ugt v16, v12;; @004d trapnz v17, user17;; @004d v28 = load.i64 notrap aligned v44+40-;; v40 = iconst.i64 28-;; @004d v21 = iadd v8, v40 ; v40 = 28+;; v40 = iconst.i64 20+;; @004d v21 = iadd v8, v40 ; v40 = 20;; v48 = iconst.i64 2;; v49 = ishl v13, v48 ; v48 = 2;; @004d v24 = iadd v21, v49@@ -185,8 +185,8 @@;; @005d v7 = load.i64 notrap aligned readonly can_move v49+32;; @005d v6 = uextend.i64 v2;; @005d v8 = iadd v7, v6-;; @005d v9 = iconst.i64 24-;; @005d v10 = iadd v8, v9 ; v9 = 24+;; @005d v9 = iconst.i64 16+;; @005d v10 = iadd v8, v9 ; v9 = 16;; @005d v11 = load.i32 user2 readonly v10;; @005d v13 = uextend.i64 v3;; @005d v14 = uextend.i64 v4@@ -195,8 +195,8 @@;; @005d v17 = icmp ugt v16, v12;; @005d trapnz v17, user17;; @005d v28 = load.i64 notrap aligned v49+40-;; v45 = iconst.i64 28-;; @005d v21 = iadd v8, v45 ; v45 = 28+;; v45 = iconst.i64 20+;; @005d v21 = iadd v8, v45 ; v45 = 20;; v53 = iconst.i64 2;; v54 = ishl v13, v53 ; v53 = 2;; @005d v24 = iadd v21, v54diff --git a/tests/disas/array-fill-i64.wat b/tests/disas/array-fill-i64.watindex 141a577c9e..b718340cb0 100644--- a/tests/disas/array-fill-i64.wat+++ b/tests/disas/array-fill-i64.wat@@ -37,8 +37,8 @@;; @0031 v7 = load.i64 notrap aligned readonly can_move v49+32;; @0031 v6 = uextend.i64 v2;; @0031 v8 = iadd v7, v6-;; @0031 v9 = iconst.i64 24-;; @0031 v10 = iadd v8, v9 ; v9 = 24+;; @0031 v9 = iconst.i64 16+;; @0031 v10 = iadd v8, v9 ; v9 = 16;; @0031 v11 = load.i32 user2 readonly v10;; @0031 v13 = uextend.i64 v3;; @0031 v14 = uextend.i64 v5@@ -47,8 +47,8 @@;; @0031 v17 = icmp ugt v16, v12;; @0031 trapnz v17, user17;; @0031 v28 = load.i64 notrap aligned v49+40-;; v45 = iconst.i64 32-;; @0031 v21 = iadd v8, v45 ; v45 = 32+;; v45 = iconst.i64 24+;; @0031 v21 = iadd v8, v45 ; v45 = 24;; v53 = iconst.i64 3;; v54 = ishl v13, v53 ; v53 = 3;; @0031 v24 = iadd v21, v54@@ -95,8 +95,8 @@;; @003f v7 = load.i64 notrap aligned readonly can_move v44+32;; @003f v6 = uextend.i64 v2;; @003f v8 = iadd v7, v6-;; @003f v9 = iconst.i64 24-;; @003f v10 = iadd v8, v9 ; v9 = 24+;; @003f v9 = iconst.i64 16+;; @003f v10 = iadd v8, v9 ; v9 = 16;; @003f v11 = load.i32 user2 readonly v10;; @003f v13 = uextend.i64 v3;; @003f v14 = uextend.i64 v4@@ -105,8 +105,8 @@;; @003f v17 = icmp ugt v16, v12;; @003f trapnz v17, user17;; @003f v28 = load.i64 notrap aligned v44+40-;; v40 = iconst.i64 32-;; @003f v21 = iadd v8, v40 ; v40 = 32+;; v40 = iconst.i64 24+;; @003f v21 = iadd v8, v40 ; v40 = 24;; v47 = iconst.i64 3;; v48 = ishl v13, v47 ; v47 = 3;; @003f v24 = iadd v21, v48@@ -141,8 +141,8 @@;; @004d v7 = load.i64 notrap aligned readonly can_move v44+32;; @004d v6 = uextend.i64 v2;; @004d v8 = iadd v7, v6-;; @004d v9 = iconst.i64 24-;; @004d v10 = iadd v8, v9 ; v9 = 24+;; @004d v9 = iconst.i64 16+;; @004d v10 = iadd v8, v9 ; v9 = 16;; @004d v11 = load.i32 user2 readonly v10;; @004d v13 = uextend.i64 v3;; @004d v14 = uextend.i64 v4@@ -151,8 +151,8 @@;; @004d v17 = icmp ugt v16, v12;; @004d trapnz v17, user17;; @004d v28 = load.i64 notrap aligned v44+40-;; v40 = iconst.i64 32-;; @004d v21 = iadd v8, v40 ; v40 = 32+;; v40 = iconst.i64 24+;; @004d v21 = iadd v8, v40 ; v40 = 24;; v48 = iconst.i64 3;; v49 = ishl v13, v48 ; v48 = 3;; @004d v24 = iadd v21, v49@@ -185,8 +185,8 @@;; @005b v7 = load.i64 notrap aligned readonly can_move v49+32;; @005b v6 = uextend.i64 v2;; @005b v8 = iadd v7, v6-;; @005b v9 = iconst.i64 24-;; @005b v10 = iadd v8, v9 ; v9 = 24+;; @005b v9 = iconst.i64 16+;; @005b v10 = iadd v8, v9 ; v9 = 16;; @005b v11 = load.i32 user2 readonly v10;; @005b v13 = uextend.i64 v3;; @005b v14 = uextend.i64 v4@@ -195,8 +195,8 @@;; @005b v17 = icmp ugt v16, v12;; @005b trapnz v17, user17;; @005b v28 = load.i64 notrap aligned v49+40-;; v45 = iconst.i64 32-;; @005b v21 = iadd v8, v45 ; v45 = 32+;; v45 = iconst.i64 24+;; @005b v21 = iadd v8, v45 ; v45 = 24;; v53 = iconst.i64 3;; v54 = ishl v13, v53 ; v53 = 3;; @005b v24 = iadd v21, v54diff --git a/tests/disas/debug-exceptions.wat b/tests/disas/debug-exceptions.watindex a95b35ceb3..fa0cc00f96 100644--- a/tests/disas/debug-exceptions.wat+++ b/tests/disas/debug-exceptions.wat@@ -25,106 +25,115 @@;; stp d12, d13, [sp, #-0x10]!;; stp d10, d11, [sp, #-0x10]!;; stp d8, d9, [sp, #-0x10]!-;; sub sp, sp, #0x30+;; sub sp, sp, #0x20;; ldr x0, [x2, #8];; ldr x0, [x0, #0x18];; mov x1, sp;; cmp x1, x0-;; b.lo #0x1c0+;; b.lo #0x21c;; 44: stur x2, [sp];; mov x0, x2;; stur x2, [sp, #0x10];; nop-;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x35, slot at FP-0xc0, locals , stack-;; β°ββΌ breakpoint patch: wasm PC 0x35, patch bytes [46, 1, 0, 148]+;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x35, slot at FP-0xb0, locals , stack+;; β°ββΌ breakpoint patch: wasm PC 0x35, patch bytes [69, 1, 0, 148];; ldur x0, [sp, #0x10];; nop-;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x37, slot at FP-0xc0, locals , stack-;; β°ββΌ breakpoint patch: wasm PC 0x37, patch bytes [44, 1, 0, 148]+;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x37, slot at FP-0xb0, locals , stack+;; β°ββΌ breakpoint patch: wasm PC 0x37, patch bytes [67, 1, 0, 148];; ldur x0, [sp, #0x10];; nop-;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x3d, slot at FP-0xc0, locals , stack-;; β°ββΌ breakpoint patch: wasm PC 0x3d, patch bytes [42, 1, 0, 148]-;; mov w19, #0x2a-;; stur w19, [sp, #8]+;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x3d, slot at FP-0xb0, locals , stack+;; β°ββΌ breakpoint patch: wasm PC 0x3d, patch bytes [65, 1, 0, 148]+;; mov w1, #0x2a+;; stur w1, [sp, #8];; nop-;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x3f, slot at FP-0xc0, locals , stack I32 @ slot+0x8-;; β°ββΌ breakpoint patch: wasm PC 0x3f, patch bytes [39, 1, 0, 148]+;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x3f, slot at FP-0xb0, locals , stack I32 @ slot+0x8+;; β°ββΌ breakpoint patch: wasm PC 0x3f, patch bytes [62, 1, 0, 148];; nop-;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x40, slot at FP-0xc0, locals , stack-;; β°ββΌ breakpoint patch: wasm PC 0x40, patch bytes [38, 1, 0, 148]-;; stur w19, [sp, #8]+;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x40, slot at FP-0xb0, locals , stack+;; β°ββΌ breakpoint patch: wasm PC 0x40, patch bytes [61, 1, 0, 148]+;; stur w1, [sp, #8];; nop-;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x42, slot at FP-0xc0, locals , stack I32 @ slot+0x8-;; β°ββΌ breakpoint patch: wasm PC 0x42, patch bytes [36, 1, 0, 148]+;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x42, slot at FP-0xb0, locals , stack I32 @ slot+0x8+;; β°ββΌ breakpoint patch: wasm PC 0x42, patch bytes [59, 1, 0, 148];; ldur x2, [sp, #0x10]-;; bl #0x468-;; 84: mov x20, x2-;; mov w3, #0x4000000+;; bl #0x4c4+;; 84: ldur x0, [sp, #0x10]+;; mov x19, x2+;; ldr x2, [x0, #0x20]+;; ldr w3, [x2]+;; mov w4, w3+;; add x4, x4, #0x20+;; ldr w5, [x2, #4]+;; cmp x4, x5+;; b.hi #0x1b4+;; a8: add w5, w3, #0x20+;; str w5, [x2]+;; mov w7, #0x4000000;; ldur x0, [sp, #0x10]-;; ldr x0, [x0, #0x28]-;; ldr w4, [x0, #8]-;; mov w5, #0x28-;; mov w6, #8-;; ldur x2, [sp, #0x10]-;; bl #0x38c-;; a8: ldur x0, [sp, #0x10]-;; ldr x0, [x0, #8]-;; ldr x4, [x0, #0x20]-;; stur x0, [sp, #0x20]-;; add x0, x4, #0x20-;; str w19, [x0, w2, uxtw]-;; add x0, x4, #0x18-;; mov x1, x20-;; str w1, [x0, w2, uxtw]-;; mov w0, #0-;; add x3, x4, #0x1c-;; stur x4, [sp, #0x18]-;; str w0, [x3, w2, uxtw]-;; mov x3, x2+;; ldr x6, [x0, #8]+;; ldr x6, [x6, #0x20]+;; add x0, x6, w3, uxtw+;; str w7, [x6, w3, uxtw]+;; ldur x1, [sp, #0x10]+;; ldr x7, [x1, #0x28]+;; ldr w7, [x7, #8]+;; add x8, x6, #4+;; str w7, [x8, w3, uxtw]+;; mov x8, #0x20+;; add x9, x6, #8+;; str w8, [x9, w3, uxtw]+;; mov w10, #0x2a+;; str w10, [x0, #0x18]+;; mov x2, x19+;; str w2, [x0, #0x10]+;; mov w12, #0+;; str w12, [x0, #0x14];; ldur x2, [sp, #0x10]-;; bl #0x4a0-;; βββΌ exception frame offset: SP = FP - 0xc0-;; β°ββΌ exception handler: tag=0, context at [SP+0x10], handler=0x100-;; e8: mov w3, #9+;; bl #0x4fc+;; βββΌ exception frame offset: SP = FP - 0xb0+;; β°ββΌ exception handler: tag=0, context at [SP+0x10], handler=0x120+;; 108: mov w3, #9;; ldur x2, [sp, #0x10]-;; bl #0x3fc-;; f4: ldur x2, [sp, #0x10]-;; bl #0x434-;; β°ββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x42, slot at FP-0xc0, locals , stack I32 @ slot+0x8-;; fc: .byte 0x1f, 0xc1, 0x00, 0x00-;; mov w2, w0-;; mov x3, #0x28-;; adds x2, x2, x3-;; cset x3, hs-;; tst w3, #0xff-;; b.ne #0x1a8-;; 118: ldur x1, [sp, #0x20]-;; ldr x3, [x1, #0x28]-;; cmp x2, x3-;; b.hi #0x190-;; 128: ldur x4, [sp, #0x18]-;; add x1, x4, #0x20+;; bl #0x458+;; 114: ldur x2, [sp, #0x10]+;; bl #0x490+;; β°ββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x42, slot at FP-0xb0, locals , stack I32 @ slot+0x8+;; 11c: .byte 0x1f, 0xc1, 0x00, 0x00+;; mov w1, w0+;; mov x2, #0x20+;; adds x1, x1, x2+;; cset x2, hs+;; tst w2, #0xff+;; b.ne #0x204+;; 138: ldur x10, [sp, #0x10]+;; ldr x2, [x10, #8]+;; ldr x3, [x2, #0x28]+;; cmp x1, x3+;; b.hi #0x1ec+;; 14c: ldr x1, [x2, #0x20]+;; add x1, x1, #0x18;; ldr w0, [x1, w0, uxtw];; stur w0, [sp, #8];; ldur x0, [sp, #0x10];; nop-;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x48, slot at FP-0xc0, locals , stack I32 @ slot+0x8-;; β°ββΌ breakpoint patch: wasm PC 0x48, patch bytes [243, 0, 0, 148]+;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x48, slot at FP-0xb0, locals , stack I32 @ slot+0x8+;; β°ββΌ breakpoint patch: wasm PC 0x48, patch bytes [1, 1, 0, 148];; ldur x1, [sp, #0x10];; ldr x0, [x1, #0x38];; ldr x2, [x1, #0x48];; ldur x3, [sp, #0x10];; blr x0-;; β°ββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x4a, slot at FP-0xc0, locals , stack I32 @ slot+0x8-;; 154: ldur x0, [sp, #0x10]+;; β°ββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x4a, slot at FP-0xb0, locals , stack I32 @ slot+0x8+;; 178: ldur x0, [sp, #0x10];; nop-;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x4a, slot at FP-0xc0, locals , stack I32 @ slot+0x8-;; β°ββΌ breakpoint patch: wasm PC 0x4a, patch bytes [236, 0, 0, 148]+;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x4a, slot at FP-0xb0, locals , stack I32 @ slot+0x8+;; β°ββΌ breakpoint patch: wasm PC 0x4a, patch bytes [250, 0, 0, 148];; nop-;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x4b, slot at FP-0xc0, locals , stack-;; β°ββΌ breakpoint patch: wasm PC 0x4b, patch bytes [235, 0, 0, 148]-;; add sp, sp, #0x30+;; βββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x4b, slot at FP-0xb0, locals , stack+;; β°ββΌ breakpoint patch: wasm PC 0x4b, patch bytes [249, 0, 0, 148]+;; add sp, sp, #0x20;; ldp d8, d9, [sp], #0x10;; ldp d10, d11, [sp], #0x10;; ldp d12, d13, [sp], #0x10@@ -136,24 +145,38 @@;; ldp x27, x28, [sp], #0x10;; ldp x29, x30, [sp], #0x10;; ret-;; 190: mov w3, #0xfe-;; 194: ldur x2, [sp, #0x10]-;; 198: bl #0x3fc-;; 19c: ldur x2, [sp, #0x10]-;; 1a0: bl #0x434-;; β°ββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x37, slot at FP-0xc0, locals , stack-;; 1a4: .byte 0x1f, 0xc1, 0x00, 0x00-;; 1a8: mov w3, #0xfe-;; 1ac: ldur x2, [sp, #0x10]-;; 1b0: bl #0x3fc-;; 1b4: ldur x2, [sp, #0x10]-;; 1b8: bl #0x434-;; β°ββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x37, slot at FP-0xc0, locals , stack-;; 1bc: .byte 0x1f, 0xc1, 0x00, 0x00-;; 1c0: stur x2, [sp, #0x10]-;; 1c4: mov w3, #0-;; 1c8: bl #0x3fc+;; 1b4: mov w3, #0x4000000+;; 1b8: ldur x0, [sp, #0x10]+;; 1bc: ldr x4, [x0, #0x28]+;; 1c0: ldr w4, [x4, #8]+;; 1c4: mov w5, #0x20+;; 1c8: mov w6, #0x10;; 1cc: ldur x2, [sp, #0x10]-;; 1d0: bl #0x434-;; β°ββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x34, slot at FP-0xc0, locals , stack-;; 1d4: .byte 0x1f, 0xc1, 0x00, 0x00+;; 1d0: bl #0x3e8+;; 1d4: ldur x0, [sp, #0x10]+;; 1d8: ldr x4, [x0, #8]+;; 1dc: ldr x4, [x4, #0x20]+;; 1e0: add x0, x4, w2, uxtw+;; 1e4: mov x3, x2+;; 1e8: b #0xe8+;; 1ec: mov w3, #0xfe+;; 1f0: ldur x2, [sp, #0x10]+;; 1f4: bl #0x458+;; 1f8: ldur x2, [sp, #0x10]+;; 1fc: bl #0x490+;; β°ββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x37, slot at FP-0xb0, locals , stack+;; 200: .byte 0x1f, 0xc1, 0x00, 0x00+;; 204: mov w3, #0xfe+;; 208: ldur x2, [sp, #0x10]+;; 20c: bl #0x458+;; 210: ldur x2, [sp, #0x10]+;; 214: bl #0x490+;; β°ββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x37, slot at FP-0xb0, locals , stack+;; 218: .byte 0x1f, 0xc1, 0x00, 0x00+;; 21c: stur x2, [sp, #0x10]+;; 220: mov w3, #0+;; 224: bl #0x458+;; 228: ldur x2, [sp, #0x10]+;; 22c: bl #0x490+;; β°ββΌ debug frame state (after previous inst): func key DefinedWasmFunction(StaticModuleIndex(0), DefinedFuncIndex(0)), wasm PC 0x34, slot at FP-0xb0, locals , stack+;; 230: .byte 0x1f, 0xc1, 0x00, 0x00diff --git a/tests/disas/exceptions.wat b/tests/disas/exceptions.watindex d2efc3207c..c44c9bd170 100644--- a/tests/disas/exceptions.wat+++ b/tests/disas/exceptions.wat@@ -23,7 +23,7 @@;; movq 0x18(%r10), %r10;; addq $0x50, %r10;; cmpq %rsp, %r10-;; ja 0x9f+;; ja 0xe7;; 19: subq $0x40, %rsp;; movq %rbx, 0x10(%rsp);; movq %r12, 0x18(%rsp)@@ -33,31 +33,51 @@;; movq %rdi, %rbx;; movq %rcx, %r13;; movq %rdx, %r14-;; callq 0x3a5+;; callq 0x3e5;; movq %rax, %r12+;; movq 0x20(%rbx), %rdx+;; movl (%rdx), %esi+;; movl %esi, %ecx+;; leaq 0x30(%rcx), %rax+;; movl 4(%rdx), %edi+;; cmpq %rdi, %rax+;; ja 0xb3+;; 5f: leal 0x30(%rsi), %eax+;; movl %eax, (%rdx)+;; movq 8(%rbx), %rax+;; movq 0x20(%rax), %rdi+;; leaq (%rdi, %rcx), %rdx+;; movl $0x4000000, (%rdi, %rcx)+;; movq 0x28(%rbx), %rax+;; movl 0xc(%rax), %eax+;; movl %eax, 4(%rdi, %rcx)+;; movl $0x30, %eax+;; movl %eax, 8(%rdi, %rcx)+;; movq %r14, %rdi+;; movl %edi, 0x18(%rdx)+;; movq %r13, %rcx+;; movq %rcx, 0x20(%rdx)+;; movq %r12, %rax+;; movl %eax, 0x10(%rdx)+;; movl $0, 0x14(%rdx)+;; movq %rbx, %rdi+;; movq %rbx, (%rsp)+;; callq 0x412+;; ud2;; movl $0x4000000, %esi;; movq 0x28(%rbx), %rax;; movl 0xc(%rax), %edx;; movl $0x30, %ecx-;; movl $8, %r8d+;; movl $0x10, %r8d;; movq %rbx, %rdi-;; callq 0x342+;; callq 0x382;; movq 8(%rbx), %rcx-;; movq 0x20(%rcx), %rcx;; movl %eax, %edx-;; movq %r14, %rsi-;; movl %esi, 0x20(%rcx, %rdx)-;; movq %r13, %rsi-;; movq %rsi, 0x28(%rcx, %rdx)-;; movq %r12, %rsi-;; movl %esi, 0x18(%rcx, %rdx)-;; movl $0, 0x1c(%rcx, %rdx)+;; addq 0x20(%rcx), %rdx;; movq %rax, %rsi-;; movq %rbx, %rdi-;; movq %rbx, (%rsp)-;; callq 0x3d2-;; ud2-;; ud2+;; movq %r14, %rdi+;; jmp 0x8e+;; e7: ud2;;;; wasm[0]::function[1]::catch:;; pushq %rbp@@ -66,8 +86,8 @@;; movq 0x18(%r10), %r10;; addq $0x50, %r10;; cmpq %rsp, %r10-;; ja 0x155-;; d9: subq $0x40, %rsp+;; ja 0x195+;; 119: subq $0x40, %rsp;; movq %rbx, 0x10(%rsp);; movq %r12, 0x18(%rsp);; movq %r13, 0x20(%rsp)@@ -78,18 +98,18 @@;; movq (%rsp), %rdi;; callq 0;; βββΌ exception frame offset: SP = FP - 0x40-;; β°ββΌ exception handler: tag=0, context at [SP+0x0], handler=0x116+;; β°ββΌ exception handler: tag=0, context at [SP+0x0], handler=0x156;; movl $0x2a, %eax;; movl $0x64, %ecx-;; jmp 0x133-;; 116: movq %rax, %rdx+;; jmp 0x173+;; 156: movq %rax, %rdx;; movq (%rsp), %rsi;; movq 8(%rsi), %rax;; movq 0x20(%rax), %rcx;; movq %rdx, %rax;; movl %eax, %edx-;; movl 0x20(%rcx, %rdx), %eax-;; movq 0x28(%rcx, %rdx), %rcx+;; movl 0x18(%rcx, %rdx), %eax+;; movq 0x20(%rcx, %rdx), %rcx;; movq 0x10(%rsp), %rbx;; movq 0x18(%rsp), %r12;; movq 0x20(%rsp), %r13@@ -99,4 +119,4 @@;; movq %rbp, %rsp;; popq %rbp;; retq-;; 155: ud2+;; 195: ud2diff --git a/tests/disas/gc/array-fill-i8.wat b/tests/disas/gc/array-fill-i8.watindex 2517bedc67..4babe5d5ba 100644--- a/tests/disas/gc/array-fill-i8.wat+++ b/tests/disas/gc/array-fill-i8.wat@@ -27,8 +27,8 @@;; @0027 v7 = load.i64 notrap aligned readonly can_move v43+32;; @0027 v6 = uextend.i64 v2;; @0027 v8 = iadd v7, v6-;; @0027 v9 = iconst.i64 24-;; @0027 v10 = iadd v8, v9 ; v9 = 24+;; @0027 v9 = iconst.i64 16+;; @0027 v10 = iadd v8, v9 ; v9 = 16;; @0027 v11 = load.i32 user2 readonly v10;; @0027 v13 = uextend.i64 v3;; @0027 v14 = uextend.i64 v5@@ -37,8 +37,8 @@;; @0027 v17 = icmp ugt v16, v12;; @0027 trapnz v17, user17;; @0027 v28 = load.i64 notrap aligned v43+40-;; v39 = iconst.i64 28-;; @0027 v21 = iadd v8, v39 ; v39 = 28+;; v39 = iconst.i64 20+;; @0027 v21 = iadd v8, v39 ; v39 = 20;; @0027 v24 = iadd v21, v13;; @0027 v30 = uadd_overflow_trap v24, v14, user2;; @0027 v29 = iadd v7, v28diff --git a/tests/disas/gc/array-init-data.wat b/tests/disas/gc/array-init-data.watindex 491e60e3d8..39ff89c798 100644--- a/tests/disas/gc/array-init-data.wat+++ b/tests/disas/gc/array-init-data.wat@@ -31,8 +31,8 @@;; @002a v7 = load.i64 notrap aligned readonly can_move v57+32;; @002a v6 = uextend.i64 v2;; @002a v8 = iadd v7, v6-;; @002a v9 = iconst.i64 24-;; @002a v10 = iadd v8, v9 ; v9 = 24+;; @002a v9 = iconst.i64 16+;; @002a v10 = iadd v8, v9 ; v9 = 16;; @002a v11 = load.i32 user2 readonly v10;; @002a v13 = uextend.i64 v3;; @002a v14 = uextend.i64 v5@@ -47,8 +47,8 @@;; @002a trapnz v31, heap_oob;; @002a v33 = load.i64 notrap aligned v0+48;; @002a v40 = load.i64 notrap aligned v57+40-;; v53 = iconst.i64 28-;; @002a v21 = iadd v8, v53 ; v53 = 28+;; v53 = iconst.i64 20+;; @002a v21 = iadd v8, v53 ; v53 = 20;; @002a v24 = iadd v21, v13;; @002a v42 = uadd_overflow_trap v24, v14, user2;; @002a v41 = iadd v7, v40diff --git a/tests/disas/gc/array-new-data.wat b/tests/disas/gc/array-new-data.watindex 7e79552e8b..1510d4bc65 100644--- a/tests/disas/gc/array-new-data.wat+++ b/tests/disas/gc/array-new-data.wat@@ -98,50 +98,89 @@;; @0025 v11 = icmp ugt v10, v6;; @0025 trapnz v11, heap_oob;; @0025 v13 = load.i64 notrap aligned v0+48-;; v101 = iconst.i64 32-;; @0025 v19 = ushr v8, v101 ; v101 = 32+;; v124 = iconst.i64 32+;; @0025 v19 = ushr v8, v124 ; v124 = 32;; @0025 trapnz v19, user18-;; @0025 v16 = iconst.i32 28-;; @0025 v21 = uadd_overflow_trap v16, v3, user18 ; v16 = 28-;; @0025 v23 = iconst.i32 -1476395008-;; @0025 v25 = load.i64 notrap aligned readonly can_move v0+40-;; @0025 v26 = load.i32 notrap aligned readonly can_move v25-;; @0025 v27 = iconst.i32 8-;; @0025 v28 = call fn0(v0, v23, v26, v21, v27) ; v23 = -1476395008, v27 = 8-;; v100 = stack_addr.i64 ss0-;; store notrap v28, v100-;; @0025 v98 = load.i64 notrap aligned readonly can_move v0+8-;; @0025 v29 = load.i64 notrap aligned readonly can_move v98+32-;; @0025 v30 = uextend.i64 v28-;; @0025 v31 = iadd v29, v30-;; v96 = iconst.i64 24-;; @0025 v32 = iadd v31, v96 ; v96 = 24-;; @0025 store user2 v3, v32-;; v76 = load.i32 notrap v100-;; @0025 trapz v76, user16-;; @0025 v34 = uextend.i64 v76-;; @0025 v36 = iadd v29, v34-;; @0025 v38 = iadd v36, v96 ; v96 = 24-;; @0025 v39 = load.i32 user2 readonly v38-;; @0025 v40 = uextend.i64 v39-;; @0025 v45 = icmp ugt v8, v40-;; @0025 trapnz v45, user17-;; @0025 v54 = uload32 notrap aligned v0+56-;; @0025 v59 = icmp ugt v10, v54-;; @0025 trapnz v59, heap_oob-;; @0025 v61 = load.i64 notrap aligned v0+48-;; @0025 v68 = load.i64 notrap aligned v98+40-;; v87 = iconst.i64 28-;; @0025 v49 = iadd v36, v87 ; v87 = 28-;; @0025 v70 = uadd_overflow_trap v49, v8, user2-;; @0025 v69 = iadd v29, v68-;; @0025 v71 = icmp ugt v70, v69-;; @0025 trapnz v71, user2-;; @0025 v63 = iadd v61, v7-;; @0025 call fn1(v0, v49, v63, v8), stack_map=[i32 @ ss0+0]-;; v73 = load.i32 notrap v100+;; @0025 v16 = iconst.i32 20+;; @0025 v21 = uadd_overflow_trap v16, v3, user18 ; v16 = 20+;; @0025 v23 = load.i64 notrap aligned readonly can_move v0+32+;; @0025 v24 = load.i32 notrap aligned v23+;; @0025 v25 = load.i32 notrap aligned v23+4+;; @0025 v31 = uextend.i64 v24+;; @0025 v26 = uextend.i64 v21+;; @0025 v27 = iconst.i64 15+;; @0025 v29 = iadd v26, v27 ; v27 = 15+;; @0025 v28 = iconst.i64 -16+;; @0025 v30 = band v29, v28 ; v28 = -16+;; @0025 v32 = iadd v31, v30+;; @0025 v33 = uextend.i64 v25+;; @0025 v34 = icmp ule v32, v33+;; @0025 brif v34, block2, block3+;;+;; block2:+;; v134 = iconst.i32 15+;; v135 = iadd.i32 v21, v134 ; v134 = 15+;; v138 = iconst.i32 -16+;; v139 = band v135, v138 ; v138 = -16+;; v141 = iadd.i32 v24, v139+;; @0025 store notrap aligned vmctx v141, v23+;; v155 = iconst.i32 -1476395008+;; v156 = load.i64 notrap aligned readonly can_move v0+8+;; v157 = load.i64 notrap aligned readonly can_move v156+32+;; @0025 v48 = iadd v157, v31+;; @0025 store notrap aligned v155, v48 ; v155 = -1476395008+;; v158 = load.i64 notrap aligned readonly can_move v0+40+;; v159 = load.i32 notrap aligned readonly can_move v158+;; @0025 store notrap aligned v159, v48+4+;; v160 = band.i64 v29, v28 ; v28 = -16+;; @0025 istore32 notrap aligned v160, v48+8+;; @0025 jump block4(v24, v48)+;;+;; block3 cold:+;; @0025 v36 = iconst.i32 -1476395008+;; @0025 v38 = load.i64 notrap aligned readonly can_move v0+40+;; @0025 v39 = load.i32 notrap aligned readonly can_move v38+;; @0025 v40 = iconst.i32 16+;; @0025 v41 = call fn0(v0, v36, v39, v21, v40) ; v36 = -1476395008, v40 = 16+;; @0025 v120 = load.i64 notrap aligned readonly can_move v0+8+;; @0025 v42 = load.i64 notrap aligned readonly can_move v120+32+;; @0025 v43 = uextend.i64 v41+;; @0025 v44 = iadd v42, v43+;; @0025 jump block4(v41, v44)+;;+;; block4(v53: i32, v54: i64):+;; v119 = stack_addr.i64 ss0+;; store notrap v53, v119+;; v118 = iconst.i64 16+;; @0025 v55 = iadd v54, v118 ; v118 = 16+;; @0025 store.i32 user2 v3, v55+;; v99 = load.i32 notrap v119+;; @0025 trapz v99, user16+;; v161 = load.i64 notrap aligned readonly can_move v0+8+;; v162 = load.i64 notrap aligned readonly can_move v161+32+;; @0025 v57 = uextend.i64 v99+;; @0025 v59 = iadd v162, v57+;; @0025 v61 = iadd v59, v118 ; v118 = 16+;; @0025 v62 = load.i32 user2 readonly v61+;; @0025 v63 = uextend.i64 v62+;; @0025 v68 = icmp.i64 ugt v8, v63+;; @0025 trapnz v68, user17+;; @0025 v77 = uload32.i64 notrap aligned v0+56+;; @0025 v82 = icmp.i64 ugt v10, v77+;; @0025 trapnz v82, heap_oob+;; @0025 v84 = load.i64 notrap aligned v0+48+;; @0025 v91 = load.i64 notrap aligned v161+40+;; v109 = iconst.i64 20+;; @0025 v72 = iadd v59, v109 ; v109 = 20+;; @0025 v93 = uadd_overflow_trap v72, v8, user2+;; @0025 v92 = iadd v162, v91+;; @0025 v94 = icmp ugt v93, v92+;; @0025 trapnz v94, user2+;; @0025 v86 = iadd v84, v7+;; @0025 call fn1(v0, v72, v86, v8), stack_map=[i32 @ ss0+0]+;; v96 = load.i32 notrap v119;; @0029 jump block1;;;; block1:-;; @0029 return v73+;; @0029 return v96;; }diff --git a/tests/disas/gc/array-new-default-anyref.wat b/tests/disas/gc/array-new-default-anyref.watindex be2b4c7285..ed9f4af67d 100644--- a/tests/disas/gc/array-new-default-anyref.wat+++ b/tests/disas/gc/array-new-default-anyref.wat@@ -26,50 +26,89 @@;;;; block0(v0: i64, v1: i64, v2: i32):;; @001f v5 = uextend.i64 v2-;; v79 = iconst.i64 2-;; v80 = ishl v5, v79 ; v79 = 2-;; v77 = iconst.i64 32-;; @001f v7 = ushr v80, v77 ; v77 = 32+;; v102 = iconst.i64 2+;; v103 = ishl v5, v102 ; v102 = 2+;; v100 = iconst.i64 32+;; @001f v7 = ushr v103, v100 ; v100 = 32;; @001f trapnz v7, user18-;; @001f v4 = iconst.i32 28-;; v86 = iconst.i32 2-;; v87 = ishl v2, v86 ; v86 = 2-;; @001f v9 = uadd_overflow_trap v4, v87, user18 ; v4 = 28-;; @001f v11 = iconst.i32 -1476395008-;; @001f v13 = load.i64 notrap aligned readonly can_move v0+40-;; @001f v14 = load.i32 notrap aligned readonly can_move v13-;; @001f v15 = iconst.i32 8-;; @001f v16 = call fn0(v0, v11, v14, v9, v15) ; v11 = -1476395008, v15 = 8-;; v76 = stack_addr.i64 ss0-;; store notrap v16, v76-;; @001f v74 = load.i64 notrap aligned readonly can_move v0+8-;; @001f v17 = load.i64 notrap aligned readonly can_move v74+32-;; @001f v18 = uextend.i64 v16-;; @001f v19 = iadd v17, v18-;; v72 = iconst.i64 24-;; @001f v20 = iadd v19, v72 ; v72 = 24-;; @001f store user2 v2, v20-;; v54 = load.i32 notrap v76-;; @001f trapz v54, user16-;; @001f v23 = uextend.i64 v54-;; @001f v25 = iadd v17, v23-;; @001f v27 = iadd v25, v72 ; v72 = 24-;; @001f v28 = load.i32 user2 readonly v27-;; @001f v29 = uextend.i64 v28-;; @001f v34 = icmp ugt v5, v29-;; @001f trapnz v34, user17-;; @001f v45 = load.i64 notrap aligned v74+40-;; v63 = iconst.i64 28-;; @001f v38 = iadd v25, v63 ; v63 = 28-;; @001f v47 = uadd_overflow_trap v38, v80, user2-;; @001f v46 = iadd v17, v45-;; @001f v48 = icmp ugt v47, v46-;; @001f trapnz v48, user2-;; @001f v21 = iconst.i32 0-;; @001f call fn1(v0, v38, v21, v80), stack_map=[i32 @ ss0+0] ; v21 = 0-;; v51 = load.i32 notrap v76+;; @001f v4 = iconst.i32 20+;; v109 = iconst.i32 2+;; v110 = ishl v2, v109 ; v109 = 2+;; @001f v9 = uadd_overflow_trap v4, v110, user18 ; v4 = 20+;; @001f v11 = load.i64 notrap aligned readonly can_move v0+32+;; @001f v12 = load.i32 notrap aligned v11+;; @001f v13 = load.i32 notrap aligned v11+4+;; @001f v19 = uextend.i64 v12+;; @001f v14 = uextend.i64 v9+;; @001f v15 = iconst.i64 15+;; @001f v17 = iadd v14, v15 ; v15 = 15+;; @001f v16 = iconst.i64 -16+;; @001f v18 = band v17, v16 ; v16 = -16+;; @001f v20 = iadd v19, v18+;; @001f v21 = uextend.i64 v13+;; @001f v22 = icmp ule v20, v21+;; @001f brif v22, block2, block3+;;+;; block2:+;; v118 = iconst.i32 15+;; v119 = iadd.i32 v9, v118 ; v118 = 15+;; v122 = iconst.i32 -16+;; v123 = band v119, v122 ; v122 = -16+;; v125 = iadd.i32 v12, v123+;; @001f store notrap aligned vmctx v125, v11+;; v141 = iconst.i32 -1476395008+;; v142 = load.i64 notrap aligned readonly can_move v0+8+;; v143 = load.i64 notrap aligned readonly can_move v142+32+;; @001f v36 = iadd v143, v19+;; @001f store notrap aligned v141, v36 ; v141 = -1476395008+;; v144 = load.i64 notrap aligned readonly can_move v0+40+;; v145 = load.i32 notrap aligned readonly can_move v144+;; @001f store notrap aligned v145, v36+4+;; v146 = band.i64 v17, v16 ; v16 = -16+;; @001f istore32 notrap aligned v146, v36+8+;; @001f jump block4(v12, v36)+;;+;; block3 cold:+;; @001f v24 = iconst.i32 -1476395008+;; @001f v26 = load.i64 notrap aligned readonly can_move v0+40+;; @001f v27 = load.i32 notrap aligned readonly can_move v26+;; @001f v28 = iconst.i32 16+;; @001f v29 = call fn0(v0, v24, v27, v9, v28) ; v24 = -1476395008, v28 = 16+;; @001f v96 = load.i64 notrap aligned readonly can_move v0+8+;; @001f v30 = load.i64 notrap aligned readonly can_move v96+32+;; @001f v31 = uextend.i64 v29+;; @001f v32 = iadd v30, v31+;; @001f jump block4(v29, v32)+;;+;; block4(v41: i32, v42: i64):+;; v95 = stack_addr.i64 ss0+;; store notrap v41, v95+;; v94 = iconst.i64 16+;; @001f v43 = iadd v42, v94 ; v94 = 16+;; @001f store.i32 user2 v2, v43+;; v77 = load.i32 notrap v95+;; @001f trapz v77, user16+;; v147 = load.i64 notrap aligned readonly can_move v0+8+;; v148 = load.i64 notrap aligned readonly can_move v147+32+;; @001f v46 = uextend.i64 v77+;; @001f v48 = iadd v148, v46+;; @001f v50 = iadd v48, v94 ; v94 = 16+;; @001f v51 = load.i32 user2 readonly v50+;; @001f v52 = uextend.i64 v51+;; @001f v57 = icmp.i64 ugt v5, v52+;; @001f trapnz v57, user17+;; @001f v68 = load.i64 notrap aligned v147+40+;; v85 = iconst.i64 20+;; @001f v61 = iadd v48, v85 ; v85 = 20+;; @001f v70 = uadd_overflow_trap v61, v103, user2+;; @001f v69 = iadd v148, v68+;; @001f v71 = icmp ugt v70, v69+;; @001f trapnz v71, user2+;; @001f v44 = iconst.i32 0+;; @001f call fn1(v0, v61, v44, v103), stack_map=[i32 @ ss0+0] ; v44 = 0+;; v74 = load.i32 notrap v95;; @0022 jump block1;;;; block1:-;; @0022 return v51+;; @0022 return v74;; }diff --git a/tests/disas/gc/array-new-default-exnref.wat b/tests/disas/gc/array-new-default-exnref.watindex d040b91766..4620f5cbdd 100644--- a/tests/disas/gc/array-new-default-exnref.wat+++ b/tests/disas/gc/array-new-default-exnref.wat@@ -26,50 +26,89 @@;;;; block0(v0: i64, v1: i64, v2: i32):;; @001f v5 = uextend.i64 v2-;; v79 = iconst.i64 2-;; v80 = ishl v5, v79 ; v79 = 2-;; v77 = iconst.i64 32-;; @001f v7 = ushr v80, v77 ; v77 = 32+;; v102 = iconst.i64 2+;; v103 = ishl v5, v102 ; v102 = 2+;; v100 = iconst.i64 32+;; @001f v7 = ushr v103, v100 ; v100 = 32;; @001f trapnz v7, user18-;; @001f v4 = iconst.i32 28-;; v86 = iconst.i32 2-;; v87 = ishl v2, v86 ; v86 = 2-;; @001f v9 = uadd_overflow_trap v4, v87, user18 ; v4 = 28-;; @001f v11 = iconst.i32 -1476395008-;; @001f v13 = load.i64 notrap aligned readonly can_move v0+40-;; @001f v14 = load.i32 notrap aligned readonly can_move v13-;; @001f v15 = iconst.i32 8-;; @001f v16 = call fn0(v0, v11, v14, v9, v15) ; v11 = -1476395008, v15 = 8-;; v76 = stack_addr.i64 ss0-;; store notrap v16, v76-;; @001f v74 = load.i64 notrap aligned readonly can_move v0+8-;; @001f v17 = load.i64 notrap aligned readonly can_move v74+32-;; @001f v18 = uextend.i64 v16-;; @001f v19 = iadd v17, v18-;; v72 = iconst.i64 24-;; @001f v20 = iadd v19, v72 ; v72 = 24-;; @001f store user2 v2, v20-;; v54 = load.i32 notrap v76-;; @001f trapz v54, user16-;; @001f v23 = uextend.i64 v54-;; @001f v25 = iadd v17, v23-;; @001f v27 = iadd v25, v72 ; v72 = 24-;; @001f v28 = load.i32 user2 readonly v27-;; @001f v29 = uextend.i64 v28-;; @001f v34 = icmp ugt v5, v29-;; @001f trapnz v34, user17-;; @001f v45 = load.i64 notrap aligned v74+40-;; v63 = iconst.i64 28-;; @001f v38 = iadd v25, v63 ; v63 = 28-;; @001f v47 = uadd_overflow_trap v38, v80, user2-;; @001f v46 = iadd v17, v45-;; @001f v48 = icmp ugt v47, v46-;; @001f trapnz v48, user2-;; @001f v21 = iconst.i32 0-;; @001f call fn1(v0, v38, v21, v80), stack_map=[i32 @ ss0+0] ; v21 = 0-;; v51 = load.i32 notrap v76+;; @001f v4 = iconst.i32 20+;; v109 = iconst.i32 2+;; v110 = ishl v2, v109 ; v109 = 2+;; @001f v9 = uadd_overflow_trap v4, v110, user18 ; v4 = 20+;; @001f v11 = load.i64 notrap aligned readonly can_move v0+32+;; @001f v12 = load.i32 notrap aligned v11+;; @001f v13 = load.i32 notrap aligned v11+4+;; @001f v19 = uextend.i64 v12+;; @001f v14 = uextend.i64 v9+;; @001f v15 = iconst.i64 15+;; @001f v17 = iadd v14, v15 ; v15 = 15+;; @001f v16 = iconst.i64 -16+;; @001f v18 = band v17, v16 ; v16 = -16+;; @001f v20 = iadd v19, v18+;; @001f v21 = uextend.i64 v13+;; @001f v22 = icmp ule v20, v21+;; @001f brif v22, block2, block3+;;+;; block2:+;; v118 = iconst.i32 15+;; v119 = iadd.i32 v9, v118 ; v118 = 15+;; v122 = iconst.i32 -16+;; v123 = band v119, v122 ; v122 = -16+;; v125 = iadd.i32 v12, v123+;; @001f store notrap aligned vmctx v125, v11+;; v141 = iconst.i32 -1476395008+;; v142 = load.i64 notrap aligned readonly can_move v0+8+;; v143 = load.i64 notrap aligned readonly can_move v142+32+;; @001f v36 = iadd v143, v19+;; @001f store notrap aligned v141, v36 ; v141 = -1476395008+;; v144 = load.i64 notrap aligned readonly can_move v0+40+;; v145 = load.i32 notrap aligned readonly can_move v144+;; @001f store notrap aligned v145, v36+4+;; v146 = band.i64 v17, v16 ; v16 = -16+;; @001f istore32 notrap aligned v146, v36+8+;; @001f jump block4(v12, v36)+;;+;; block3 cold:+;; @001f v24 = iconst.i32 -1476395008+;; @001f v26 = load.i64 notrap aligned readonly can_move v0+40+;; @001f v27 = load.i32 notrap aligned readonly can_move v26+;; @001f v28 = iconst.i32 16+;; @001f v29 = call fn0(v0, v24, v27, v9, v28) ; v24 = -1476395008, v28 = 16+;; @001f v96 = load.i64 notrap aligned readonly can_move v0+8+;; @001f v30 = load.i64 notrap aligned readonly can_move v96+32+;; @001f v31 = uextend.i64 v29+;; @001f v32 = iadd v30, v31+;; @001f jump block4(v29, v32)+;;+;; block4(v41: i32, v42: i64):+;; v95 = stack_addr.i64 ss0+;; store notrap v41, v95+;; v94 = iconst.i64 16+;; @001f v43 = iadd v42, v94 ; v94 = 16+;; @001f store.i32 user2 v2, v43+;; v77 = load.i32 notrap v95+;; @001f trapz v77, user16+;; v147 = load.i64 notrap aligned readonly can_move v0+8+;; v148 = load.i64 notrap aligned readonly can_move v147+32+;; @001f v46 = uextend.i64 v77+;; @001f v48 = iadd v148, v46+;; @001f v50 = iadd v48, v94 ; v94 = 16+;; @001f v51 = load.i32 user2 readonly v50+;; @001f v52 = uextend.i64 v51+;; @001f v57 = icmp.i64 ugt v5, v52+;; @001f trapnz v57, user17+;; @001f v68 = load.i64 notrap aligned v147+40+;; v85 = iconst.i64 20+;; @001f v61 = iadd v48, v85 ; v85 = 20+;; @001f v70 = uadd_overflow_trap v61, v103, user2+;; @001f v69 = iadd v148, v68+;; @001f v71 = icmp ugt v70, v69+;; @001f trapnz v71, user2+;; @001f v44 = iconst.i32 0+;; @001f call fn1(v0, v61, v44, v103), stack_map=[i32 @ ss0+0] ; v44 = 0+;; v74 = load.i32 notrap v95;; @0022 jump block1;;;; block1:-;; @0022 return v51+;; @0022 return v74;; }diff --git a/tests/disas/gc/array-new-default-externref.wat b/tests/disas/gc/array-new-default-externref.watindex e16f848b71..3935b8e8e1 100644--- a/tests/disas/gc/array-new-default-externref.wat+++ b/tests/disas/gc/array-new-default-externref.wat@@ -26,50 +26,89 @@;;;; block0(v0: i64, v1: i64, v2: i32):;; @001f v5 = uextend.i64 v2-;; v79 = iconst.i64 2-;; v80 = ishl v5, v79 ; v79 = 2-;; v77 = iconst.i64 32-;; @001f v7 = ushr v80, v77 ; v77 = 32+;; v102 = iconst.i64 2+;; v103 = ishl v5, v102 ; v102 = 2+;; v100 = iconst.i64 32+;; @001f v7 = ushr v103, v100 ; v100 = 32;; @001f trapnz v7, user18-;; @001f v4 = iconst.i32 28-;; v86 = iconst.i32 2-;; v87 = ishl v2, v86 ; v86 = 2-;; @001f v9 = uadd_overflow_trap v4, v87, user18 ; v4 = 28-;; @001f v11 = iconst.i32 -1476395008-;; @001f v13 = load.i64 notrap aligned readonly can_move v0+40-;; @001f v14 = load.i32 notrap aligned readonly can_move v13-;; @001f v15 = iconst.i32 8-;; @001f v16 = call fn0(v0, v11, v14, v9, v15) ; v11 = -1476395008, v15 = 8-;; v76 = stack_addr.i64 ss0-;; store notrap v16, v76-;; @001f v74 = load.i64 notrap aligned readonly can_move v0+8-;; @001f v17 = load.i64 notrap aligned readonly can_move v74+32-;; @001f v18 = uextend.i64 v16-;; @001f v19 = iadd v17, v18-;; v72 = iconst.i64 24-;; @001f v20 = iadd v19, v72 ; v72 = 24-;; @001f store user2 v2, v20-;; v54 = load.i32 notrap v76-;; @001f trapz v54, user16-;; @001f v23 = uextend.i64 v54-;; @001f v25 = iadd v17, v23-;; @001f v27 = iadd v25, v72 ; v72 = 24-;; @001f v28 = load.i32 user2 readonly v27-;; @001f v29 = uextend.i64 v28-;; @001f v34 = icmp ugt v5, v29-;; @001f trapnz v34, user17-;; @001f v45 = load.i64 notrap aligned v74+40-;; v63 = iconst.i64 28-;; @001f v38 = iadd v25, v63 ; v63 = 28-;; @001f v47 = uadd_overflow_trap v38, v80, user2-;; @001f v46 = iadd v17, v45-;; @001f v48 = icmp ugt v47, v46-;; @001f trapnz v48, user2-;; @001f v21 = iconst.i32 0-;; @001f call fn1(v0, v38, v21, v80), stack_map=[i32 @ ss0+0] ; v21 = 0-;; v51 = load.i32 notrap v76+;; @001f v4 = iconst.i32 20+;; v109 = iconst.i32 2+;; v110 = ishl v2, v109 ; v109 = 2+;; @001f v9 = uadd_overflow_trap v4, v110, user18 ; v4 = 20+;; @001f v11 = load.i64 notrap aligned readonly can_move v0+32+;; @001f v12 = load.i32 notrap aligned v11+;; @001f v13 = load.i32 notrap aligned v11+4+;; @001f v19 = uextend.i64 v12+;; @001f v14 = uextend.i64 v9+;; @001f v15 = iconst.i64 15+;; @001f v17 = iadd v14, v15 ; v15 = 15+;; @001f v16 = iconst.i64 -16+;; @001f v18 = band v17, v16 ; v16 = -16+;; @001f v20 = iadd v19, v18+;; @001f v21 = uextend.i64 v13+;; @001f v22 = icmp ule v20, v21+;; @001f brif v22, block2, block3+;;+;; block2:+;; v118 = iconst.i32 15+;; v119 = iadd.i32 v9, v118 ; v118 = 15+;; v122 = iconst.i32 -16+;; v123 = band v119, v122 ; v122 = -16+;; v125 = iadd.i32 v12, v123+;; @001f store notrap aligned vmctx v125, v11+;; v141 = iconst.i32 -1476395008+;; v142 = load.i64 notrap aligned readonly can_move v0+8+;; v143 = load.i64 notrap aligned readonly can_move v142+32+;; @001f v36 = iadd v143, v19+;; @001f store notrap aligned v141, v36 ; v141 = -1476395008+;; v144 = load.i64 notrap aligned readonly can_move v0+40+;; v145 = load.i32 notrap aligned readonly can_move v144+;; @001f store notrap aligned v145, v36+4+;; v146 = band.i64 v17, v16 ; v16 = -16+;; @001f istore32 notrap aligned v146, v36+8+;; @001f jump block4(v12, v36)+;;+;; block3 cold:+;; @001f v24 = iconst.i32 -1476395008+;; @001f v26 = load.i64 notrap aligned readonly can_move v0+40+;; @001f v27 = load.i32 notrap aligned readonly can_move v26+;; @001f v28 = iconst.i32 16+;; @001f v29 = call fn0(v0, v24, v27, v9, v28) ; v24 = -1476395008, v28 = 16+;; @001f v96 = load.i64 notrap aligned readonly can_move v0+8+;; @001f v30 = load.i64 notrap aligned readonly can_move v96+32+;; @001f v31 = uextend.i64 v29+;; @001f v32 = iadd v30, v31+;; @001f jump block4(v29, v32)+;;+;; block4(v41: i32, v42: i64):+;; v95 = stack_addr.i64 ss0+;; store notrap v41, v95+;; v94 = iconst.i64 16+;; @001f v43 = iadd v42, v94 ; v94 = 16+;; @001f store.i32 user2 v2, v43+;; v77 = load.i32 notrap v95+;; @001f trapz v77, user16+;; v147 = load.i64 notrap aligned readonly can_move v0+8+;; v148 = load.i64 notrap aligned readonly can_move v147+32+;; @001f v46 = uextend.i64 v77+;; @001f v48 = iadd v148, v46+;; @001f v50 = iadd v48, v94 ; v94 = 16+;; @001f v51 = load.i32 user2 readonly v50+;; @001f v52 = uextend.i64 v51+;; @001f v57 = icmp.i64 ugt v5, v52+;; @001f trapnz v57, user17+;; @001f v68 = load.i64 notrap aligned v147+40+;; v85 = iconst.i64 20+;; @001f v61 = iadd v48, v85 ; v85 = 20+;; @001f v70 = uadd_overflow_trap v61, v103, user2+;; @001f v69 = iadd v148, v68+;; @001f v71 = icmp ugt v70, v69+;; @001f trapnz v71, user2+;; @001f v44 = iconst.i32 0+;; @001f call fn1(v0, v61, v44, v103), stack_map=[i32 @ ss0+0] ; v44 = 0+;; v74 = load.i32 notrap v95;; @0022 jump block1;;;; block1:-;; @0022 return v51+;; @0022 return v74;; }diff --git a/tests/disas/gc/array-new-default-f32.wat b/tests/disas/gc/array-new-default-f32.watindex 53f34f14af..16aba4f51c 100644--- a/tests/disas/gc/array-new-default-f32.wat+++ b/tests/disas/gc/array-new-default-f32.wat@@ -26,50 +26,89 @@;;;; block0(v0: i64, v1: i64, v2: i32):;; @001f v5 = uextend.i64 v2-;; v79 = iconst.i64 2-;; v80 = ishl v5, v79 ; v79 = 2-;; v77 = iconst.i64 32-;; @001f v7 = ushr v80, v77 ; v77 = 32+;; v102 = iconst.i64 2+;; v103 = ishl v5, v102 ; v102 = 2+;; v100 = iconst.i64 32+;; @001f v7 = ushr v103, v100 ; v100 = 32;; @001f trapnz v7, user18-;; @001f v4 = iconst.i32 28-;; v86 = iconst.i32 2-;; v87 = ishl v2, v86 ; v86 = 2-;; @001f v9 = uadd_overflow_trap v4, v87, user18 ; v4 = 28-;; @001f v11 = iconst.i32 -1476395008-;; @001f v13 = load.i64 notrap aligned readonly can_move v0+40-;; @001f v14 = load.i32 notrap aligned readonly can_move v13-;; @001f v15 = iconst.i32 8-;; @001f v16 = call fn0(v0, v11, v14, v9, v15) ; v11 = -1476395008, v15 = 8-;; v76 = stack_addr.i64 ss0-;; store notrap v16, v76-;; @001f v74 = load.i64 notrap aligned readonly can_move v0+8-;; @001f v17 = load.i64 notrap aligned readonly can_move v74+32-;; @001f v18 = uextend.i64 v16-;; @001f v19 = iadd v17, v18-;; v72 = iconst.i64 24-;; @001f v20 = iadd v19, v72 ; v72 = 24-;; @001f store user2 v2, v20-;; v54 = load.i32 notrap v76-;; @001f trapz v54, user16-;; @001f v23 = uextend.i64 v54-;; @001f v25 = iadd v17, v23-;; @001f v27 = iadd v25, v72 ; v72 = 24-;; @001f v28 = load.i32 user2 readonly v27-;; @001f v29 = uextend.i64 v28-;; @001f v34 = icmp ugt v5, v29-;; @001f trapnz v34, user17-;; @001f v45 = load.i64 notrap aligned v74+40-;; v63 = iconst.i64 28-;; @001f v38 = iadd v25, v63 ; v63 = 28-;; @001f v47 = uadd_overflow_trap v38, v80, user2-;; @001f v46 = iadd v17, v45-;; @001f v48 = icmp ugt v47, v46-;; @001f trapnz v48, user2-;; @001f v22 = iconst.i32 0-;; @001f call fn1(v0, v38, v22, v80), stack_map=[i32 @ ss0+0] ; v22 = 0-;; v51 = load.i32 notrap v76+;; @001f v4 = iconst.i32 20+;; v109 = iconst.i32 2+;; v110 = ishl v2, v109 ; v109 = 2+;; @001f v9 = uadd_overflow_trap v4, v110, user18 ; v4 = 20+;; @001f v11 = load.i64 notrap aligned readonly can_move v0+32+;; @001f v12 = load.i32 notrap aligned v11+;; @001f v13 = load.i32 notrap aligned v11+4+;; @001f v19 = uextend.i64 v12+;; @001f v14 = uextend.i64 v9+;; @001f v15 = iconst.i64 15+;; @001f v17 = iadd v14, v15 ; v15 = 15+;; @001f v16 = iconst.i64 -16+;; @001f v18 = band v17, v16 ; v16 = -16+;; @001f v20 = iadd v19, v18+;; @001f v21 = uextend.i64 v13+;; @001f v22 = icmp ule v20, v21+;; @001f brif v22, block2, block3+;;+;; block2:+;; v118 = iconst.i32 15+;; v119 = iadd.i32 v9, v118 ; v118 = 15+;; v122 = iconst.i32 -16+;; v123 = band v119, v122 ; v122 = -16+;; v125 = iadd.i32 v12, v123+;; @001f store notrap aligned vmctx v125, v11+;; v141 = iconst.i32 -1476395008+;; v142 = load.i64 notrap aligned readonly can_move v0+8+;; v143 = load.i64 notrap aligned readonly can_move v142+32+;; @001f v36 = iadd v143, v19+;; @001f store notrap aligned v141, v36 ; v141 = -1476395008+;; v144 = load.i64 notrap aligned readonly can_move v0+40+;; v145 = load.i32 notrap aligned readonly can_move v144+;; @001f store notrap aligned v145, v36+4+;; v146 = band.i64 v17, v16 ; v16 = -16+;; @001f istore32 notrap aligned v146, v36+8+;; @001f jump block4(v12, v36)+;;+;; block3 cold:+;; @001f v24 = iconst.i32 -1476395008+;; @001f v26 = load.i64 notrap aligned readonly can_move v0+40+;; @001f v27 = load.i32 notrap aligned readonly can_move v26+;; @001f v28 = iconst.i32 16+;; @001f v29 = call fn0(v0, v24, v27, v9, v28) ; v24 = -1476395008, v28 = 16+;; @001f v96 = load.i64 notrap aligned readonly can_move v0+8+;; @001f v30 = load.i64 notrap aligned readonly can_move v96+32+;; @001f v31 = uextend.i64 v29+;; @001f v32 = iadd v30, v31+;; @001f jump block4(v29, v32)+;;+;; block4(v41: i32, v42: i64):+;; v95 = stack_addr.i64 ss0+;; store notrap v41, v95+;; v94 = iconst.i64 16+;; @001f v43 = iadd v42, v94 ; v94 = 16+;; @001f store.i32 user2 v2, v43+;; v77 = load.i32 notrap v95+;; @001f trapz v77, user16+;; v147 = load.i64 notrap aligned readonly can_move v0+8+;; v148 = load.i64 notrap aligned readonly can_move v147+32+;; @001f v46 = uextend.i64 v77+;; @001f v48 = iadd v148, v46+;; @001f v50 = iadd v48, v94 ; v94 = 16+;; @001f v51 = load.i32 user2 readonly v50+;; @001f v52 = uextend.i64 v51+;; @001f v57 = icmp.i64 ugt v5, v52+;; @001f trapnz v57, user17+;; @001f v68 = load.i64 notrap aligned v147+40+;; v85 = iconst.i64 20+;; @001f v61 = iadd v48, v85 ; v85 = 20+;; @001f v70 = uadd_overflow_trap v61, v103, user2+;; @001f v69 = iadd v148, v68+;; @001f v71 = icmp ugt v70, v69+;; @001f trapnz v71, user2+;; @001f v45 = iconst.i32 0+;; @001f call fn1(v0, v61, v45, v103), stack_map=[i32 @ ss0+0] ; v45 = 0+;; v74 = load.i32 notrap v95;; @0022 jump block1;;;; block1:-;; @0022 return v51+;; @0022 return v74;; }diff --git a/tests/disas/gc/array-new-default-f64.wat b/tests/disas/gc/array-new-default-f64.watindex 740234fee5..3cb145a2c0 100644--- a/tests/disas/gc/array-new-default-f64.wat+++ b/tests/disas/gc/array-new-default-f64.wat@@ -26,49 +26,89 @@;;;; block0(v0: i64, v1: i64, v2: i32):;; @001f v5 = uextend.i64 v2-;; v79 = iconst.i64 3-;; v80 = ishl v5, v79 ; v79 = 3-;; v77 = iconst.i64 32-;; @001f v7 = ushr v80, v77 ; v77 = 32+;; v102 = iconst.i64 3+;; v103 = ishl v5, v102 ; v102 = 3+;; v100 = iconst.i64 32+;; @001f v7 = ushr v103, v100 ; v100 = 32;; @001f trapnz v7, user18-;; @001f v4 = iconst.i32 32-;; v86 = iconst.i32 3-;; v87 = ishl v2, v86 ; v86 = 3-;; @001f v9 = uadd_overflow_trap v4, v87, user18 ; v4 = 32-;; @001f v11 = iconst.i32 -1476395008-;; @001f v13 = load.i64 notrap aligned readonly can_move v0+40-;; @001f v14 = load.i32 notrap aligned readonly can_move v13-;; v84 = iconst.i32 8-;; @001f v16 = call fn0(v0, v11, v14, v9, v84) ; v11 = -1476395008, v84 = 8-;; v76 = stack_addr.i64 ss0-;; store notrap v16, v76-;; @001f v74 = load.i64 notrap aligned readonly can_move v0+8-;; @001f v17 = load.i64 notrap aligned readonly can_move v74+32-;; @001f v18 = uextend.i64 v16-;; @001f v19 = iadd v17, v18-;; v72 = iconst.i64 24-;; @001f v20 = iadd v19, v72 ; v72 = 24-;; @001f store user2 v2, v20-;; v54 = load.i32 notrap v76-;; @001f trapz v54, user16-;; @001f v23 = uextend.i64 v54-;; @001f v25 = iadd v17, v23-;; @001f v27 = iadd v25, v72 ; v72 = 24-;; @001f v28 = load.i32 user2 readonly v27-;; @001f v29 = uextend.i64 v28-;; @001f v34 = icmp ugt v5, v29-;; @001f trapnz v34, user17-;; @001f v45 = load.i64 notrap aligned v74+40-;; @001f v38 = iadd v25, v77 ; v77 = 32-;; @001f v47 = uadd_overflow_trap v38, v80, user2-;; @001f v46 = iadd v17, v45-;; @001f v48 = icmp ugt v47, v46-;; @001f trapnz v48, user2-;; @001f v22 = iconst.i32 0-;; @001f call fn1(v0, v38, v22, v80), stack_map=[i32 @ ss0+0] ; v22 = 0-;; v51 = load.i32 notrap v76+;; @001f v4 = iconst.i32 24+;; v109 = iconst.i32 3+;; v110 = ishl v2, v109 ; v109 = 3+;; @001f v9 = uadd_overflow_trap v4, v110, user18 ; v4 = 24+;; @001f v11 = load.i64 notrap aligned readonly can_move v0+32+;; @001f v12 = load.i32 notrap aligned v11+;; @001f v13 = load.i32 notrap aligned v11+4+;; @001f v19 = uextend.i64 v12+;; @001f v14 = uextend.i64 v9+;; @001f v15 = iconst.i64 15+;; @001f v17 = iadd v14, v15 ; v15 = 15+;; @001f v16 = iconst.i64 -16+;; @001f v18 = band v17, v16 ; v16 = -16+;; @001f v20 = iadd v19, v18+;; @001f v21 = uextend.i64 v13+;; @001f v22 = icmp ule v20, v21+;; @001f brif v22, block2, block3+;;+;; block2:+;; v118 = iconst.i32 15+;; v119 = iadd.i32 v9, v118 ; v118 = 15+;; v122 = iconst.i32 -16+;; v123 = band v119, v122 ; v122 = -16+;; v125 = iadd.i32 v12, v123+;; @001f store notrap aligned vmctx v125, v11+;; v141 = iconst.i32 -1476395008+;; v142 = load.i64 notrap aligned readonly can_move v0+8+;; v143 = load.i64 notrap aligned readonly can_move v142+32+;; @001f v36 = iadd v143, v19+;; @001f store notrap aligned v141, v36 ; v141 = -1476395008+;; v144 = load.i64 notrap aligned readonly can_move v0+40+;; v145 = load.i32 notrap aligned readonly can_move v144+;; @001f store notrap aligned v145, v36+4+;; v146 = band.i64 v17, v16 ; v16 = -16+;; @001f istore32 notrap aligned v146, v36+8+;; @001f jump block4(v12, v36)+;;+;; block3 cold:+;; @001f v24 = iconst.i32 -1476395008+;; @001f v26 = load.i64 notrap aligned readonly can_move v0+40+;; @001f v27 = load.i32 notrap aligned readonly can_move v26+;; @001f v28 = iconst.i32 16+;; @001f v29 = call fn0(v0, v24, v27, v9, v28) ; v24 = -1476395008, v28 = 16+;; @001f v96 = load.i64 notrap aligned readonly can_move v0+8+;; @001f v30 = load.i64 notrap aligned readonly can_move v96+32+;; @001f v31 = uextend.i64 v29+;; @001f v32 = iadd v30, v31+;; @001f jump block4(v29, v32)+;;+;; block4(v41: i32, v42: i64):+;; v95 = stack_addr.i64 ss0+;; store notrap v41, v95+;; v94 = iconst.i64 16+;; @001f v43 = iadd v42, v94 ; v94 = 16+;; @001f store.i32 user2 v2, v43+;; v77 = load.i32 notrap v95+;; @001f trapz v77, user16+;; v147 = load.i64 notrap aligned readonly can_move v0+8+;; v148 = load.i64 notrap aligned readonly can_move v147+32+;; @001f v46 = uextend.i64 v77+;; @001f v48 = iadd v148, v46+;; @001f v50 = iadd v48, v94 ; v94 = 16+;; @001f v51 = load.i32 user2 readonly v50+;; @001f v52 = uextend.i64 v51+;; @001f v57 = icmp.i64 ugt v5, v52+;; @001f trapnz v57, user17+;; @001f v68 = load.i64 notrap aligned v147+40+;; v85 = iconst.i64 24+;; @001f v61 = iadd v48, v85 ; v85 = 24+;; @001f v70 = uadd_overflow_trap v61, v103, user2+;; @001f v69 = iadd v148, v68+;; @001f v71 = icmp ugt v70, v69+;; @001f trapnz v71, user2+;; @001f v45 = iconst.i32 0+;; @001f call fn1(v0, v61, v45, v103), stack_map=[i32 @ ss0+0] ; v45 = 0+;; v74 = load.i32 notrap v95;; @0022 jump block1;;;; block1:-;; @0022 return v51+;; @0022 return v74;; }diff --git a/tests/disas/gc/array-new-default-funcref.wat b/tests/disas/gc/array-new-default-funcref.watindex f794f6551a..c1662695dd 100644--- a/tests/disas/gc/array-new-default-funcref.wat+++ b/tests/disas/gc/array-new-default-funcref.wat@@ -26,50 +26,89 @@;;;; block0(v0: i64, v1: i64, v2: i32):;; @001f v5 = uextend.i64 v2-;; v79 = iconst.i64 2-;; v80 = ishl v5, v79 ; v79 = 2-;; v77 = iconst.i64 32-;; @001f v7 = ushr v80, v77 ; v77 = 32+;; v102 = iconst.i64 2+;; v103 = ishl v5, v102 ; v102 = 2+;; v100 = iconst.i64 32+;; @001f v7 = ushr v103, v100 ; v100 = 32;; @001f trapnz v7, user18-;; @001f v4 = iconst.i32 28-;; v86 = iconst.i32 2-;; v87 = ishl v2, v86 ; v86 = 2-;; @001f v9 = uadd_overflow_trap v4, v87, user18 ; v4 = 28-;; @001f v11 = iconst.i32 -1476395008-;; @001f v13 = load.i64 notrap aligned readonly can_move v0+40-;; @001f v14 = load.i32 notrap aligned readonly can_move v13-;; @001f v15 = iconst.i32 8-;; @001f v16 = call fn0(v0, v11, v14, v9, v15) ; v11 = -1476395008, v15 = 8-;; v76 = stack_addr.i64 ss0-;; store notrap v16, v76-;; @001f v74 = load.i64 notrap aligned readonly can_move v0+8-;; @001f v17 = load.i64 notrap aligned readonly can_move v74+32-;; @001f v18 = uextend.i64 v16-;; @001f v19 = iadd v17, v18-;; v72 = iconst.i64 24-;; @001f v20 = iadd v19, v72 ; v72 = 24-;; @001f store user2 v2, v20-;; v54 = load.i32 notrap v76-;; @001f trapz v54, user16-;; @001f v23 = uextend.i64 v54-;; @001f v25 = iadd v17, v23-;; @001f v27 = iadd v25, v72 ; v72 = 24-;; @001f v28 = load.i32 user2 readonly v27-;; @001f v29 = uextend.i64 v28-;; @001f v34 = icmp ugt v5, v29-;; @001f trapnz v34, user17-;; @001f v45 = load.i64 notrap aligned v74+40-;; v63 = iconst.i64 28-;; @001f v38 = iadd v25, v63 ; v63 = 28-;; @001f v47 = uadd_overflow_trap v38, v80, user2-;; @001f v46 = iadd v17, v45-;; @001f v48 = icmp ugt v47, v46-;; @001f trapnz v48, user2-;; @001f v22 = iconst.i32 0-;; @001f call fn1(v0, v38, v22, v80), stack_map=[i32 @ ss0+0] ; v22 = 0-;; v51 = load.i32 notrap v76+;; @001f v4 = iconst.i32 20+;; v109 = iconst.i32 2+;; v110 = ishl v2, v109 ; v109 = 2+;; @001f v9 = uadd_overflow_trap v4, v110, user18 ; v4 = 20+;; @001f v11 = load.i64 notrap aligned readonly can_move v0+32+;; @001f v12 = load.i32 notrap aligned v11+;; @001f v13 = load.i32 notrap aligned v11+4+;; @001f v19 = uextend.i64 v12+;; @001f v14 = uextend.i64 v9+;; @001f v15 = iconst.i64 15+;; @001f v17 = iadd v14, v15 ; v15 = 15+;; @001f v16 = iconst.i64 -16+;; @001f v18 = band v17, v16 ; v16 = -16+;; @001f v20 = iadd v19, v18+;; @001f v21 = uextend.i64 v13+;; @001f v22 = icmp ule v20, v21+;; @001f brif v22, block2, block3+;;+;; block2:+;; v118 = iconst.i32 15+;; v119 = iadd.i32 v9, v118 ; v118 = 15+;; v122 = iconst.i32 -16+;; v123 = band v119, v122 ; v122 = -16+;; v125 = iadd.i32 v12, v123+;; @001f store notrap aligned vmctx v125, v11+;; v140 = iconst.i32 -1476395008+;; v141 = load.i64 notrap aligned readonly can_move v0+8+;; v142 = load.i64 notrap aligned readonly can_move v141+32+;; @001f v36 = iadd v142, v19+;; @001f store notrap aligned v140, v36 ; v140 = -1476395008+;; v143 = load.i64 notrap aligned readonly can_move v0+40+;; v144 = load.i32 notrap aligned readonly can_move v143+;; @001f store notrap aligned v144, v36+4+;; v145 = band.i64 v17, v16 ; v16 = -16+;; @001f istore32 notrap aligned v145, v36+8+;; @001f jump block4(v12, v36)+;;+;; block3 cold:+;; @001f v24 = iconst.i32 -1476395008+;; @001f v26 = load.i64 notrap aligned readonly can_move v0+40+;; @001f v27 = load.i32 notrap aligned readonly can_move v26+;; @001f v28 = iconst.i32 16+;; @001f v29 = call fn0(v0, v24, v27, v9, v28) ; v24 = -1476395008, v28 = 16+;; @001f v96 = load.i64 notrap aligned readonly can_move v0+8+;; @001f v30 = load.i64 notrap aligned readonly can_move v96+32+;; @001f v31 = uextend.i64 v29+;; @001f v32 = iadd v30, v31+;; @001f jump block4(v29, v32)+;;+;; block4(v41: i32, v42: i64):+;; v95 = stack_addr.i64 ss0+;; store notrap v41, v95+;; v94 = iconst.i64 16+;; @001f v43 = iadd v42, v94 ; v94 = 16+;; @001f store.i32 user2 v2, v43+;; v77 = load.i32 notrap v95+;; @001f trapz v77, user16+;; v146 = load.i64 notrap aligned readonly can_move v0+8+;; v147 = load.i64 notrap aligned readonly can_move v146+32+;; @001f v46 = uextend.i64 v77+;; @001f v48 = iadd v147, v46+;; @001f v50 = iadd v48, v94 ; v94 = 16+;; @001f v51 = load.i32 user2 readonly v50+;; @001f v52 = uextend.i64 v51+;; @001f v57 = icmp.i64 ugt v5, v52+;; @001f trapnz v57, user17+;; @001f v68 = load.i64 notrap aligned v146+40+;; v85 = iconst.i64 20+;; @001f v61 = iadd v48, v85 ; v85 = 20+;; @001f v70 = uadd_overflow_trap v61, v103, user2+;; @001f v69 = iadd v147, v68+;; @001f v71 = icmp ugt v70, v69+;; @001f trapnz v71, user2+;; @001f v45 = iconst.i32 0+;; @001f call fn1(v0, v61, v45, v103), stack_map=[i32 @ ss0+0] ; v45 = 0+;; v74 = load.i32 notrap v95;; @0022 jump block1;;;; block1:-;; @0022 return v51+;; @0022 return v74;; }diff --git a/tests/disas/gc/array-new-default-i16.wat b/tests/disas/gc/array-new-default-i16.watindex b9fb5d3641..fd880dd417 100644--- a/tests/disas/gc/array-new-default-i16.wat+++ b/tests/disas/gc/array-new-default-i16.wat@@ -26,49 +26,88 @@;;;; block0(v0: i64, v1: i64, v2: i32):;; @001f v5 = uextend.i64 v2-;; v80 = iconst.i64 1-;; v81 = ishl v5, v80 ; v80 = 1-;; v77 = iconst.i64 32-;; @001f v7 = ushr v81, v77 ; v77 = 32+;; v103 = iconst.i64 1+;; v104 = ishl v5, v103 ; v103 = 1+;; v100 = iconst.i64 32+;; @001f v7 = ushr v104, v100 ; v100 = 32;; @001f trapnz v7, user18-;; @001f v4 = iconst.i32 28-;; v85 = iadd v2, v2-;; @001f v9 = uadd_overflow_trap v4, v85, user18 ; v4 = 28-;; @001f v11 = iconst.i32 -1476395008-;; @001f v13 = load.i64 notrap aligned readonly can_move v0+40-;; @001f v14 = load.i32 notrap aligned readonly can_move v13-;; @001f v15 = iconst.i32 8-;; @001f v16 = call fn0(v0, v11, v14, v9, v15) ; v11 = -1476395008, v15 = 8-;; v76 = stack_addr.i64 ss0-;; store notrap v16, v76-;; @001f v74 = load.i64 notrap aligned readonly can_move v0+8-;; @001f v17 = load.i64 notrap aligned readonly can_move v74+32-;; @001f v18 = uextend.i64 v16-;; @001f v19 = iadd v17, v18-;; v72 = iconst.i64 24-;; @001f v20 = iadd v19, v72 ; v72 = 24-;; @001f store user2 v2, v20-;; v54 = load.i32 notrap v76-;; @001f trapz v54, user16-;; @001f v23 = uextend.i64 v54-;; @001f v25 = iadd v17, v23-;; @001f v27 = iadd v25, v72 ; v72 = 24-;; @001f v28 = load.i32 user2 readonly v27-;; @001f v29 = uextend.i64 v28-;; @001f v34 = icmp ugt v5, v29-;; @001f trapnz v34, user17-;; @001f v45 = load.i64 notrap aligned v74+40-;; v63 = iconst.i64 28-;; @001f v38 = iadd v25, v63 ; v63 = 28-;; @001f v47 = uadd_overflow_trap v38, v81, user2-;; @001f v46 = iadd v17, v45-;; @001f v48 = icmp ugt v47, v46-;; @001f trapnz v48, user2-;; @001f v21 = iconst.i32 0-;; @001f call fn1(v0, v38, v21, v81), stack_map=[i32 @ ss0+0] ; v21 = 0-;; v51 = load.i32 notrap v76+;; @001f v4 = iconst.i32 20+;; v108 = iadd v2, v2+;; @001f v9 = uadd_overflow_trap v4, v108, user18 ; v4 = 20+;; @001f v11 = load.i64 notrap aligned readonly can_move v0+32+;; @001f v12 = load.i32 notrap aligned v11+;; @001f v13 = load.i32 notrap aligned v11+4+;; @001f v19 = uextend.i64 v12+;; @001f v14 = uextend.i64 v9+;; @001f v15 = iconst.i64 15+;; @001f v17 = iadd v14, v15 ; v15 = 15+;; @001f v16 = iconst.i64 -16+;; @001f v18 = band v17, v16 ; v16 = -16+;; @001f v20 = iadd v19, v18+;; @001f v21 = uextend.i64 v13+;; @001f v22 = icmp ule v20, v21+;; @001f brif v22, block2, block3+;;+;; block2:+;; v123 = iconst.i32 15+;; v124 = iadd.i32 v9, v123 ; v123 = 15+;; v127 = iconst.i32 -16+;; v128 = band v124, v127 ; v127 = -16+;; v130 = iadd.i32 v12, v128+;; @001f store notrap aligned vmctx v130, v11+;; v151 = iconst.i32 -1476395008+;; v152 = load.i64 notrap aligned readonly can_move v0+8+;; v153 = load.i64 notrap aligned readonly can_move v152+32+;; @001f v36 = iadd v153, v19+;; @001f store notrap aligned v151, v36 ; v151 = -1476395008+;; v154 = load.i64 notrap aligned readonly can_move v0+40+;; v155 = load.i32 notrap aligned readonly can_move v154+;; @001f store notrap aligned v155, v36+4+;; v156 = band.i64 v17, v16 ; v16 = -16+;; @001f istore32 notrap aligned v156, v36+8+;; @001f jump block4(v12, v36)+;;+;; block3 cold:+;; @001f v24 = iconst.i32 -1476395008+;; @001f v26 = load.i64 notrap aligned readonly can_move v0+40+;; @001f v27 = load.i32 notrap aligned readonly can_move v26+;; @001f v28 = iconst.i32 16+;; @001f v29 = call fn0(v0, v24, v27, v9, v28) ; v24 = -1476395008, v28 = 16+;; @001f v96 = load.i64 notrap aligned readonly can_move v0+8+;; @001f v30 = load.i64 notrap aligned readonly can_move v96+32+;; @001f v31 = uextend.i64 v29+;; @001f v32 = iadd v30, v31+;; @001f jump block4(v29, v32)+;;+;; block4(v41: i32, v42: i64):+;; v95 = stack_addr.i64 ss0+;; store notrap v41, v95+;; v94 = iconst.i64 16+;; @001f v43 = iadd v42, v94 ; v94 = 16+;; @001f store.i32 user2 v2, v43+;; v77 = load.i32 notrap v95+;; @001f trapz v77, user16+;; v157 = load.i64 notrap aligned readonly can_move v0+8+;; v158 = load.i64 notrap aligned readonly can_move v157+32+;; @001f v46 = uextend.i64 v77+;; @001f v48 = iadd v158, v46+;; @001f v50 = iadd v48, v94 ; v94 = 16+;; @001f v51 = load.i32 user2 readonly v50+;; @001f v52 = uextend.i64 v51+;; @001f v57 = icmp.i64 ugt v5, v52+;; @001f trapnz v57, user17+;; @001f v68 = load.i64 notrap aligned v157+40+;; v85 = iconst.i64 20+;; @001f v61 = iadd v48, v85 ; v85 = 20+;; @001f v70 = uadd_overflow_trap v61, v104, user2+;; @001f v69 = iadd v158, v68+;; @001f v71 = icmp ugt v70, v69+;; @001f trapnz v71, user2+;; @001f v44 = iconst.i32 0+;; @001f call fn1(v0, v61, v44, v104), stack_map=[i32 @ ss0+0] ; v44 = 0+;; v74 = load.i32 notrap v95;; @0022 jump block1;;;; block1:-;; @0022 return v51+;; @0022 return v74;; }diff --git a/tests/disas/gc/array-new-default-i32.wat b/tests/disas/gc/array-new-default-i32.watindex 939cf5fbfb..b175996afb 100644--- a/tests/disas/gc/array-new-default-i32.wat+++ b/tests/disas/gc/array-new-default-i32.wat@@ -26,50 +26,89 @@;;;; block0(v0: i64, v1: i64, v2: i32):;; @001f v5 = uextend.i64 v2-;; v79 = iconst.i64 2-;; v80 = ishl v5, v79 ; v79 = 2-;; v77 = iconst.i64 32-;; @001f v7 = ushr v80, v77 ; v77 = 32+;; v102 = iconst.i64 2+;; v103 = ishl v5, v102 ; v102 = 2+;; v100 = iconst.i64 32+;; @001f v7 = ushr v103, v100 ; v100 = 32;; @001f trapnz v7, user18-;; @001f v4 = iconst.i32 28-;; v86 = iconst.i32 2-;; v87 = ishl v2, v86 ; v86 = 2-;; @001f v9 = uadd_overflow_trap v4, v87, user18 ; v4 = 28-;; @001f v11 = iconst.i32 -1476395008-;; @001f v13 = load.i64 notrap aligned readonly can_move v0+40-;; @001f v14 = load.i32 notrap aligned readonly can_move v13-;; @001f v15 = iconst.i32 8-;; @001f v16 = call fn0(v0, v11, v14, v9, v15) ; v11 = -1476395008, v15 = 8-;; v76 = stack_addr.i64 ss0-;; store notrap v16, v76-;; @001f v74 = load.i64 notrap aligned readonly can_move v0+8-;; @001f v17 = load.i64 notrap aligned readonly can_move v74+32-;; @001f v18 = uextend.i64 v16-;; @001f v19 = iadd v17, v18-;; v72 = iconst.i64 24-;; @001f v20 = iadd v19, v72 ; v72 = 24-;; @001f store user2 v2, v20-;; v54 = load.i32 notrap v76-;; @001f trapz v54, user16-;; @001f v23 = uextend.i64 v54-;; @001f v25 = iadd v17, v23-;; @001f v27 = iadd v25, v72 ; v72 = 24-;; @001f v28 = load.i32 user2 readonly v27-;; @001f v29 = uextend.i64 v28-;; @001f v34 = icmp ugt v5, v29-;; @001f trapnz v34, user17-;; @001f v45 = load.i64 notrap aligned v74+40-;; v63 = iconst.i64 28-;; @001f v38 = iadd v25, v63 ; v63 = 28-;; @001f v47 = uadd_overflow_trap v38, v80, user2-;; @001f v46 = iadd v17, v45-;; @001f v48 = icmp ugt v47, v46-;; @001f trapnz v48, user2-;; @001f v21 = iconst.i32 0-;; @001f call fn1(v0, v38, v21, v80), stack_map=[i32 @ ss0+0] ; v21 = 0-;; v51 = load.i32 notrap v76+;; @001f v4 = iconst.i32 20+;; v109 = iconst.i32 2+;; v110 = ishl v2, v109 ; v109 = 2+;; @001f v9 = uadd_overflow_trap v4, v110, user18 ; v4 = 20+;; @001f v11 = load.i64 notrap aligned readonly can_move v0+32+;; @001f v12 = load.i32 notrap aligned v11+;; @001f v13 = load.i32 notrap aligned v11+4+;; @001f v19 = uextend.i64 v12+;; @001f v14 = uextend.i64 v9+;; @001f v15 = iconst.i64 15+;; @001f v17 = iadd v14, v15 ; v15 = 15+;; @001f v16 = iconst.i64 -16+;; @001f v18 = band v17, v16 ; v16 = -16+;; @001f v20 = iadd v19, v18+;; @001f v21 = uextend.i64 v13+;; @001f v22 = icmp ule v20, v21+;; @001f brif v22, block2, block3+;;+;; block2:+;; v118 = iconst.i32 15+;; v119 = iadd.i32 v9, v118 ; v118 = 15+;; v122 = iconst.i32 -16+;; v123 = band v119, v122 ; v122 = -16+;; v125 = iadd.i32 v12, v123+;; @001f store notrap aligned vmctx v125, v11+;; v141 = iconst.i32 -1476395008+;; v142 = load.i64 notrap aligned readonly can_move v0+8+;; v143 = load.i64 notrap aligned readonly can_move v142+32+;; @001f v36 = iadd v143, v19+;; @001f store notrap aligned v141, v36 ; v141 = -1476395008+;; v144 = load.i64 notrap aligned readonly can_move v0+40+;; v145 = load.i32 notrap aligned readonly can_move v144+;; @001f store notrap aligned v145, v36+4+;; v146 = band.i64 v17, v16 ; v16 = -16+;; @001f istore32 notrap aligned v146, v36+8+;; @001f jump block4(v12, v36)+;;+;; block3 cold:+;; @001f v24 = iconst.i32 -1476395008+;; @001f v26 = load.i64 notrap aligned readonly can_move v0+40+;; @001f v27 = load.i32 notrap aligned readonly can_move v26+;; @001f v28 = iconst.i32 16+;; @001f v29 = call fn0(v0, v24, v27, v9, v28) ; v24 = -1476395008, v28 = 16+;; @001f v96 = load.i64 notrap aligned readonly can_move v0+8+;; @001f v30 = load.i64 notrap aligned readonly can_move v96+32+;; @001f v31 = uextend.i64 v29+;; @001f v32 = iadd v30, v31+;; @001f jump block4(v29, v32)+;;+;; block4(v41: i32, v42: i64):+;; v95 = stack_addr.i64 ss0+;; store notrap v41, v95+;; v94 = iconst.i64 16+;; @001f v43 = iadd v42, v94 ; v94 = 16+;; @001f store.i32 user2 v2, v43+;; v77 = load.i32 notrap v95+;; @001f trapz v77, user16+;; v147 = load.i64 notrap aligned readonly can_move v0+8+;; v148 = load.i64 notrap aligned readonly can_move v147+32+;; @001f v46 = uextend.i64 v77+;; @001f v48 = iadd v148, v46+;; @001f v50 = iadd v48, v94 ; v94 = 16+;; @001f v51 = load.i32 user2 readonly v50+;; @001f v52 = uextend.i64 v51+;; @001f v57 = icmp.i64 ugt v5, v52+;; @001f trapnz v57, user17+;; @001f v68 = load.i64 notrap aligned v147+40+;; v85 = iconst.i64 20+;; @001f v61 = iadd v48, v85 ; v85 = 20+;; @001f v70 = uadd_overflow_trap v61, v103, user2+;; @001f v69 = iadd v148, v68+;; @001f v71 = icmp ugt v70, v69+;; @001f trapnz v71, user2+;; @001f v44 = iconst.i32 0+;; @001f call fn1(v0, v61, v44, v103), stack_map=[i32 @ ss0+0] ; v44 = 0+;; v74 = load.i32 notrap v95;; @0022 jump block1;;;; block1:-;; @0022 return v51+;; @0022 return v74;; }diff --git a/tests/disas/gc/array-new-default-i64.wat b/tests/disas/gc/array-new-default-i64.watindex 03c683968f..313cd6eb95 100644--- a/tests/disas/gc/array-new-default-i64.wat+++ b/tests/disas/gc/array-new-default-i64.wat@@ -26,49 +26,89 @@;;;; block0(v0: i64, v1: i64, v2: i32):;; @001f v5 = uextend.i64 v2-;; v79 = iconst.i64 3-;; v80 = ishl v5, v79 ; v79 = 3-;; v77 = iconst.i64 32-;; @001f v7 = ushr v80, v77 ; v77 = 32+;; v102 = iconst.i64 3+;; v103 = ishl v5, v102 ; v102 = 3+;; v100 = iconst.i64 32+;; @001f v7 = ushr v103, v100 ; v100 = 32;; @001f trapnz v7, user18-;; @001f v4 = iconst.i32 32-;; v86 = iconst.i32 3-;; v87 = ishl v2, v86 ; v86 = 3-;; @001f v9 = uadd_overflow_trap v4, v87, user18 ; v4 = 32-;; @001f v11 = iconst.i32 -1476395008-;; @001f v13 = load.i64 notrap aligned readonly can_move v0+40-;; @001f v14 = load.i32 notrap aligned readonly can_move v13-;; v84 = iconst.i32 8-;; @001f v16 = call fn0(v0, v11, v14, v9, v84) ; v11 = -1476395008, v84 = 8-;; v76 = stack_addr.i64 ss0-;; store notrap v16, v76-;; @001f v74 = load.i64 notrap aligned readonly can_move v0+8-;; @001f v17 = load.i64 notrap aligned readonly can_move v74+32-;; @001f v18 = uextend.i64 v16-;; @001f v19 = iadd v17, v18-;; v72 = iconst.i64 24-;; @001f v20 = iadd v19, v72 ; v72 = 24-;; @001f store user2 v2, v20-;; v54 = load.i32 notrap v76-;; @001f trapz v54, user16-;; @001f v23 = uextend.i64 v54-;; @001f v25 = iadd v17, v23-;; @001f v27 = iadd v25, v72 ; v72 = 24-;; @001f v28 = load.i32 user2 readonly v27-;; @001f v29 = uextend.i64 v28-;; @001f v34 = icmp ugt v5, v29-;; @001f trapnz v34, user17-;; @001f v45 = load.i64 notrap aligned v74+40-;; @001f v38 = iadd v25, v77 ; v77 = 32-;; @001f v47 = uadd_overflow_trap v38, v80, user2-;; @001f v46 = iadd v17, v45-;; @001f v48 = icmp ugt v47, v46-;; @001f trapnz v48, user2-;; @001f v22 = iconst.i32 0-;; @001f call fn1(v0, v38, v22, v80), stack_map=[i32 @ ss0+0] ; v22 = 0-;; v51 = load.i32 notrap v76+;; @001f v4 = iconst.i32 24+;; v109 = iconst.i32 3+;; v110 = ishl v2, v109 ; v109 = 3+;; @001f v9 = uadd_overflow_trap v4, v110, user18 ; v4 = 24+;; @001f v11 = load.i64 notrap aligned readonly can_move v0+32+;; @001f v12 = load.i32 notrap aligned v11+;; @001f v13 = load.i32 notrap aligned v11+4+;; @001f v19 = uextend.i64 v12+;; @001f v14 = uextend.i64 v9+;; @001f v15 = iconst.i64 15+;; @001f v17 = iadd v14, v15 ; v15 = 15+;; @001f v16 = iconst.i64 -16+;; @001f v18 = band v17, v16 ; v16 = -16+;; @001f v20 = iadd v19, v18+;; @001f v21 = uextend.i64 v13+;; @001f v22 = icmp ule v20, v21+;; @001f brif v22, block2, block3+;;+;; block2:+;; v118 = iconst.i32 15+;; v119 = iadd.i32 v9, v118 ; v118 = 15+;; v122 = iconst.i32 -16+;; v123 = band v119, v122 ; v122 = -16+;; v125 = iadd.i32 v12, v123+;; @001f store notrap aligned vmctx v125, v11+;; v140 = iconst.i32 -1476395008+;; v141 = load.i64 notrap aligned readonly can_move v0+8+;; v142 = load.i64 notrap aligned readonly can_move v141+32+;; @001f v36 = iadd v142, v19+;; @001f store notrap aligned v140, v36 ; v140 = -1476395008+;; v143 = load.i64 notrap aligned readonly can_move v0+40+;; v144 = load.i32 notrap aligned readonly can_move v143+;; @001f store notrap aligned v144, v36+4+;; v145 = band.i64 v17, v16 ; v16 = -16+;; @001f istore32 notrap aligned v145, v36+8+;; @001f jump block4(v12, v36)+;;+;; block3 cold:+;; @001f v24 = iconst.i32 -1476395008+;; @001f v26 = load.i64 notrap aligned readonly can_move v0+40+;; @001f v27 = load.i32 notrap aligned readonly can_move v26+;; @001f v28 = iconst.i32 16+;; @001f v29 = call fn0(v0, v24, v27, v9, v28) ; v24 = -1476395008, v28 = 16+;; @001f v96 = load.i64 notrap aligned readonly can_move v0+8+;; @001f v30 = load.i64 notrap aligned readonly can_move v96+32+;; @001f v31 = uextend.i64 v29+;; @001f v32 = iadd v30, v31+;; @001f jump block4(v29, v32)+;;+;; block4(v41: i32, v42: i64):+;; v95 = stack_addr.i64 ss0+;; store notrap v41, v95+;; v94 = iconst.i64 16+;; @001f v43 = iadd v42, v94 ; v94 = 16+;; @001f store.i32 user2 v2, v43+;; v77 = load.i32 notrap v95+;; @001f trapz v77, user16+;; v146 = load.i64 notrap aligned readonly can_move v0+8+;; v147 = load.i64 notrap aligned readonly can_move v146+32+;; @001f v46 = uextend.i64 v77+;; @001f v48 = iadd v147, v46+;; @001f v50 = iadd v48, v94 ; v94 = 16+;; @001f v51 = load.i32 user2 readonly v50+;; @001f v52 = uextend.i64 v51+;; @001f v57 = icmp.i64 ugt v5, v52+;; @001f trapnz v57, user17+;; @001f v68 = load.i64 notrap aligned v146+40+;; v85 = iconst.i64 24+;; @001f v61 = iadd v48, v85 ; v85 = 24+;; @001f v70 = uadd_overflow_trap v61, v103, user2+;; @001f v69 = iadd v147, v68+;; @001f v71 = icmp ugt v70, v69+;; @001f trapnz v71, user2+;; @001f v45 = iconst.i32 0+;; @001f call fn1(v0, v61, v45, v103), stack_map=[i32 @ ss0+0] ; v45 = 0+;; v74 = load.i32 notrap v95;; @0022 jump block1;;;; block1:-;; @0022 return v51+;; @0022 return v74;; }diff --git a/tests/disas/gc/array-new-default-i8.wat b/tests/disas/gc/array-new-default-i8.watindex 830861953f..3e1ab2327e 100644--- a/tests/disas/gc/array-new-default-i8.wat+++ b/tests/disas/gc/array-new-default-i8.wat@@ -26,46 +26,85 @@;;;; block0(v0: i64, v1: i64, v2: i32):;; @001f v5 = uextend.i64 v2-;; v76 = iconst.i64 32-;; @001f v7 = ushr v5, v76 ; v76 = 32+;; v99 = iconst.i64 32+;; @001f v7 = ushr v5, v99 ; v99 = 32;; @001f trapnz v7, user18-;; @001f v4 = iconst.i32 28-;; @001f v9 = uadd_overflow_trap v4, v2, user18 ; v4 = 28-;; @001f v11 = iconst.i32 -1476395008-;; @001f v13 = load.i64 notrap aligned readonly can_move v0+40-;; @001f v14 = load.i32 notrap aligned readonly can_move v13-;; @001f v15 = iconst.i32 8-;; @001f v16 = call fn0(v0, v11, v14, v9, v15) ; v11 = -1476395008, v15 = 8-;; v75 = stack_addr.i64 ss0-;; store notrap v16, v75-;; @001f v73 = load.i64 notrap aligned readonly can_move v0+8-;; @001f v17 = load.i64 notrap aligned readonly can_move v73+32-;; @001f v18 = uextend.i64 v16-;; @001f v19 = iadd v17, v18-;; v71 = iconst.i64 24-;; @001f v20 = iadd v19, v71 ; v71 = 24-;; @001f store user2 v2, v20-;; v53 = load.i32 notrap v75-;; @001f trapz v53, user16-;; @001f v23 = uextend.i64 v53-;; @001f v25 = iadd v17, v23-;; @001f v27 = iadd v25, v71 ; v71 = 24-;; @001f v28 = load.i32 user2 readonly v27-;; @001f v29 = uextend.i64 v28-;; @001f v34 = icmp ugt v5, v29-;; @001f trapnz v34, user17-;; @001f v45 = load.i64 notrap aligned v73+40-;; v62 = iconst.i64 28-;; @001f v38 = iadd v25, v62 ; v62 = 28-;; @001f v47 = uadd_overflow_trap v38, v5, user2-;; @001f v46 = iadd v17, v45-;; @001f v48 = icmp ugt v47, v46-;; @001f trapnz v48, user2-;; @001f v21 = iconst.i32 0-;; @001f call fn1(v0, v38, v21, v5), stack_map=[i32 @ ss0+0] ; v21 = 0-;; v50 = load.i32 notrap v75+;; @001f v4 = iconst.i32 20+;; @001f v9 = uadd_overflow_trap v4, v2, user18 ; v4 = 20+;; @001f v11 = load.i64 notrap aligned readonly can_move v0+32+;; @001f v12 = load.i32 notrap aligned v11+;; @001f v13 = load.i32 notrap aligned v11+4+;; @001f v19 = uextend.i64 v12+;; @001f v14 = uextend.i64 v9+;; @001f v15 = iconst.i64 15+;; @001f v17 = iadd v14, v15 ; v15 = 15+;; @001f v16 = iconst.i64 -16+;; @001f v18 = band v17, v16 ; v16 = -16+;; @001f v20 = iadd v19, v18+;; @001f v21 = uextend.i64 v13+;; @001f v22 = icmp ule v20, v21+;; @001f brif v22, block2, block3+;;+;; block2:+;; v108 = iconst.i32 15+;; v109 = iadd.i32 v9, v108 ; v108 = 15+;; v112 = iconst.i32 -16+;; v113 = band v109, v112 ; v112 = -16+;; v115 = iadd.i32 v12, v113+;; @001f store notrap aligned vmctx v115, v11+;; v129 = iconst.i32 -1476395008+;; v130 = load.i64 notrap aligned readonly can_move v0+8+;; v131 = load.i64 notrap aligned readonly can_move v130+32+;; @001f v36 = iadd v131, v19+;; @001f store notrap aligned v129, v36 ; v129 = -1476395008+;; v132 = load.i64 notrap aligned readonly can_move v0+40+;; v133 = load.i32 notrap aligned readonly can_move v132+;; @001f store notrap aligned v133, v36+4+;; v134 = band.i64 v17, v16 ; v16 = -16+;; @001f istore32 notrap aligned v134, v36+8+;; @001f jump block4(v12, v36)+;;+;; block3 cold:+;; @001f v24 = iconst.i32 -1476395008+;; @001f v26 = load.i64 notrap aligned readonly can_move v0+40+;; @001f v27 = load.i32 notrap aligned readonly can_move v26+;; @001f v28 = iconst.i32 16+;; @001f v29 = call fn0(v0, v24, v27, v9, v28) ; v24 = -1476395008, v28 = 16+;; @001f v95 = load.i64 notrap aligned readonly can_move v0+8+;; @001f v30 = load.i64 notrap aligned readonly can_move v95+32+;; @001f v31 = uextend.i64 v29+;; @001f v32 = iadd v30, v31+;; @001f jump block4(v29, v32)+;;+;; block4(v41: i32, v42: i64):+;; v94 = stack_addr.i64 ss0+;; store notrap v41, v94+;; v93 = iconst.i64 16+;; @001f v43 = iadd v42, v93 ; v93 = 16+;; @001f store.i32 user2 v2, v43+;; v76 = load.i32 notrap v94+;; @001f trapz v76, user16+;; v135 = load.i64 notrap aligned readonly can_move v0+8+;; v136 = load.i64 notrap aligned readonly can_move v135+32+;; @001f v46 = uextend.i64 v76+;; @001f v48 = iadd v136, v46+;; @001f v50 = iadd v48, v93 ; v93 = 16+;; @001f v51 = load.i32 user2 readonly v50+;; @001f v52 = uextend.i64 v51+;; @001f v57 = icmp.i64 ugt v5, v52+;; @001f trapnz v57, user17+;; @001f v68 = load.i64 notrap aligned v135+40+;; v84 = iconst.i64 20+;; @001f v61 = iadd v48, v84 ; v84 = 20+;; @001f v70 = uadd_overflow_trap v61, v5, user2+;; @001f v69 = iadd v136, v68+;; @001f v71 = icmp ugt v70, v69+;; @001f trapnz v71, user2+;; @001f v44 = iconst.i32 0+;; @001f call fn1(v0, v61, v44, v5), stack_map=[i32 @ ss0+0] ; v44 = 0+;; v73 = load.i32 notrap v94;; @0022 jump block1;;;; block1:-;; @0022 return v50+;; @0022 return v73;; }diff --git a/tests/disas/gc/issue-11753.wat b/tests/disas/gc/issue-11753.watindex 34ec56fcf2..b0c7b74b43 100644--- a/tests/disas/gc/issue-11753.wat+++ b/tests/disas/gc/issue-11753.wat@@ -27,56 +27,77 @@;; movq %rsp, %rbp;; movq 8(%rdi), %r10;; movq 0x18(%r10), %r10-;; addq $0x60, %r10+;; addq $0x50, %r10;; cmpq %rsp, %r10-;; ja 0xc2-;; 19: subq $0x50, %rsp-;; movq %rbx, 0x20(%rsp)-;; movq %r12, 0x28(%rsp)-;; movq %r13, 0x30(%rsp)-;; movq %r14, 0x38(%rsp)-;; movq %r15, 0x40(%rsp)-;; movl $0xb0000000, %esi-;; movq 0x28(%rdi), %rax-;; movq %rdi, 8(%rsp)-;; movl (%rax), %edx-;; movl $0x20, %ecx-;; movl $8, %r8d-;; movq 8(%rsp), %rbx-;; movq %rbx, %rdi-;; callq 0x219+;; ja 0x11a+;; 19: subq $0x40, %rsp+;; movq %rbx, 0x10(%rsp)+;; movq %r12, 0x18(%rsp)+;; movq %r13, 0x20(%rsp)+;; movq %r14, 0x28(%rsp)+;; movq %r15, 0x30(%rsp)+;; movq 0x20(%rdi), %rsi+;; movl (%rsi), %eax+;; movl %eax, %ecx+;; leaq 0x20(%rcx), %rdx+;; movl 4(%rsi), %r8d+;; cmpq %r8, %rdx+;; ja 0xe6+;; 4f: movq %rdi, 8(%rsp)+;; leal 0x20(%rax), %edi+;; movl %edi, (%rsi)+;; movq 8(%rsp), %r9+;; movq 8(%r9), %rsi+;; movq 0x20(%rsi), %rdi+;; leaq (%rdi, %rcx), %rsi+;; movl $0xb0000000, (%rdi, %rcx)+;; movq 0x28(%r9), %r8+;; movl (%r8), %r8d+;; movl %r8d, 4(%rdi, %rcx)+;; movl $0x20, %r8d+;; movl %r8d, 8(%rdi, %rcx);; movl %eax, (%rsp)-;; movq 8(%rbx), %rcx-;; movq 0x20(%rcx), %rcx-;; movl %eax, %eax-;; movl $0x2a, 0x18(%rcx, %rax)+;; movl $0x2a, 0x10(%rsi);; β°ββΌ trap: GcHeapCorrupt-;; movq %rcx, 0x10(%rsp)-;; movq 0x38(%rbx), %rax-;; movq 0x48(%rbx), %rdi-;; movq %rbx, %rsi-;; movq %rbx, 8(%rsp)+;; movq 8(%rsp), %r9+;; movq 0x38(%r9), %rax+;; movq 0x48(%r9), %rdi+;; movq 8(%rsp), %rsi;; callq *%rax-;; βββΌ exception frame offset: SP = FP - 0x50-;; β°ββΌ exception handler: default handler, context at [SP+0x8], handler=0x8a+;; βββΌ exception frame offset: SP = FP - 0x40+;; β°ββΌ exception handler: default handler, context at [SP+0x8], handler=0xa6;; movl (%rsp), %eax-;; β°ββΌ stack_map: frame_size=80, frame_offsets=[0]+;; β°ββΌ stack_map: frame_size=64, frame_offsets=[0];; testl %eax, %eax-;; je 0xc4-;; 95: movl %eax, %eax-;; movq 0x10(%rsp), %rcx-;; movl 0x18(%rcx, %rax), %eax+;; je 0x11c+;; b1: movq 8(%rsp), %r9+;; movq 8(%r9), %rcx+;; movq 0x20(%rcx), %rcx+;; movl %eax, %eax+;; movl 0x10(%rcx, %rax), %eax;; β°ββΌ trap: GcHeapCorrupt-;; movq 0x20(%rsp), %rbx-;; movq 0x28(%rsp), %r12-;; movq 0x30(%rsp), %r13-;; movq 0x38(%rsp), %r14-;; movq 0x40(%rsp), %r15-;; addq $0x50, %rsp+;; movq 0x10(%rsp), %rbx+;; movq 0x18(%rsp), %r12+;; movq 0x20(%rsp), %r13+;; movq 0x28(%rsp), %r14+;; movq 0x30(%rsp), %r15+;; addq $0x40, %rsp;; movq %rbp, %rsp;; popq %rbp;; retq-;; c2: ud2+;; e6: movl $0xb0000000, %esi+;; eb: movq 0x28(%rdi), %rax+;; ef: movq %rdi, 8(%rsp)+;; f4: movl (%rax), %edx+;; f6: movl $0x20, %ecx+;; fb: movl $0x10, %r8d+;; 101: callq 0x271+;; 106: movq 8(%rsp), %r9+;; 10b: movq 8(%r9), %rcx+;; 10f: movl %eax, %esi+;; 111: addq 0x20(%rcx), %rsi+;; 115: jmp 0x88+;; 11a: ud2;; β°ββΌ trap: Normal(StackOverflow)-;; c4: ud2+;; 11c: ud2;; β°ββΌ trap: Normal(NullReference)diff --git a/tests/disas/gc/struct-new-default.wat b/tests/disas/gc/struct-new-default.watindex 701adb0d84..8d3c2f014a 100644--- a/tests/disas/gc/struct-new-default.wat+++ b/tests/disas/gc/struct-new-default.wat@@ -19,44 +19,69 @@;; gv3 = vmctx;; gv4 = load.i64 notrap aligned readonly can_move gv3+8;; gv5 = load.i64 notrap aligned readonly can_move gv4+32-;; gv6 = load.i64 notrap aligned gv4+40;; sig0 = (i64 vmctx, i32, i32, i32, i32) -> i32 tail;; fn0 = colocated u805306368:24 sig0;; const0 = 0x00000000000000000000000000000000;; stack_limit = gv2;;;; block0(v0: i64, v1: i64):-;; @0023 v9 = iconst.i32 -1342177280-;; @0023 v11 = load.i64 notrap aligned readonly can_move v0+40-;; @0023 v12 = load.i32 notrap aligned readonly can_move v11-;; @0023 v7 = iconst.i32 64-;; @0023 v13 = iconst.i32 16-;; @0023 v14 = call fn0(v0, v9, v12, v7, v13) ; v9 = -1342177280, v7 = 64, v13 = 16-;; @0023 v3 = f32const 0.0+;; @0023 v9 = load.i64 notrap aligned readonly can_move v0+32+;; @0023 v10 = load.i32 notrap aligned v9+;; @0023 v11 = load.i32 notrap aligned v9+4+;; @0023 v17 = uextend.i64 v10+;; v53 = iconst.i64 48+;; @0023 v18 = iadd v17, v53 ; v53 = 48+;; @0023 v19 = uextend.i64 v11+;; @0023 v20 = icmp ule v18, v19+;; @0023 brif v20, block2, block3+;;+;; block2:+;; v69 = iconst.i32 48+;; v67 = iadd.i32 v10, v69 ; v69 = 48+;; @0023 store notrap aligned vmctx v67, v9+;; v70 = iconst.i32 -1342177280+;; v71 = load.i64 notrap aligned readonly can_move v0+8+;; v72 = load.i64 notrap aligned readonly can_move v71+32+;; @0023 v34 = iadd v72, v17+;; @0023 store notrap aligned v70, v34 ; v70 = -1342177280+;; v73 = load.i64 notrap aligned readonly can_move v0+40+;; v74 = load.i32 notrap aligned readonly can_move v73+;; @0023 store notrap aligned v74, v34+4+;; v75 = iconst.i64 48+;; @0023 istore32 notrap aligned v75, v34+8 ; v75 = 48+;; @0023 jump block4(v10, v34)+;;+;; block3 cold:+;; @0023 v22 = iconst.i32 -1342177280+;; @0023 v24 = load.i64 notrap aligned readonly can_move v0+40+;; @0023 v25 = load.i32 notrap aligned readonly can_move v24+;; @0023 v7 = iconst.i32 48+;; @0023 v26 = iconst.i32 16+;; @0023 v27 = call fn0(v0, v22, v25, v7, v26) ; v22 = -1342177280, v7 = 48, v26 = 16;; @0023 v49 = load.i64 notrap aligned readonly can_move v0+8-;; @0023 v15 = load.i64 notrap aligned readonly can_move v49+32-;; @0023 v16 = uextend.i64 v14-;; @0023 v17 = iadd v15, v16-;; v48 = iconst.i64 24-;; @0023 v18 = iadd v17, v48 ; v48 = 24-;; @0023 store user2 little v3, v18 ; v3 = 0.0-;; @0023 v4 = iconst.i32 0-;; v47 = iconst.i64 28-;; @0023 v19 = iadd v17, v47 ; v47 = 28-;; @0023 istore8 user2 little v4, v19 ; v4 = 0-;; jump block3+;; @0023 v28 = load.i64 notrap aligned readonly can_move v49+32+;; @0023 v29 = uextend.i64 v27+;; @0023 v30 = iadd v28, v29+;; @0023 jump block4(v27, v30);;-;; block3:-;; v68 = iconst.i32 0-;; v46 = iconst.i64 32-;; @0023 v20 = iadd.i64 v17, v46 ; v46 = 32-;; @0023 store user2 little v68, v20 ; v68 = 0+;; block4(v39: i32, v40: i64):+;; @0023 v3 = f32const 0.0+;; v48 = iconst.i64 16+;; @0023 v41 = iadd v40, v48 ; v48 = 16+;; @0023 store user2 little v3, v41 ; v3 = 0.0+;; @0023 v4 = iconst.i32 0+;; v47 = iconst.i64 20+;; @0023 v42 = iadd v40, v47 ; v47 = 20+;; @0023 istore8 user2 little v4, v42 ; v4 = 0+;; v46 = iconst.i64 24+;; @0023 v43 = iadd v40, v46 ; v46 = 24+;; @0023 store user2 little v4, v43 ; v4 = 0;; @0023 v6 = vconst.i8x16 const0-;; v38 = iconst.i64 48-;; @0023 v37 = iadd.i64 v17, v38 ; v38 = 48-;; @0023 store user2 little v6, v37 ; v6 = const0-;; @0026 jump block1+;; v45 = iconst.i64 32+;; @0023 v44 = iadd v40, v45 ; v45 = 32+;; @0023 store user2 little v6, v44 ; v6 = const0+;; @0026 jump block1(v39);;-;; block1:-;; @0026 return v14+;; block1(v2: i32):+;; @0026 return v2;; }diff --git a/tests/disas/gc/struct-new-stack-map.wat b/tests/disas/gc/struct-new-stack-map.watindex 0d8118b7ea..edc51a86aa 100644--- a/tests/disas/gc/struct-new-stack-map.wat+++ b/tests/disas/gc/struct-new-stack-map.wat@@ -18,46 +18,55 @@;; movq 0x18(%r10), %r10;; addq $0x40, %r10;; cmpq %rsp, %r10-;; ja 0xb3+;; ja 0xd7;; 19: subq $0x30, %rsp;; movq %rbx, 0x20(%rsp);; movq %r12, 0x28(%rsp);; movq %rdx, %r12;; movdqu %xmm0, 8(%rsp);; movl %ecx, (%rsp)-;; movl $0xb0000000, %esi-;; movq 0x28(%rdi), %rax-;; movq %rdi, %rbx-;; movl (%rax), %edx-;; movl $0x28, %ecx-;; movl $8, %r8d-;; callq 0x129-;; movq 8(%rbx), %rcx-;; β°ββΌ stack_map: frame_size=48, frame_offsets=[0]-;; movq 0x20(%rcx), %rcx-;; movl %eax, %edx+;; movq 0x20(%rdi), %rdx+;; movl (%rdx), %eax+;; movl %eax, %ecx+;; leaq 0x20(%rcx), %rsi+;; movl 4(%rdx), %r8d+;; cmpq %r8, %rsi+;; ja 0xa4+;; 4c: movq %rdi, %rbx+;; leal 0x20(%rax), %esi+;; movl %esi, (%rdx)+;; movq 8(%rbx), %rdx+;; movq 0x20(%rdx), %rsi+;; leaq (%rsi, %rcx), %rdx+;; movl $0xb0000000, (%rsi, %rcx)+;; movq 0x28(%rbx), %rdi+;; movl (%rdi), %edi+;; movl %edi, 4(%rsi, %rcx)+;; movl $0x20, %edi+;; movl %edi, 8(%rsi, %rcx);; movdqu 8(%rsp), %xmm0-;; movss %xmm0, 0x18(%rcx, %rdx)-;; movq %r12, %rsi-;; movb %sil, 0x1c(%rcx, %rdx)-;; movl (%rsp), %esi-;; movq %rsi, %rdi-;; andl $1, %edi-;; testl %esi, %esi-;; sete %r8b-;; movzbl %r8b, %r8d-;; orl %r8d, %edi-;; testl %edi, %edi-;; jne 0x99-;; 8d: movl %esi, %esi-;; leaq (%rcx, %rsi), %rdi-;; addq $1, 8(%rcx, %rsi)-;; movl (%rsp), %esi-;; movl %esi, 0x20(%rcx, %rdx)+;; movss %xmm0, 0x10(%rdx)+;; movq %r12, %rcx+;; movb %cl, 0x14(%rdx)+;; movl (%rsp), %ecx+;; movl %ecx, 0x18(%rdx);; movq 0x20(%rsp), %rbx;; movq 0x28(%rsp), %r12;; addq $0x30, %rsp;; movq %rbp, %rsp;; popq %rbp;; retq-;; b3: ud2+;; a4: movl $0xb0000000, %esi+;; a9: movq 0x28(%rdi), %rax+;; ad: movq %rdi, %rbx+;; b0: movl (%rax), %edx+;; b2: movl $0x20, %ecx+;; b7: movl $0x10, %r8d+;; bd: callq 0x14d+;; c2: movq 8(%rbx), %rcx+;; β°ββΌ stack_map: frame_size=48, frame_offsets=[0]+;; c6: movl %eax, %edx+;; c8: addq 0x20(%rcx), %rdx+;; cc: movdqu 8(%rsp), %xmm0+;; d2: jmp 0x80+;; d7: ud2diff --git a/tests/disas/gc/struct-new.wat b/tests/disas/gc/struct-new.watindex 2b5a4a9828..45feb9eacd 100644--- a/tests/disas/gc/struct-new.wat+++ b/tests/disas/gc/struct-new.wat@@ -19,57 +19,65 @@;; gv3 = vmctx;; gv4 = load.i64 notrap aligned readonly can_move gv3+8;; gv5 = load.i64 notrap aligned readonly can_move gv4+32-;; gv6 = load.i64 notrap aligned gv4+40;; sig0 = (i64 vmctx, i32, i32, i32, i32) -> i32 tail;; fn0 = colocated u805306368:24 sig0;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: f32, v3: i32, v4: i32):-;; v58 = stack_addr.i64 ss0-;; store notrap v4, v58-;; @002a v8 = iconst.i32 -1342177280-;; @002a v10 = load.i64 notrap aligned readonly can_move v0+40-;; @002a v11 = load.i32 notrap aligned readonly can_move v10-;; @002a v6 = iconst.i32 40-;; @002a v12 = iconst.i32 8-;; @002a v13 = call fn0(v0, v8, v11, v6, v12), stack_map=[i32 @ ss0+0] ; v8 = -1342177280, v6 = 40, v12 = 8-;; @002a v56 = load.i64 notrap aligned readonly can_move v0+8-;; @002a v14 = load.i64 notrap aligned readonly can_move v56+32-;; @002a v15 = uextend.i64 v13-;; @002a v16 = iadd v14, v15-;; v55 = iconst.i64 24-;; @002a v17 = iadd v16, v55 ; v55 = 24-;; @002a store user2 little v2, v17-;; v54 = iconst.i64 28-;; @002a v18 = iadd v16, v54 ; v54 = 28-;; @002a istore8 user2 little v3, v18-;; v40 = load.i32 notrap v58-;; v51 = iconst.i32 1-;; @002a v20 = band v40, v51 ; v51 = 1-;; v49 = iconst.i32 0-;; @002a v21 = icmp eq v40, v49 ; v49 = 0-;; @002a v22 = uextend.i32 v21-;; @002a v23 = bor v20, v22-;; @002a brif v23, block3, block2+;; v52 = stack_addr.i64 ss0+;; store notrap v4, v52+;; @002a v8 = load.i64 notrap aligned readonly can_move v0+32+;; @002a v9 = load.i32 notrap aligned v8+;; @002a v10 = load.i32 notrap aligned v8+4+;; @002a v16 = uextend.i64 v9+;; v53 = iconst.i64 32+;; @002a v17 = iadd v16, v53 ; v53 = 32+;; @002a v18 = uextend.i64 v10+;; @002a v19 = icmp ule v17, v18+;; @002a brif v19, block2, block3;;;; block2:-;; @002a v24 = uextend.i64 v40-;; @002a v26 = iadd.i64 v14, v24-;; @002a v27 = iconst.i64 8-;; @002a v28 = iadd v26, v27 ; v27 = 8-;; @002a v29 = load.i64 user2 v28-;; v45 = iconst.i64 1-;; @002a v30 = iadd v29, v45 ; v45 = 1-;; @002a store user2 v30, v28-;; @002a jump block3+;; v69 = iconst.i32 32+;; v67 = iadd.i32 v9, v69 ; v69 = 32+;; @002a store notrap aligned vmctx v67, v8+;; v70 = iconst.i32 -1342177280+;; v71 = load.i64 notrap aligned readonly can_move v0+8+;; v72 = load.i64 notrap aligned readonly can_move v71+32+;; @002a v33 = iadd v72, v16+;; @002a store notrap aligned v70, v33 ; v70 = -1342177280+;; v73 = load.i64 notrap aligned readonly can_move v0+40+;; v74 = load.i32 notrap aligned readonly can_move v73+;; @002a store notrap aligned v74, v33+4+;; v75 = iconst.i64 32+;; @002a istore32 notrap aligned v75, v33+8 ; v75 = 32+;; @002a jump block4(v9, v33);;-;; block3:-;; v36 = load.i32 notrap v58-;; v53 = iconst.i64 32-;; @002a v19 = iadd.i64 v16, v53 ; v53 = 32-;; @002a store user2 little v36, v19-;; @002d jump block1+;; block3 cold:+;; @002a v21 = iconst.i32 -1342177280+;; @002a v23 = load.i64 notrap aligned readonly can_move v0+40+;; @002a v24 = load.i32 notrap aligned readonly can_move v23+;; @002a v6 = iconst.i32 32+;; @002a v25 = iconst.i32 16+;; @002a v26 = call fn0(v0, v21, v24, v6, v25), stack_map=[i32 @ ss0+0] ; v21 = -1342177280, v6 = 32, v25 = 16+;; @002a v48 = load.i64 notrap aligned readonly can_move v0+8+;; @002a v27 = load.i64 notrap aligned readonly can_move v48+32+;; @002a v28 = uextend.i64 v26+;; @002a v29 = iadd v27, v28+;; @002a jump block4(v26, v29)+;;+;; block4(v38: i32, v39: i64):+;; v47 = iconst.i64 16+;; @002a v40 = iadd v39, v47 ; v47 = 16+;; @002a store.f32 user2 little v2, v40+;; v46 = iconst.i64 20+;; @002a v41 = iadd v39, v46 ; v46 = 20+;; @002a istore8.i32 user2 little v3, v41+;; v43 = load.i32 notrap v52+;; v45 = iconst.i64 24+;; @002a v42 = iadd v39, v45 ; v45 = 24+;; @002a store user2 little v43, v42+;; @002d jump block1(v38);;-;; block1:-;; @002d return v13+;; block1(v5: i32):+;; @002d return v5;; }diff --git a/tests/disas/ref-func-0.wat b/tests/disas/ref-func-0.watindex e9d5cb649d..7266ba4e72 100644--- a/tests/disas/ref-func-0.wat+++ b/tests/disas/ref-func-0.wat@@ -14,222 +14,23 @@(global (export "funcref-local") funcref (ref.func $local)));; function u0:0(i64 vmctx, i64) -> i32, i32, i64, i64 tail {-;; ss0 = explicit_slot 4, align = 4-;; ss1 = explicit_slot 4, align = 4;; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly gv0+8;; gv2 = load.i64 notrap aligned gv1+24;; gv3 = vmctx-;; gv4 = load.i64 notrap aligned readonly can_move gv3+8-;; gv5 = load.i64 notrap aligned readonly can_move gv4+32-;; gv6 = load.i64 notrap aligned gv4+40-;; sig0 = (i64 vmctx) -> i8 tail-;; fn0 = colocated u805306368:45 sig0;; stack_limit = gv2;;;; block0(v0: i64, v1: i64):-;; v189 = iconst.i64 80-;; @008f v7 = iadd v0, v189 ; v189 = 80-;; @008f v8 = load.i32 notrap aligned readonly can_move v7-;; v188 = stack_addr.i64 ss0-;; store notrap v8, v188-;; v187 = stack_addr.i64 ss0-;; v139 = load.i32 notrap v187-;; v186 = iconst.i32 1-;; @008f v9 = band v139, v186 ; v186 = 1-;; v185 = stack_addr.i64 ss0-;; v138 = load.i32 notrap v185-;; v184 = iconst.i32 0-;; @008f v10 = icmp eq v138, v184 ; v184 = 0-;; @008f v11 = uextend.i32 v10-;; @008f v12 = bor v9, v11-;; @008f brif v12, block4, block2-;;-;; block2:-;; v183 = stack_addr.i64 ss0-;; v137 = load.i32 notrap v183-;; @008f v13 = uextend.i64 v137-;; @008f v181 = load.i64 notrap aligned readonly can_move v0+8-;; @008f v14 = load.i64 notrap aligned readonly can_move v181+32-;; @008f v15 = iadd v14, v13-;; @008f v16 = load.i32 user2 v15-;; @008f v17 = iconst.i32 2-;; @008f v18 = band v16, v17 ; v17 = 2-;; @008f brif v18, block4, block3-;;-;; block3:-;; @008f v20 = load.i64 notrap aligned readonly can_move v0+32-;; @008f v21 = load.i32 user2 v20-;; v180 = stack_addr.i64 ss0-;; v136 = load.i32 notrap v180-;; @008f v22 = uextend.i64 v136-;; @008f v178 = load.i64 notrap aligned readonly can_move v0+8-;; @008f v23 = load.i64 notrap aligned readonly can_move v178+32-;; @008f v24 = iadd v23, v22-;; @008f v25 = iconst.i64 16-;; @008f v26 = iadd v24, v25 ; v25 = 16-;; @008f store user2 v21, v26-;; @008f v27 = iconst.i32 2-;; @008f v28 = bor.i32 v16, v27 ; v27 = 2-;; v177 = stack_addr.i64 ss0-;; v135 = load.i32 notrap v177-;; @008f v29 = uextend.i64 v135-;; @008f v175 = load.i64 notrap aligned readonly can_move v0+8-;; @008f v30 = load.i64 notrap aligned readonly can_move v175+32-;; @008f v31 = iadd v30, v29-;; @008f store user2 v28, v31-;; v174 = stack_addr.i64 ss0-;; v134 = load.i32 notrap v174-;; @008f v32 = uextend.i64 v134-;; @008f v172 = load.i64 notrap aligned readonly can_move v0+8-;; @008f v33 = load.i64 notrap aligned readonly can_move v172+32-;; @008f v34 = iadd v33, v32-;; @008f v35 = iconst.i64 8-;; @008f v36 = iadd v34, v35 ; v35 = 8-;; @008f v37 = load.i64 user2 v36-;; v171 = iconst.i64 1-;; @008f v38 = iadd v37, v171 ; v171 = 1-;; v170 = stack_addr.i64 ss0-;; v133 = load.i32 notrap v170-;; @008f v39 = uextend.i64 v133-;; @008f v168 = load.i64 notrap aligned readonly can_move v0+8-;; @008f v40 = load.i64 notrap aligned readonly can_move v168+32-;; @008f v41 = iadd v40, v39-;; @008f v42 = iconst.i64 8-;; @008f v43 = iadd v41, v42 ; v42 = 8-;; @008f store user2 v38, v43-;; v167 = stack_addr.i64 ss0-;; v132 = load.i32 notrap v167-;; @008f store user2 v132, v20-;; @008f v45 = load.i64 notrap aligned readonly can_move v0+32-;; @008f v46 = load.i32 notrap aligned v45+4-;; v166 = iconst.i32 1-;; @008f v47 = iadd v46, v166 ; v166 = 1-;; @008f v49 = load.i64 notrap aligned readonly can_move v0+32-;; @008f store notrap aligned v47, v49+4-;; @008f v51 = load.i64 notrap aligned readonly can_move v0+32-;; @008f v52 = load.i32 notrap aligned v51+4-;; @008f v54 = load.i64 notrap aligned readonly can_move v0+32-;; @008f v55 = load.i32 notrap aligned v54+8-;; @008f v56 = iadd v55, v55-;; @008f v57 = iconst.i32 1024-;; @008f v58 = umax v56, v57 ; v57 = 1024-;; @008f v59 = icmp uge v52, v58-;; @008f brif v59, block5, block6-;;-;; block5 cold:-;; @008f v61 = call fn0(v0), stack_map=[i32 @ ss0+0]-;; @008f jump block6-;;-;; block6:-;; @008f jump block4-;;-;; block4:-;; v165 = iconst.i64 96-;; @0091 v63 = iadd.i64 v0, v165 ; v165 = 96-;; @0091 v64 = load.i32 notrap aligned readonly can_move v63-;; v164 = stack_addr.i64 ss1-;; store notrap v64, v164-;; v163 = stack_addr.i64 ss1-;; v131 = load.i32 notrap v163-;; v162 = iconst.i32 1-;; @0091 v65 = band v131, v162 ; v162 = 1-;; v161 = stack_addr.i64 ss1-;; v130 = load.i32 notrap v161-;; v160 = iconst.i32 0-;; @0091 v66 = icmp eq v130, v160 ; v160 = 0-;; @0091 v67 = uextend.i32 v66-;; @0091 v68 = bor v65, v67-;; @0091 brif v68, block9, block7-;;-;; block7:-;; v159 = stack_addr.i64 ss1-;; v129 = load.i32 notrap v159-;; @0091 v69 = uextend.i64 v129-;; @0091 v157 = load.i64 notrap aligned readonly can_move v0+8-;; @0091 v70 = load.i64 notrap aligned readonly can_move v157+32-;; @0091 v71 = iadd v70, v69-;; @0091 v72 = load.i32 user2 v71-;; @0091 v73 = iconst.i32 2-;; @0091 v74 = band v72, v73 ; v73 = 2-;; @0091 brif v74, block9, block8-;;-;; block8:-;; @0091 v76 = load.i64 notrap aligned readonly can_move v0+32-;; @0091 v77 = load.i32 user2 v76-;; v156 = stack_addr.i64 ss1-;; v128 = load.i32 notrap v156-;; @0091 v78 = uextend.i64 v128-;; @0091 v154 = load.i64 notrap aligned readonly can_move v0+8-;; @0091 v79 = load.i64 notrap aligned readonly can_move v154+32-;; @0091 v80 = iadd v79, v78-;; @0091 v81 = iconst.i64 16-;; @0091 v82 = iadd v80, v81 ; v81 = 16-;; @0091 store user2 v77, v82-;; @0091 v83 = iconst.i32 2-;; @0091 v84 = bor.i32 v72, v83 ; v83 = 2-;; v153 = stack_addr.i64 ss1-;; v127 = load.i32 notrap v153-;; @0091 v85 = uextend.i64 v127-;; @0091 v151 = load.i64 notrap aligned readonly can_move v0+8-;; @0091 v86 = load.i64 notrap aligned readonly can_move v151+32-;; @0091 v87 = iadd v86, v85-;; @0091 store user2 v84, v87-;; v150 = stack_addr.i64 ss1-;; v126 = load.i32 notrap v150-;; @0091 v88 = uextend.i64 v126-;; @0091 v148 = load.i64 notrap aligned readonly can_move v0+8-;; @0091 v89 = load.i64 notrap aligned readonly can_move v148+32-;; @0091 v90 = iadd v89, v88-;; @0091 v91 = iconst.i64 8-;; @0091 v92 = iadd v90, v91 ; v91 = 8-;; @0091 v93 = load.i64 user2 v92-;; v147 = iconst.i64 1-;; @0091 v94 = iadd v93, v147 ; v147 = 1-;; v146 = stack_addr.i64 ss1-;; v125 = load.i32 notrap v146-;; @0091 v95 = uextend.i64 v125-;; @0091 v144 = load.i64 notrap aligned readonly can_move v0+8-;; @0091 v96 = load.i64 notrap aligned readonly can_move v144+32-;; @0091 v97 = iadd v96, v95-;; @0091 v98 = iconst.i64 8-;; @0091 v99 = iadd v97, v98 ; v98 = 8-;; @0091 store user2 v94, v99-;; v143 = stack_addr.i64 ss1-;; v124 = load.i32 notrap v143-;; @0091 store user2 v124, v76-;; @0091 v101 = load.i64 notrap aligned readonly can_move v0+32-;; @0091 v102 = load.i32 notrap aligned v101+4-;; v142 = iconst.i32 1-;; @0091 v103 = iadd v102, v142 ; v142 = 1-;; @0091 v105 = load.i64 notrap aligned readonly can_move v0+32-;; @0091 store notrap aligned v103, v105+4-;; @0091 v107 = load.i64 notrap aligned readonly can_move v0+32-;; @0091 v108 = load.i32 notrap aligned v107+4-;; @0091 v110 = load.i64 notrap aligned readonly can_move v0+32-;; @0091 v111 = load.i32 notrap aligned v110+8-;; @0091 v112 = iadd v111, v111-;; @0091 v113 = iconst.i32 1024-;; @0091 v114 = umax v112, v113 ; v113 = 1024-;; @0091 v115 = icmp uge v108, v114-;; @0091 brif v115, block10, block11-;;-;; block10 cold:-;; @0091 v117 = call fn0(v0), stack_map=[i32 @ ss0+0, i32 @ ss1+0]-;; @0091 jump block11-;;-;; block11:-;; @0091 jump block9-;;-;; block9:-;; @0093 v119 = load.i64 notrap aligned table v0+112-;; @0095 v121 = load.i64 notrap aligned table v0+128-;; v141 = stack_addr.i64 ss0-;; v122 = load.i32 notrap v141-;; v140 = stack_addr.i64 ss1-;; v123 = load.i32 notrap v140+;; v17 = iconst.i64 80+;; @008f v7 = iadd v0, v17 ; v17 = 80+;; @008f v8 = load.i32 notrap aligned v7+;; v16 = iconst.i64 96+;; @0091 v10 = iadd v0, v16 ; v16 = 96+;; @0091 v11 = load.i32 notrap aligned v10+;; @0093 v13 = load.i64 notrap aligned table v0+112+;; @0095 v15 = load.i64 notrap aligned table v0+128;; @0097 jump block1;;;; block1:-;; @0097 return v122, v123, v119, v121+;; @0097 return v8, v11, v13, v15;; }diff --git a/tests/disas/table-get-fixed-size.wat b/tests/disas/table-get-fixed-size.watindex 1c9a338314..eaacb0b51e 100644--- a/tests/disas/table-get-fixed-size.wat+++ b/tests/disas/table-get-fixed-size.wat@@ -16,17 +16,11 @@table.get 0));; function u0:0(i64 vmctx, i64) -> i32 tail {-;; ss0 = explicit_slot 4, align = 4;; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly gv0+8;; gv2 = load.i64 notrap aligned gv1+24;; gv3 = vmctx;; gv4 = load.i64 notrap aligned readonly can_move gv3+48-;; gv5 = load.i64 notrap aligned readonly can_move gv3+8-;; gv6 = load.i64 notrap aligned readonly can_move gv5+32-;; gv7 = load.i64 notrap aligned gv5+40-;; sig0 = (i64 vmctx) -> i8 tail-;; fn0 = colocated u805306368:45 sig0;; stack_limit = gv2;;;; block0(v0: i64, v1: i64):@@ -35,126 +29,24 @@;; @0054 v5 = icmp uge v3, v4 ; v3 = 0, v4 = 7;; @0054 v6 = uextend.i64 v3 ; v3 = 0;; @0054 v7 = load.i64 notrap aligned readonly can_move v0+48-;; v99 = iconst.i64 2-;; @0054 v8 = ishl v6, v99 ; v99 = 2+;; v13 = iconst.i64 2+;; @0054 v8 = ishl v6, v13 ; v13 = 2;; @0054 v9 = iadd v7, v8;; @0054 v10 = iconst.i64 0;; @0054 v11 = select_spectre_guard v5, v10, v9 ; v10 = 0;; @0054 v12 = load.i32 user6 aligned table v11-;; v98 = stack_addr.i64 ss0-;; store notrap v12, v98-;; v97 = stack_addr.i64 ss0-;; v74 = load.i32 notrap v97-;; v96 = iconst.i32 1-;; @0054 v13 = band v74, v96 ; v96 = 1-;; v95 = stack_addr.i64 ss0-;; v73 = load.i32 notrap v95-;; v94 = iconst.i32 0-;; @0054 v14 = icmp eq v73, v94 ; v94 = 0-;; @0054 v15 = uextend.i32 v14-;; @0054 v16 = bor v13, v15-;; @0054 brif v16, block4, block2-;;-;; block2:-;; v93 = stack_addr.i64 ss0-;; v72 = load.i32 notrap v93-;; @0054 v17 = uextend.i64 v72-;; @0054 v91 = load.i64 notrap aligned readonly can_move v0+8-;; @0054 v18 = load.i64 notrap aligned readonly can_move v91+32-;; @0054 v19 = iadd v18, v17-;; @0054 v20 = load.i32 user2 v19-;; @0054 v21 = iconst.i32 2-;; @0054 v22 = band v20, v21 ; v21 = 2-;; @0054 brif v22, block4, block3-;;-;; block3:-;; @0054 v24 = load.i64 notrap aligned readonly can_move v0+32-;; @0054 v25 = load.i32 user2 v24-;; v90 = stack_addr.i64 ss0-;; v71 = load.i32 notrap v90-;; @0054 v26 = uextend.i64 v71-;; @0054 v88 = load.i64 notrap aligned readonly can_move v0+8-;; @0054 v27 = load.i64 notrap aligned readonly can_move v88+32-;; @0054 v28 = iadd v27, v26-;; @0054 v29 = iconst.i64 16-;; @0054 v30 = iadd v28, v29 ; v29 = 16-;; @0054 store user2 v25, v30-;; @0054 v31 = iconst.i32 2-;; @0054 v32 = bor.i32 v20, v31 ; v31 = 2-;; v87 = stack_addr.i64 ss0-;; v70 = load.i32 notrap v87-;; @0054 v33 = uextend.i64 v70-;; @0054 v85 = load.i64 notrap aligned readonly can_move v0+8-;; @0054 v34 = load.i64 notrap aligned readonly can_move v85+32-;; @0054 v35 = iadd v34, v33-;; @0054 store user2 v32, v35-;; v84 = stack_addr.i64 ss0-;; v69 = load.i32 notrap v84-;; @0054 v36 = uextend.i64 v69-;; @0054 v82 = load.i64 notrap aligned readonly can_move v0+8-;; @0054 v37 = load.i64 notrap aligned readonly can_move v82+32-;; @0054 v38 = iadd v37, v36-;; @0054 v39 = iconst.i64 8-;; @0054 v40 = iadd v38, v39 ; v39 = 8-;; @0054 v41 = load.i64 user2 v40-;; v81 = iconst.i64 1-;; @0054 v42 = iadd v41, v81 ; v81 = 1-;; v80 = stack_addr.i64 ss0-;; v68 = load.i32 notrap v80-;; @0054 v43 = uextend.i64 v68-;; @0054 v78 = load.i64 notrap aligned readonly can_move v0+8-;; @0054 v44 = load.i64 notrap aligned readonly can_move v78+32-;; @0054 v45 = iadd v44, v43-;; @0054 v46 = iconst.i64 8-;; @0054 v47 = iadd v45, v46 ; v46 = 8-;; @0054 store user2 v42, v47-;; v77 = stack_addr.i64 ss0-;; v67 = load.i32 notrap v77-;; @0054 store user2 v67, v24-;; @0054 v49 = load.i64 notrap aligned readonly can_move v0+32-;; @0054 v50 = load.i32 notrap aligned v49+4-;; v76 = iconst.i32 1-;; @0054 v51 = iadd v50, v76 ; v76 = 1-;; @0054 v53 = load.i64 notrap aligned readonly can_move v0+32-;; @0054 store notrap aligned v51, v53+4-;; @0054 v55 = load.i64 notrap aligned readonly can_move v0+32-;; @0054 v56 = load.i32 notrap aligned v55+4-;; @0054 v58 = load.i64 notrap aligned readonly can_move v0+32-;; @0054 v59 = load.i32 notrap aligned v58+8-;; @0054 v60 = iadd v59, v59-;; @0054 v61 = iconst.i32 1024-;; @0054 v62 = umax v60, v61 ; v61 = 1024-;; @0054 v63 = icmp uge v56, v62-;; @0054 brif v63, block5, block6-;;-;; block5 cold:-;; @0054 v65 = call fn0(v0), stack_map=[i32 @ ss0+0]-;; @0054 jump block6-;;-;; block6:-;; @0054 jump block4-;;-;; block4:-;; v75 = stack_addr.i64 ss0-;; v66 = load.i32 notrap v75;; @0056 jump block1;;;; block1:-;; @0056 return v66+;; @0056 return v12;; };;;; function u0:1(i64 vmctx, i64, i32) -> i32 tail {-;; ss0 = explicit_slot 4, align = 4;; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly gv0+8;; gv2 = load.i64 notrap aligned gv1+24;; gv3 = vmctx;; gv4 = load.i64 notrap aligned readonly can_move gv3+48-;; gv5 = load.i64 notrap aligned readonly can_move gv3+8-;; gv6 = load.i64 notrap aligned readonly can_move gv5+32-;; gv7 = load.i64 notrap aligned gv5+40-;; sig0 = (i64 vmctx) -> i8 tail-;; fn0 = colocated u805306368:45 sig0;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):@@ -162,110 +54,14 @@;; @005b v5 = icmp uge v2, v4 ; v4 = 7;; @005b v6 = uextend.i64 v2;; @005b v7 = load.i64 notrap aligned readonly can_move v0+48-;; v99 = iconst.i64 2-;; @005b v8 = ishl v6, v99 ; v99 = 2+;; v13 = iconst.i64 2+;; @005b v8 = ishl v6, v13 ; v13 = 2;; @005b v9 = iadd v7, v8;; @005b v10 = iconst.i64 0;; @005b v11 = select_spectre_guard v5, v10, v9 ; v10 = 0;; @005b v12 = load.i32 user6 aligned table v11-;; v98 = stack_addr.i64 ss0-;; store notrap v12, v98-;; v97 = stack_addr.i64 ss0-;; v74 = load.i32 notrap v97-;; v96 = iconst.i32 1-;; @005b v13 = band v74, v96 ; v96 = 1-;; v95 = stack_addr.i64 ss0-;; v73 = load.i32 notrap v95-;; v94 = iconst.i32 0-;; @005b v14 = icmp eq v73, v94 ; v94 = 0-;; @005b v15 = uextend.i32 v14-;; @005b v16 = bor v13, v15-;; @005b brif v16, block4, block2-;;-;; block2:-;; v93 = stack_addr.i64 ss0-;; v72 = load.i32 notrap v93-;; @005b v17 = uextend.i64 v72-;; @005b v91 = load.i64 notrap aligned readonly can_move v0+8-;; @005b v18 = load.i64 notrap aligned readonly can_move v91+32-;; @005b v19 = iadd v18, v17-;; @005b v20 = load.i32 user2 v19-;; @005b v21 = iconst.i32 2-;; @005b v22 = band v20, v21 ; v21 = 2-;; @005b brif v22, block4, block3-;;-;; block3:-;; @005b v24 = load.i64 notrap aligned readonly can_move v0+32-;; @005b v25 = load.i32 user2 v24-;; v90 = stack_addr.i64 ss0-;; v71 = load.i32 notrap v90-;; @005b v26 = uextend.i64 v71-;; @005b v88 = load.i64 notrap aligned readonly can_move v0+8-;; @005b v27 = load.i64 notrap aligned readonly can_move v88+32-;; @005b v28 = iadd v27, v26-;; @005b v29 = iconst.i64 16-;; @005b v30 = iadd v28, v29 ; v29 = 16-;; @005b store user2 v25, v30-;; @005b v31 = iconst.i32 2-;; @005b v32 = bor.i32 v20, v31 ; v31 = 2-;; v87 = stack_addr.i64 ss0-;; v70 = load.i32 notrap v87-;; @005b v33 = uextend.i64 v70-;; @005b v85 = load.i64 notrap aligned readonly can_move v0+8-;; @005b v34 = load.i64 notrap aligned readonly can_move v85+32-;; @005b v35 = iadd v34, v33-;; @005b store user2 v32, v35-;; v84 = stack_addr.i64 ss0-;; v69 = load.i32 notrap v84-;; @005b v36 = uextend.i64 v69-;; @005b v82 = load.i64 notrap aligned readonly can_move v0+8-;; @005b v37 = load.i64 notrap aligned readonly can_move v82+32-;; @005b v38 = iadd v37, v36-;; @005b v39 = iconst.i64 8-;; @005b v40 = iadd v38, v39 ; v39 = 8-;; @005b v41 = load.i64 user2 v40-;; v81 = iconst.i64 1-;; @005b v42 = iadd v41, v81 ; v81 = 1-;; v80 = stack_addr.i64 ss0-;; v68 = load.i32 notrap v80-;; @005b v43 = uextend.i64 v68-;; @005b v78 = load.i64 notrap aligned readonly can_move v0+8-;; @005b v44 = load.i64 notrap aligned readonly can_move v78+32-;; @005b v45 = iadd v44, v43-;; @005b v46 = iconst.i64 8-;; @005b v47 = iadd v45, v46 ; v46 = 8-;; @005b store user2 v42, v47-;; v77 = stack_addr.i64 ss0-;; v67 = load.i32 notrap v77-;; @005b store user2 v67, v24-;; @005b v49 = load.i64 notrap aligned readonly can_move v0+32-;; @005b v50 = load.i32 notrap aligned v49+4-;; v76 = iconst.i32 1-;; @005b v51 = iadd v50, v76 ; v76 = 1-;; @005b v53 = load.i64 notrap aligned readonly can_move v0+32-;; @005b store notrap aligned v51, v53+4-;; @005b v55 = load.i64 notrap aligned readonly can_move v0+32-;; @005b v56 = load.i32 notrap aligned v55+4-;; @005b v58 = load.i64 notrap aligned readonly can_move v0+32-;; @005b v59 = load.i32 notrap aligned v58+8-;; @005b v60 = iadd v59, v59-;; @005b v61 = iconst.i32 1024-;; @005b v62 = umax v60, v61 ; v61 = 1024-;; @005b v63 = icmp uge v56, v62-;; @005b brif v63, block5, block6-;;-;; block5 cold:-;; @005b v65 = call fn0(v0), stack_map=[i32 @ ss0+0]-;; @005b jump block6-;;-;; block6:-;; @005b jump block4-;;-;; block4:-;; v75 = stack_addr.i64 ss0-;; v66 = load.i32 notrap v75;; @005d jump block1;;;; block1:-;; @005d return v66+;; @005d return v12;; }diff --git a/tests/disas/table-get.wat b/tests/disas/table-get.watindex 06bda0d3a8..2357d3a4cc 100644--- a/tests/disas/table-get.wat+++ b/tests/disas/table-get.wat@@ -15,18 +15,12 @@table.get 0));; function u0:0(i64 vmctx, i64) -> i32 tail {-;; ss0 = explicit_slot 4, align = 4;; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly gv0+8;; gv2 = load.i64 notrap aligned gv1+24;; gv3 = vmctx;; gv4 = load.i64 notrap aligned gv3+48;; gv5 = load.i64 notrap aligned gv3+56-;; gv6 = load.i64 notrap aligned readonly can_move gv3+8-;; gv7 = load.i64 notrap aligned readonly can_move gv6+32-;; gv8 = load.i64 notrap aligned gv6+40-;; sig0 = (i64 vmctx) -> i8 tail-;; fn0 = colocated u805306368:45 sig0;; stack_limit = gv2;;;; block0(v0: i64, v1: i64):@@ -36,127 +30,25 @@;; @0053 v6 = icmp uge v3, v5 ; v3 = 0;; @0053 v7 = uextend.i64 v3 ; v3 = 0;; @0053 v8 = load.i64 notrap aligned v0+48-;; v100 = iconst.i64 2-;; @0053 v9 = ishl v7, v100 ; v100 = 2+;; v14 = iconst.i64 2+;; @0053 v9 = ishl v7, v14 ; v14 = 2;; @0053 v10 = iadd v8, v9;; @0053 v11 = iconst.i64 0;; @0053 v12 = select_spectre_guard v6, v11, v10 ; v11 = 0;; @0053 v13 = load.i32 user6 aligned table v12-;; v99 = stack_addr.i64 ss0-;; store notrap v13, v99-;; v98 = stack_addr.i64 ss0-;; v75 = load.i32 notrap v98-;; v97 = iconst.i32 1-;; @0053 v14 = band v75, v97 ; v97 = 1-;; v96 = stack_addr.i64 ss0-;; v74 = load.i32 notrap v96-;; v95 = iconst.i32 0-;; @0053 v15 = icmp eq v74, v95 ; v95 = 0-;; @0053 v16 = uextend.i32 v15-;; @0053 v17 = bor v14, v16-;; @0053 brif v17, block4, block2-;;-;; block2:-;; v94 = stack_addr.i64 ss0-;; v73 = load.i32 notrap v94-;; @0053 v18 = uextend.i64 v73-;; @0053 v92 = load.i64 notrap aligned readonly can_move v0+8-;; @0053 v19 = load.i64 notrap aligned readonly can_move v92+32-;; @0053 v20 = iadd v19, v18-;; @0053 v21 = load.i32 user2 v20-;; @0053 v22 = iconst.i32 2-;; @0053 v23 = band v21, v22 ; v22 = 2-;; @0053 brif v23, block4, block3-;;-;; block3:-;; @0053 v25 = load.i64 notrap aligned readonly can_move v0+32-;; @0053 v26 = load.i32 user2 v25-;; v91 = stack_addr.i64 ss0-;; v72 = load.i32 notrap v91-;; @0053 v27 = uextend.i64 v72-;; @0053 v89 = load.i64 notrap aligned readonly can_move v0+8-;; @0053 v28 = load.i64 notrap aligned readonly can_move v89+32-;; @0053 v29 = iadd v28, v27-;; @0053 v30 = iconst.i64 16-;; @0053 v31 = iadd v29, v30 ; v30 = 16-;; @0053 store user2 v26, v31-;; @0053 v32 = iconst.i32 2-;; @0053 v33 = bor.i32 v21, v32 ; v32 = 2-;; v88 = stack_addr.i64 ss0-;; v71 = load.i32 notrap v88-;; @0053 v34 = uextend.i64 v71-;; @0053 v86 = load.i64 notrap aligned readonly can_move v0+8-;; @0053 v35 = load.i64 notrap aligned readonly can_move v86+32-;; @0053 v36 = iadd v35, v34-;; @0053 store user2 v33, v36-;; v85 = stack_addr.i64 ss0-;; v70 = load.i32 notrap v85-;; @0053 v37 = uextend.i64 v70-;; @0053 v83 = load.i64 notrap aligned readonly can_move v0+8-;; @0053 v38 = load.i64 notrap aligned readonly can_move v83+32-;; @0053 v39 = iadd v38, v37-;; @0053 v40 = iconst.i64 8-;; @0053 v41 = iadd v39, v40 ; v40 = 8-;; @0053 v42 = load.i64 user2 v41-;; v82 = iconst.i64 1-;; @0053 v43 = iadd v42, v82 ; v82 = 1-;; v81 = stack_addr.i64 ss0-;; v69 = load.i32 notrap v81-;; @0053 v44 = uextend.i64 v69-;; @0053 v79 = load.i64 notrap aligned readonly can_move v0+8-;; @0053 v45 = load.i64 notrap aligned readonly can_move v79+32-;; @0053 v46 = iadd v45, v44-;; @0053 v47 = iconst.i64 8-;; @0053 v48 = iadd v46, v47 ; v47 = 8-;; @0053 store user2 v43, v48-;; v78 = stack_addr.i64 ss0-;; v68 = load.i32 notrap v78-;; @0053 store user2 v68, v25-;; @0053 v50 = load.i64 notrap aligned readonly can_move v0+32-;; @0053 v51 = load.i32 notrap aligned v50+4-;; v77 = iconst.i32 1-;; @0053 v52 = iadd v51, v77 ; v77 = 1-;; @0053 v54 = load.i64 notrap aligned readonly can_move v0+32-;; @0053 store notrap aligned v52, v54+4-;; @0053 v56 = load.i64 notrap aligned readonly can_move v0+32-;; @0053 v57 = load.i32 notrap aligned v56+4-;; @0053 v59 = load.i64 notrap aligned readonly can_move v0+32-;; @0053 v60 = load.i32 notrap aligned v59+8-;; @0053 v61 = iadd v60, v60-;; @0053 v62 = iconst.i32 1024-;; @0053 v63 = umax v61, v62 ; v62 = 1024-;; @0053 v64 = icmp uge v57, v63-;; @0053 brif v64, block5, block6-;;-;; block5 cold:-;; @0053 v66 = call fn0(v0), stack_map=[i32 @ ss0+0]-;; @0053 jump block6-;;-;; block6:-;; @0053 jump block4-;;-;; block4:-;; v76 = stack_addr.i64 ss0-;; v67 = load.i32 notrap v76;; @0055 jump block1;;;; block1:-;; @0055 return v67+;; @0055 return v13;; };;;; function u0:1(i64 vmctx, i64, i32) -> i32 tail {-;; ss0 = explicit_slot 4, align = 4;; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly gv0+8;; gv2 = load.i64 notrap aligned gv1+24;; gv3 = vmctx;; gv4 = load.i64 notrap aligned gv3+48;; gv5 = load.i64 notrap aligned gv3+56-;; gv6 = load.i64 notrap aligned readonly can_move gv3+8-;; gv7 = load.i64 notrap aligned readonly can_move gv6+32-;; gv8 = load.i64 notrap aligned gv6+40-;; sig0 = (i64 vmctx) -> i8 tail-;; fn0 = colocated u805306368:45 sig0;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):@@ -165,110 +57,14 @@;; @005a v6 = icmp uge v2, v5;; @005a v7 = uextend.i64 v2;; @005a v8 = load.i64 notrap aligned v0+48-;; v100 = iconst.i64 2-;; @005a v9 = ishl v7, v100 ; v100 = 2+;; v14 = iconst.i64 2+;; @005a v9 = ishl v7, v14 ; v14 = 2;; @005a v10 = iadd v8, v9;; @005a v11 = iconst.i64 0;; @005a v12 = select_spectre_guard v6, v11, v10 ; v11 = 0;; @005a v13 = load.i32 user6 aligned table v12-;; v99 = stack_addr.i64 ss0-;; store notrap v13, v99-;; v98 = stack_addr.i64 ss0-;; v75 = load.i32 notrap v98-;; v97 = iconst.i32 1-;; @005a v14 = band v75, v97 ; v97 = 1-;; v96 = stack_addr.i64 ss0-;; v74 = load.i32 notrap v96-;; v95 = iconst.i32 0-;; @005a v15 = icmp eq v74, v95 ; v95 = 0-;; @005a v16 = uextend.i32 v15-;; @005a v17 = bor v14, v16-;; @005a brif v17, block4, block2-;;-;; block2:-;; v94 = stack_addr.i64 ss0-;; v73 = load.i32 notrap v94-;; @005a v18 = uextend.i64 v73-;; @005a v92 = load.i64 notrap aligned readonly can_move v0+8-;; @005a v19 = load.i64 notrap aligned readonly can_move v92+32-;; @005a v20 = iadd v19, v18-;; @005a v21 = load.i32 user2 v20-;; @005a v22 = iconst.i32 2-;; @005a v23 = band v21, v22 ; v22 = 2-;; @005a brif v23, block4, block3-;;-;; block3:-;; @005a v25 = load.i64 notrap aligned readonly can_move v0+32-;; @005a v26 = load.i32 user2 v25-;; v91 = stack_addr.i64 ss0-;; v72 = load.i32 notrap v91-;; @005a v27 = uextend.i64 v72-;; @005a v89 = load.i64 notrap aligned readonly can_move v0+8-;; @005a v28 = load.i64 notrap aligned readonly can_move v89+32-;; @005a v29 = iadd v28, v27-;; @005a v30 = iconst.i64 16-;; @005a v31 = iadd v29, v30 ; v30 = 16-;; @005a store user2 v26, v31-;; @005a v32 = iconst.i32 2-;; @005a v33 = bor.i32 v21, v32 ; v32 = 2-;; v88 = stack_addr.i64 ss0-;; v71 = load.i32 notrap v88-;; @005a v34 = uextend.i64 v71-;; @005a v86 = load.i64 notrap aligned readonly can_move v0+8-;; @005a v35 = load.i64 notrap aligned readonly can_move v86+32-;; @005a v36 = iadd v35, v34-;; @005a store user2 v33, v36-;; v85 = stack_addr.i64 ss0-;; v70 = load.i32 notrap v85-;; @005a v37 = uextend.i64 v70-;; @005a v83 = load.i64 notrap aligned readonly can_move v0+8-;; @005a v38 = load.i64 notrap aligned readonly can_move v83+32-;; @005a v39 = iadd v38, v37-;; @005a v40 = iconst.i64 8-;; @005a v41 = iadd v39, v40 ; v40 = 8-;; @005a v42 = load.i64 user2 v41-;; v82 = iconst.i64 1-;; @005a v43 = iadd v42, v82 ; v82 = 1-;; v81 = stack_addr.i64 ss0-;; v69 = load.i32 notrap v81-;; @005a v44 = uextend.i64 v69-;; @005a v79 = load.i64 notrap aligned readonly can_move v0+8-;; @005a v45 = load.i64 notrap aligned readonly can_move v79+32-;; @005a v46 = iadd v45, v44-;; @005a v47 = iconst.i64 8-;; @005a v48 = iadd v46, v47 ; v47 = 8-;; @005a store user2 v43, v48-;; v78 = stack_addr.i64 ss0-;; v68 = load.i32 notrap v78-;; @005a store user2 v68, v25-;; @005a v50 = load.i64 notrap aligned readonly can_move v0+32-;; @005a v51 = load.i32 notrap aligned v50+4-;; v77 = iconst.i32 1-;; @005a v52 = iadd v51, v77 ; v77 = 1-;; @005a v54 = load.i64 notrap aligned readonly can_move v0+32-;; @005a store notrap aligned v52, v54+4-;; @005a v56 = load.i64 notrap aligned readonly can_move v0+32-;; @005a v57 = load.i32 notrap aligned v56+4-;; @005a v59 = load.i64 notrap aligned readonly can_move v0+32-;; @005a v60 = load.i32 notrap aligned v59+8-;; @005a v61 = iadd v60, v60-;; @005a v62 = iconst.i32 1024-;; @005a v63 = umax v61, v62 ; v62 = 1024-;; @005a v64 = icmp uge v57, v63-;; @005a brif v64, block5, block6-;;-;; block5 cold:-;; @005a v66 = call fn0(v0), stack_map=[i32 @ ss0+0]-;; @005a jump block6-;;-;; block6:-;; @005a jump block4-;;-;; block4:-;; v76 = stack_addr.i64 ss0-;; v67 = load.i32 notrap v76;; @005c jump block1;;;; block1:-;; @005c return v67+;; @005c return v13;; }diff --git a/tests/disas/table-set-fixed-size.wat b/tests/disas/table-set-fixed-size.watindex 9b25054efb..2b60122f7e 100644--- a/tests/disas/table-set-fixed-size.wat+++ b/tests/disas/table-set-fixed-size.wat@@ -22,11 +22,6 @@;; gv2 = load.i64 notrap aligned gv1+24;; gv3 = vmctx;; gv4 = load.i64 notrap aligned readonly can_move gv3+48-;; gv5 = load.i64 notrap aligned readonly can_move gv3+8-;; gv6 = load.i64 notrap aligned readonly can_move gv5+32-;; gv7 = load.i64 notrap aligned gv5+40-;; sig0 = (i64 vmctx, i32) tail-;; fn0 = colocated u805306368:22 sig0;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):@@ -35,78 +30,12 @@;; @0056 v5 = icmp uge v3, v4 ; v3 = 0, v4 = 7;; @0056 v6 = uextend.i64 v3 ; v3 = 0;; @0056 v7 = load.i64 notrap aligned readonly can_move v0+48-;; v62 = iconst.i64 2-;; @0056 v8 = ishl v6, v62 ; v62 = 2+;; v12 = iconst.i64 2+;; @0056 v8 = ishl v6, v12 ; v12 = 2;; @0056 v9 = iadd v7, v8;; @0056 v10 = iconst.i64 0;; @0056 v11 = select_spectre_guard v5, v10, v9 ; v10 = 0-;; @0056 v12 = load.i32 user6 aligned table v11-;; v61 = iconst.i32 1-;; @0056 v13 = band v2, v61 ; v61 = 1-;; v60 = iconst.i32 0-;; @0056 v14 = icmp eq v2, v60 ; v60 = 0-;; @0056 v15 = uextend.i32 v14-;; @0056 v16 = bor v13, v15-;; @0056 brif v16, block3, block2-;;-;; block2:-;; @0056 v17 = uextend.i64 v2-;; @0056 v58 = load.i64 notrap aligned readonly can_move v0+8-;; @0056 v18 = load.i64 notrap aligned readonly can_move v58+32-;; @0056 v19 = iadd v18, v17-;; @0056 v20 = iconst.i64 8-;; @0056 v21 = iadd v19, v20 ; v20 = 8-;; @0056 v22 = load.i64 user2 v21-;; v57 = iconst.i64 1-;; @0056 v23 = iadd v22, v57 ; v57 = 1-;; @0056 v24 = uextend.i64 v2-;; @0056 v55 = load.i64 notrap aligned readonly can_move v0+8-;; @0056 v25 = load.i64 notrap aligned readonly can_move v55+32-;; @0056 v26 = iadd v25, v24-;; @0056 v27 = iconst.i64 8-;; @0056 v28 = iadd v26, v27 ; v27 = 8-;; @0056 store user2 v23, v28-;; @0056 jump block3-;;-;; block3:-;; @0056 store.i32 user6 aligned table v2, v11-;; v54 = iconst.i32 1-;; @0056 v29 = band.i32 v12, v54 ; v54 = 1-;; v53 = iconst.i32 0-;; @0056 v30 = icmp.i32 eq v12, v53 ; v53 = 0-;; @0056 v31 = uextend.i32 v30-;; @0056 v32 = bor v29, v31-;; @0056 brif v32, block7, block4-;;-;; block4:-;; @0056 v33 = uextend.i64 v12-;; @0056 v51 = load.i64 notrap aligned readonly can_move v0+8-;; @0056 v34 = load.i64 notrap aligned readonly can_move v51+32-;; @0056 v35 = iadd v34, v33-;; @0056 v36 = iconst.i64 8-;; @0056 v37 = iadd v35, v36 ; v36 = 8-;; @0056 v38 = load.i64 user2 v37-;; v50 = iconst.i64 -1-;; @0056 v39 = iadd v38, v50 ; v50 = -1-;; v49 = iconst.i64 0-;; @0056 v40 = icmp eq v39, v49 ; v49 = 0-;; @0056 brif v40, block5, block6-;;-;; block5 cold:-;; @0056 call fn0(v0, v12)-;; @0056 jump block7-;;-;; block6:-;; @0056 v42 = uextend.i64 v12-;; @0056 v47 = load.i64 notrap aligned readonly can_move v0+8-;; @0056 v43 = load.i64 notrap aligned readonly can_move v47+32-;; @0056 v44 = iadd v43, v42-;; @0056 v45 = iconst.i64 8-;; @0056 v46 = iadd v44, v45 ; v45 = 8-;; @0056 store.i64 user2 v39, v46-;; @0056 jump block7-;;-;; block7:+;; @0056 store user6 aligned table v2, v11;; @0058 jump block1;;;; block1:@@ -119,11 +48,6 @@;; gv2 = load.i64 notrap aligned gv1+24;; gv3 = vmctx;; gv4 = load.i64 notrap aligned readonly can_move gv3+48-;; gv5 = load.i64 notrap aligned readonly can_move gv3+8-;; gv6 = load.i64 notrap aligned readonly can_move gv5+32-;; gv7 = load.i64 notrap aligned gv5+40-;; sig0 = (i64 vmctx, i32) tail-;; fn0 = colocated u805306368:22 sig0;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):@@ -131,78 +55,12 @@;; @005f v5 = icmp uge v2, v4 ; v4 = 7;; @005f v6 = uextend.i64 v2;; @005f v7 = load.i64 notrap aligned readonly can_move v0+48-;; v62 = iconst.i64 2-;; @005f v8 = ishl v6, v62 ; v62 = 2+;; v12 = iconst.i64 2+;; @005f v8 = ishl v6, v12 ; v12 = 2;; @005f v9 = iadd v7, v8;; @005f v10 = iconst.i64 0;; @005f v11 = select_spectre_guard v5, v10, v9 ; v10 = 0-;; @005f v12 = load.i32 user6 aligned table v11-;; v61 = iconst.i32 1-;; @005f v13 = band v3, v61 ; v61 = 1-;; v60 = iconst.i32 0-;; @005f v14 = icmp eq v3, v60 ; v60 = 0-;; @005f v15 = uextend.i32 v14-;; @005f v16 = bor v13, v15-;; @005f brif v16, block3, block2-;;-;; block2:-;; @005f v17 = uextend.i64 v3-;; @005f v58 = load.i64 notrap aligned readonly can_move v0+8-;; @005f v18 = load.i64 notrap aligned readonly can_move v58+32-;; @005f v19 = iadd v18, v17-;; @005f v20 = iconst.i64 8-;; @005f v21 = iadd v19, v20 ; v20 = 8-;; @005f v22 = load.i64 user2 v21-;; v57 = iconst.i64 1-;; @005f v23 = iadd v22, v57 ; v57 = 1-;; @005f v24 = uextend.i64 v3-;; @005f v55 = load.i64 notrap aligned readonly can_move v0+8-;; @005f v25 = load.i64 notrap aligned readonly can_move v55+32-;; @005f v26 = iadd v25, v24-;; @005f v27 = iconst.i64 8-;; @005f v28 = iadd v26, v27 ; v27 = 8-;; @005f store user2 v23, v28-;; @005f jump block3-;;-;; block3:-;; @005f store.i32 user6 aligned table v3, v11-;; v54 = iconst.i32 1-;; @005f v29 = band.i32 v12, v54 ; v54 = 1-;; v53 = iconst.i32 0-;; @005f v30 = icmp.i32 eq v12, v53 ; v53 = 0-;; @005f v31 = uextend.i32 v30-;; @005f v32 = bor v29, v31-;; @005f brif v32, block7, block4-;;-;; block4:-;; @005f v33 = uextend.i64 v12-;; @005f v51 = load.i64 notrap aligned readonly can_move v0+8-;; @005f v34 = load.i64 notrap aligned readonly can_move v51+32-;; @005f v35 = iadd v34, v33-;; @005f v36 = iconst.i64 8-;; @005f v37 = iadd v35, v36 ; v36 = 8-;; @005f v38 = load.i64 user2 v37-;; v50 = iconst.i64 -1-;; @005f v39 = iadd v38, v50 ; v50 = -1-;; v49 = iconst.i64 0-;; @005f v40 = icmp eq v39, v49 ; v49 = 0-;; @005f brif v40, block5, block6-;;-;; block5 cold:-;; @005f call fn0(v0, v12)-;; @005f jump block7-;;-;; block6:-;; @005f v42 = uextend.i64 v12-;; @005f v47 = load.i64 notrap aligned readonly can_move v0+8-;; @005f v43 = load.i64 notrap aligned readonly can_move v47+32-;; @005f v44 = iadd v43, v42-;; @005f v45 = iconst.i64 8-;; @005f v46 = iadd v44, v45 ; v45 = 8-;; @005f store.i64 user2 v39, v46-;; @005f jump block7-;;-;; block7:+;; @005f store user6 aligned table v3, v11;; @0061 jump block1;;;; block1:diff --git a/tests/disas/table-set.wat b/tests/disas/table-set.watindex ea6d2e759a..5a51ec61a4 100644--- a/tests/disas/table-set.wat+++ b/tests/disas/table-set.wat@@ -23,11 +23,6 @@;; gv3 = vmctx;; gv4 = load.i64 notrap aligned gv3+48;; gv5 = load.i64 notrap aligned gv3+56-;; gv6 = load.i64 notrap aligned readonly can_move gv3+8-;; gv7 = load.i64 notrap aligned readonly can_move gv6+32-;; gv8 = load.i64 notrap aligned gv6+40-;; sig0 = (i64 vmctx, i32) tail-;; fn0 = colocated u805306368:22 sig0;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):@@ -37,78 +32,12 @@;; @0055 v6 = icmp uge v3, v5 ; v3 = 0;; @0055 v7 = uextend.i64 v3 ; v3 = 0;; @0055 v8 = load.i64 notrap aligned v0+48-;; v63 = iconst.i64 2-;; @0055 v9 = ishl v7, v63 ; v63 = 2+;; v13 = iconst.i64 2+;; @0055 v9 = ishl v7, v13 ; v13 = 2;; @0055 v10 = iadd v8, v9;; @0055 v11 = iconst.i64 0;; @0055 v12 = select_spectre_guard v6, v11, v10 ; v11 = 0-;; @0055 v13 = load.i32 user6 aligned table v12-;; v62 = iconst.i32 1-;; @0055 v14 = band v2, v62 ; v62 = 1-;; v61 = iconst.i32 0-;; @0055 v15 = icmp eq v2, v61 ; v61 = 0-;; @0055 v16 = uextend.i32 v15-;; @0055 v17 = bor v14, v16-;; @0055 brif v17, block3, block2-;;-;; block2:-;; @0055 v18 = uextend.i64 v2-;; @0055 v59 = load.i64 notrap aligned readonly can_move v0+8-;; @0055 v19 = load.i64 notrap aligned readonly can_move v59+32-;; @0055 v20 = iadd v19, v18-;; @0055 v21 = iconst.i64 8-;; @0055 v22 = iadd v20, v21 ; v21 = 8-;; @0055 v23 = load.i64 user2 v22-;; v58 = iconst.i64 1-;; @0055 v24 = iadd v23, v58 ; v58 = 1-;; @0055 v25 = uextend.i64 v2-;; @0055 v56 = load.i64 notrap aligned readonly can_move v0+8-;; @0055 v26 = load.i64 notrap aligned readonly can_move v56+32-;; @0055 v27 = iadd v26, v25-;; @0055 v28 = iconst.i64 8-;; @0055 v29 = iadd v27, v28 ; v28 = 8-;; @0055 store user2 v24, v29-;; @0055 jump block3-;;-;; block3:-;; @0055 store.i32 user6 aligned table v2, v12-;; v55 = iconst.i32 1-;; @0055 v30 = band.i32 v13, v55 ; v55 = 1-;; v54 = iconst.i32 0-;; @0055 v31 = icmp.i32 eq v13, v54 ; v54 = 0-;; @0055 v32 = uextend.i32 v31-;; @0055 v33 = bor v30, v32-;; @0055 brif v33, block7, block4-;;-;; block4:-;; @0055 v34 = uextend.i64 v13-;; @0055 v52 = load.i64 notrap aligned readonly can_move v0+8-;; @0055 v35 = load.i64 notrap aligned readonly can_move v52+32-;; @0055 v36 = iadd v35, v34-;; @0055 v37 = iconst.i64 8-;; @0055 v38 = iadd v36, v37 ; v37 = 8-;; @0055 v39 = load.i64 user2 v38-;; v51 = iconst.i64 -1-;; @0055 v40 = iadd v39, v51 ; v51 = -1-;; v50 = iconst.i64 0-;; @0055 v41 = icmp eq v40, v50 ; v50 = 0-;; @0055 brif v41, block5, block6-;;-;; block5 cold:-;; @0055 call fn0(v0, v13)-;; @0055 jump block7-;;-;; block6:-;; @0055 v43 = uextend.i64 v13-;; @0055 v48 = load.i64 notrap aligned readonly can_move v0+8-;; @0055 v44 = load.i64 notrap aligned readonly can_move v48+32-;; @0055 v45 = iadd v44, v43-;; @0055 v46 = iconst.i64 8-;; @0055 v47 = iadd v45, v46 ; v46 = 8-;; @0055 store.i64 user2 v40, v47-;; @0055 jump block7-;;-;; block7:+;; @0055 store user6 aligned table v2, v12;; @0057 jump block1;;;; block1:@@ -122,11 +51,6 @@;; gv3 = vmctx;; gv4 = load.i64 notrap aligned gv3+48;; gv5 = load.i64 notrap aligned gv3+56-;; gv6 = load.i64 notrap aligned readonly can_move gv3+8-;; gv7 = load.i64 notrap aligned readonly can_move gv6+32-;; gv8 = load.i64 notrap aligned gv6+40-;; sig0 = (i64 vmctx, i32) tail-;; fn0 = colocated u805306368:22 sig0;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):@@ -135,78 +59,12 @@;; @005e v6 = icmp uge v2, v5;; @005e v7 = uextend.i64 v2;; @005e v8 = load.i64 notrap aligned v0+48-;; v63 = iconst.i64 2-;; @005e v9 = ishl v7, v63 ; v63 = 2+;; v13 = iconst.i64 2+;; @005e v9 = ishl v7, v13 ; v13 = 2;; @005e v10 = iadd v8, v9;; @005e v11 = iconst.i64 0;; @005e v12 = select_spectre_guard v6, v11, v10 ; v11 = 0-;; @005e v13 = load.i32 user6 aligned table v12-;; v62 = iconst.i32 1-;; @005e v14 = band v3, v62 ; v62 = 1-;; v61 = iconst.i32 0-;; @005e v15 = icmp eq v3, v61 ; v61 = 0-;; @005e v16 = uextend.i32 v15-;; @005e v17 = bor v14, v16-;; @005e brif v17, block3, block2-;;-;; block2:-;; @005e v18 = uextend.i64 v3-;; @005e v59 = load.i64 notrap aligned readonly can_move v0+8-;; @005e v19 = load.i64 notrap aligned readonly can_move v59+32-;; @005e v20 = iadd v19, v18-;; @005e v21 = iconst.i64 8-;; @005e v22 = iadd v20, v21 ; v21 = 8-;; @005e v23 = load.i64 user2 v22-;; v58 = iconst.i64 1-;; @005e v24 = iadd v23, v58 ; v58 = 1-;; @005e v25 = uextend.i64 v3-;; @005e v56 = load.i64 notrap aligned readonly can_move v0+8-;; @005e v26 = load.i64 notrap aligned readonly can_move v56+32-;; @005e v27 = iadd v26, v25-;; @005e v28 = iconst.i64 8-;; @005e v29 = iadd v27, v28 ; v28 = 8-;; @005e store user2 v24, v29-;; @005e jump block3-;;-;; block3:-;; @005e store.i32 user6 aligned table v3, v12-;; v55 = iconst.i32 1-;; @005e v30 = band.i32 v13, v55 ; v55 = 1-;; v54 = iconst.i32 0-;; @005e v31 = icmp.i32 eq v13, v54 ; v54 = 0-;; @005e v32 = uextend.i32 v31-;; @005e v33 = bor v30, v32-;; @005e brif v33, block7, block4-;;-;; block4:-;; @005e v34 = uextend.i64 v13-;; @005e v52 = load.i64 notrap aligned readonly can_move v0+8-;; @005e v35 = load.i64 notrap aligned readonly can_move v52+32-;; @005e v36 = iadd v35, v34-;; @005e v37 = iconst.i64 8-;; @005e v38 = iadd v36, v37 ; v37 = 8-;; @005e v39 = load.i64 user2 v38-;; v51 = iconst.i64 -1-;; @005e v40 = iadd v39, v51 ; v51 = -1-;; v50 = iconst.i64 0-;; @005e v41 = icmp eq v40, v50 ; v50 = 0-;; @005e brif v41, block5, block6-;;-;; block5 cold:-;; @005e call fn0(v0, v13)-;; @005e jump block7-;;-;; block6:-;; @005e v43 = uextend.i64 v13-;; @005e v48 = load.i64 notrap aligned readonly can_move v0+8-;; @005e v44 = load.i64 notrap aligned readonly can_move v48+32-;; @005e v45 = iadd v44, v43-;; @005e v46 = iconst.i64 8-;; @005e v47 = iadd v45, v46 ; v46 = 8-;; @005e store.i64 user2 v40, v47-;; @005e jump block7-;;-;; block7:+;; @005e store user6 aligned table v3, v12;; @0060 jump block1;;;; block1: