A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Tag `VMTableDefinition` fields with alias regions (#13692)
Nick Fitzgerald7b76f287d8bc
diff --git a/crates/cranelift/src/alias_region.rs b/crates/cranelift/src/alias_region.rsindex d296b73b38..e92c4353fb 100644--- a/crates/cranelift/src/alias_region.rs+++ b/crates/cranelift/src/alias_region.rs@@ -15,6 +15,7 @@ enum VmType {VMContext,VMStoreContext,VMMemoryDefinition,+ VMTableDefinition,}/// A key that uniquely identifies an alias region across an entire compilation.@@ -103,6 +104,7 @@ impl AliasRegionKey {const DEFINED_GLOBAL_KIND: u32 = Self::new_kind(0b0111);const GC_HEAP_KIND: u32 = Self::new_kind(0b1000);const VM_MEMORY_DEFINITION_KIND: u32 = Self::new_kind(0b1001);+ const VM_TABLE_DEFINITION_KIND: u32 = Self::new_kind(0b1010);/// Encode this key into a raw `u32` suitable for use as an/// `AliasRegionData::user_id`.@@ -114,6 +116,7 @@ impl AliasRegionKey {VmType::VMContext => Self::VM_CONTEXT_KIND,VmType::VMStoreContext => Self::VM_STORE_CONTEXT_KIND,VmType::VMMemoryDefinition => Self::VM_MEMORY_DEFINITION_KIND,+ VmType::VMTableDefinition => Self::VM_TABLE_DEFINITION_KIND,};kind | (offset & Self::OFFSET_MASK)}@@ -788,6 +791,102 @@ impl AliasRegions<VMOffsets<u8>> {self.vmctx_vmmemory_definition_current_length_load(cursor.func, memory).emit(cursor, vmctx)}++ fn vmtable_definition_region(+ &mut self,+ func: &mut ir::Function,+ offset: u32,+ ) -> ir::AliasRegion {+ self.region(+ func,+ AliasRegionKey::Vm {+ ty: VmType::VMTableDefinition,+ offset,+ },+ )+ }++ /// Get a `Load` for an inlined-in-the-`vmctx` `VMTableDefinition`'s `base`+ /// field.+ pub fn vmctx_vmtable_definition_base_load(+ &mut self,+ func: &mut ir::Function,+ table: DefinedTableIndex,+ base_flags: ir::MemFlagsData,+ ) -> Load {+ // NB: The region is keyed on the field's offset within the+ // `VMTableDefinition`, not the `vmctx`, so that defined+ // (`vmctx`-inlined) and imported (via-pointer) tables share one region+ // per field.+ let field = self.offsets.vmtable_definition_base();+ let region = self.vmtable_definition_region(func, field.into());++ Load {+ offset: self.offsets.vmctx_vmtable_definition_base(table),+ flags: base_flags.with_alias_region(Some(region)),+ ty: self.pointer_type,+ }+ }++ /// Get a `Load` for an inlined-in-the-`vmctx` `VMTableDefinition`'s+ /// `current_elements` field.+ ///+ /// The caller supplies `ty` because the field's width depends on the table+ /// elements' type.+ pub fn vmctx_vmtable_definition_current_elements_load(+ &mut self,+ func: &mut ir::Function,+ table: DefinedTableIndex,+ ty: ir::Type,+ ) -> Load {+ // See note in `vmctx_vmtable_definition_base_load`.+ let field = self.offsets.vmtable_definition_current_elements();+ let region = self.vmtable_definition_region(func, field.into());++ Load {+ offset: self+ .offsets+ .vmctx_vmtable_definition_current_elements(table),+ flags: ir::MemFlagsData::trusted().with_alias_region(Some(region)),+ ty,+ }+ }++ /// Get a `Load` for the `VMTableDefinition::base` field reached through a+ /// `*mut VMTableDefinition` (an imported table), for use in a+ /// `VmctxLoadChain`.+ pub fn vmtable_definition_base_load(+ &mut self,+ func: &mut ir::Function,+ base_flags: ir::MemFlagsData,+ ) -> Load {+ let offset = self.offsets.vmtable_definition_base().into();+ let region = self.vmtable_definition_region(func, offset);+ Load {+ offset,+ flags: base_flags.with_alias_region(Some(region)),+ ty: self.pointer_type,+ }+ }++ /// Get a `Load` for the `VMTableDefinition::current_elements` field reached+ /// through a `*mut VMTableDefinition` (an imported table).+ ///+ /// The caller supplies `ty` because the field's width depends on the table+ /// elements' type.+ pub fn vmtable_definition_current_elements_load(+ &mut self,+ func: &mut ir::Function,+ ty: ir::Type,+ ) -> Load {+ let offset = self.offsets.vmtable_definition_current_elements().into();+ let region = self.vmtable_definition_region(func, offset);+ Load {+ offset,+ flags: ir::MemFlagsData::trusted().with_alias_region(Some(region)),+ ty,+ }+ }}/// `VMStoreContext`-related methods.diff --git a/crates/cranelift/src/func_environ.rs b/crates/cranelift/src/func_environ.rsindex c66d1b568a..9134d1fcc7 100644--- a/crates/cranelift/src/func_environ.rs+++ b/crates/cranelift/src/func_environ.rs@@ -4,7 +4,7 @@ pub(crate) mod stack_switching;use crate::alias_region::AliasRegions;use crate::compiler::Compiler;use crate::translate::{- FuncTranslationStacks, Heap, HeapData, Load, MemoryKind, StructFieldsVec, TableData, TableSize,+ FuncTranslationStacks, Heap, HeapData, MemoryKind, StructFieldsVec, TableData, TableSize,TargetEnvironment, VmctxLoadChain,};use crate::trap::TranslateTrap;@@ -1653,7 +1653,6 @@ impl FuncEnvironment<'_> {func: &mut ir::Function,index: TableIndex,) -> (VmctxLoadChain, TableSize) {- let pointer_type = self.pointer_type();let table = self.module.tables[index];let bound_ty = ir::Type::int(u16::from(self.offsets.size_of_vmtable_definition_current_elements()) * 8,@@ -1668,58 +1667,51 @@ impl FuncEnvironment<'_> {base_flags = base_flags.with_readonly().with_can_move();}- let base = |from: Option<Load>, offset| {- VmctxLoadChain::new(- from.into_iter()- .chain(std::iter::once(Load {- offset,- flags: base_flags,- ty: pointer_type,- }))- .collect(),- )- };- let bound = |from: Option<Load>, offset| {- if is_static {+ if let Some(def_index) = self.module.defined_table_index(index) {+ // A defined table's `VMTableDefinition` is inlined into the vmctx,+ // reached at an absolute `vmctx` offset.+ let base = VmctxLoadChain::new(smallvec![+ self.alias_regions+ .vmctx_vmtable_definition_base_load(func, def_index, base_flags)+ ]);+ let bound = if is_static {TableSize::Static {bound: table.limits.min,}} else {TableSize::Dynamic {- bound: VmctxLoadChain::new(- from.into_iter()- .chain(std::iter::once(Load {- offset,- flags: ir::MemFlagsData::trusted(),- ty: bound_ty,- }))- .collect(),- ),+ bound: VmctxLoadChain::new(smallvec![+ self.alias_regions+ .vmctx_vmtable_definition_current_elements_load(+ func, def_index, bound_ty+ )+ ]),}- }- };-- if let Some(def_index) = self.module.defined_table_index(index) {- (- base(None, self.offsets.vmctx_vmtable_definition_base(def_index)),- bound(- None,- self.offsets- .vmctx_vmtable_definition_current_elements(def_index),- ),- )+ };+ (base, bound)} else {+ // An imported table is reached through a `*mut VMTableDefinition`+ // loaded from the `vmctx`.let from = self.alias_regions.vmctx_vmtable_from_load(func, index);- (- base(- Some(from),- u32::from(self.offsets.vmtable_definition_base()),- ),- bound(- Some(from),- u32::from(self.offsets.vmtable_definition_current_elements()),- ),- )+ let base = VmctxLoadChain::new(smallvec![+ from,+ self.alias_regions+ .vmtable_definition_base_load(func, base_flags),+ ]);+ let bound = if is_static {+ TableSize::Static {+ bound: table.limits.min,+ }+ } else {+ TableSize::Dynamic {+ bound: VmctxLoadChain::new(smallvec![+ from,+ self.alias_regions+ .vmtable_definition_current_elements_load(func, bound_ty),+ ]),+ }+ };+ (base, bound)}}diff --git a/tests/disas/alias-region-tables.wat b/tests/disas/alias-region-tables.watindex 474e3c68a8..94e03b5cea 100644--- a/tests/disas/alias-region-tables.wat+++ b/tests/disas/alias-region-tables.wat@@ -19,9 +19,11 @@;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18";; region2 = 48 "VMContext+0x30"-;; region3 = 1073741824 "PublicTable"-;; region4 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"-;; region5 = 40 "VMContext+0x28"+;; region3 = 2684354560 "VMTableDefinition+0x0"+;; region4 = 2684354568 "VMTableDefinition+0x8"+;; region5 = 1073741824 "PublicTable"+;; region6 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region7 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -32,8 +34,8 @@;;;; block0(v0: i64, v1: i64, v2: i32, v3: i64):;; @0043 v5 = load.i64 notrap aligned readonly can_move region2 v0+48-;; @0043 v6 = load.i64 notrap aligned v5+8-;; @0043 v11 = load.i64 notrap aligned v5+;; @0043 v6 = load.i64 notrap aligned region4 v5+8+;; @0043 v11 = load.i64 notrap aligned region3 v5;; @0043 v17 = iconst.i64 1;; @0043 v18 = bor v3, v17 ; v17 = 1;; @0043 v7 = ireduce.i32 v6@@ -44,14 +46,14 @@;; @0043 v13 = ishl v9, v12 ; v12 = 3;; @0043 v14 = iadd v11, v13;; @0043 v16 = select_spectre_guard v8, v15, v14 ; v15 = 0-;; @0043 store user6 aligned region3 v18, v16-;; @0049 v19 = load.i64 notrap aligned v0+80-;; @0049 v23 = load.i64 notrap aligned v0+72+;; @0043 store user6 aligned region5 v18, v16+;; @0049 v19 = load.i64 notrap aligned region4 v0+80+;; @0049 v23 = load.i64 notrap aligned region3 v0+72;; @0049 v20 = ireduce.i32 v19;; @0049 v21 = icmp uge v2, v20;; @0049 v26 = iadd v23, v13;; @0049 v28 = select_spectre_guard v21, v15, v26 ; v15 = 0-;; @0049 store user6 aligned region4 v18, v28+;; @0049 store user6 aligned region6 v18, v28;; @004d v44 = iconst.i64 -2;; @004d v45 = band v18, v44 ; v44 = -2;; @004d brif v18, block3(v45), block2@@ -63,7 +65,7 @@;;;; block3(v46: i64):;; @004d v52 = load.i32 user7 aligned readonly v46+16-;; @004d v50 = load.i64 notrap aligned readonly can_move region5 v0+40+;; @004d v50 = load.i64 notrap aligned readonly can_move region7 v0+40;; @004d v51 = load.i32 notrap aligned readonly can_move v50;; @004d v53 = icmp eq v52, v51;; @004d trapz v53, user8diff --git a/tests/disas/call-indirect-with-gc.wat b/tests/disas/call-indirect-with-gc.watindex 17a5b3277c..fcf69d4c62 100644--- a/tests/disas/call-indirect-with-gc.wat+++ b/tests/disas/call-indirect-with-gc.wat@@ -12,8 +12,10 @@;; function u0:0(i64 vmctx, i64, i32, i32) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1073741824 "PublicTable"-;; region3 = 40 "VMContext+0x28"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 2684354568 "VMTableDefinition+0x8"+;; region4 = 1073741824 "PublicTable"+;; region5 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -23,8 +25,8 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @0035 v5 = load.i64 notrap aligned v0+56-;; @0035 v9 = load.i64 notrap aligned v0+48+;; @0035 v5 = load.i64 notrap aligned region3 v0+56+;; @0035 v9 = load.i64 notrap aligned region2 v0+48;; @0035 v6 = ireduce.i32 v5;; @0035 v7 = icmp uge v3, v6;; @0035 v13 = iconst.i64 0@@ -33,7 +35,7 @@;; @0035 v11 = ishl v8, v10 ; v10 = 3;; @0035 v12 = iadd v9, v11;; @0035 v14 = select_spectre_guard v7, v13, v12 ; v13 = 0-;; @0035 v15 = load.i64 user6 aligned region2 v14+;; @0035 v15 = load.i64 user6 aligned region4 v14;; @0035 v16 = iconst.i64 -2;; @0035 v17 = band v15, v16 ; v16 = -2;; @0035 brif v15, block3(v17), block2@@ -45,7 +47,7 @@;;;; block3(v18: i64):;; @0035 v24 = load.i32 user7 aligned readonly v18+16-;; @0035 v22 = load.i64 notrap aligned readonly can_move region3 v0+40+;; @0035 v22 = load.i64 notrap aligned readonly can_move region5 v0+40;; @0035 v23 = load.i32 notrap aligned readonly can_move v22+4;; @0035 v25 = icmp eq v24, v23;; @0035 trapz v25, user8diff --git a/tests/disas/call-indirect-without-gc.wat b/tests/disas/call-indirect-without-gc.watindex 2e4956c690..00dfe8e5c9 100644--- a/tests/disas/call-indirect-without-gc.wat+++ b/tests/disas/call-indirect-without-gc.wat@@ -12,8 +12,10 @@;; function u0:0(i64 vmctx, i64, i32, i32) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1073741824 "PublicTable"-;; region3 = 40 "VMContext+0x28"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 2684354568 "VMTableDefinition+0x8"+;; region4 = 1073741824 "PublicTable"+;; region5 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -23,8 +25,8 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @0035 v5 = load.i64 notrap aligned v0+56-;; @0035 v9 = load.i64 notrap aligned v0+48+;; @0035 v5 = load.i64 notrap aligned region3 v0+56+;; @0035 v9 = load.i64 notrap aligned region2 v0+48;; @0035 v6 = ireduce.i32 v5;; @0035 v7 = icmp uge v3, v6;; @0035 v13 = iconst.i64 0@@ -33,7 +35,7 @@;; @0035 v11 = ishl v8, v10 ; v10 = 3;; @0035 v12 = iadd v9, v11;; @0035 v14 = select_spectre_guard v7, v13, v12 ; v13 = 0-;; @0035 v15 = load.i64 user6 aligned region2 v14+;; @0035 v15 = load.i64 user6 aligned region4 v14;; @0035 v16 = iconst.i64 -2;; @0035 v17 = band v15, v16 ; v16 = -2;; @0035 brif v15, block3(v17), block2@@ -45,7 +47,7 @@;;;; block3(v18: i64):;; @0035 v24 = load.i32 user7 aligned readonly v18+16-;; @0035 v22 = load.i64 notrap aligned readonly can_move region3 v0+40+;; @0035 v22 = load.i64 notrap aligned readonly can_move region5 v0+40;; @0035 v23 = load.i32 notrap aligned readonly can_move v22+4;; @0035 v25 = icmp eq v24, v23;; @0035 trapz v25, user8diff --git a/tests/disas/call-indirect.wat b/tests/disas/call-indirect.watindex a9d93b78bc..2d5a16aeeb 100644--- a/tests/disas/call-indirect.wat+++ b/tests/disas/call-indirect.wat@@ -10,8 +10,10 @@;; function u0:0(i64 vmctx, i64, i32, i32) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1073741824 "PublicTable"-;; region3 = 40 "VMContext+0x28"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 2684354568 "VMTableDefinition+0x8"+;; region4 = 1073741824 "PublicTable"+;; region5 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -21,17 +23,17 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @0035 v5 = load.i64 notrap aligned v0+56+;; @0035 v5 = load.i64 notrap aligned region3 v0+56;; @0035 v6 = ireduce.i32 v5;; @0035 v7 = icmp uge v3, v6;; @0035 v8 = uextend.i64 v3-;; @0035 v9 = load.i64 notrap aligned v0+48+;; @0035 v9 = load.i64 notrap aligned region2 v0+48;; @0035 v10 = iconst.i64 3;; @0035 v11 = ishl v8, v10 ; v10 = 3;; @0035 v12 = iadd v9, v11;; @0035 v13 = iconst.i64 0;; @0035 v14 = select_spectre_guard v7, v13, v12 ; v13 = 0-;; @0035 v15 = load.i64 user6 aligned region2 v14+;; @0035 v15 = load.i64 user6 aligned region4 v14;; @0035 v16 = iconst.i64 -2;; @0035 v17 = band v15, v16 ; v16 = -2;; @0035 brif v15, block3(v17), block2@@ -43,7 +45,7 @@;; @0035 jump block3(v21);;;; block3(v18: i64):-;; @0035 v22 = load.i64 notrap aligned readonly can_move region3 v0+40+;; @0035 v22 = load.i64 notrap aligned readonly can_move region5 v0+40;; @0035 v23 = load.i32 notrap aligned readonly can_move v22+4;; @0035 v24 = load.i32 user7 aligned readonly v18+16;; @0035 v25 = icmp eq v24, v23diff --git a/tests/disas/duplicate-function-types.wat b/tests/disas/duplicate-function-types.watindex 689cb6379c..7c7349b9f2 100644--- a/tests/disas/duplicate-function-types.wat+++ b/tests/disas/duplicate-function-types.wat@@ -20,8 +20,10 @@;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18";; region2 = 48 "VMContext+0x30"-;; region3 = 1073741824 "PublicTable"-;; region4 = 40 "VMContext+0x28"+;; region3 = 2684354560 "VMTableDefinition+0x0"+;; region4 = 2684354568 "VMTableDefinition+0x8"+;; region5 = 1073741824 "PublicTable"+;; region6 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -32,18 +34,18 @@;;;; block0(v0: i64, v1: i64, v2: i32):;; @002d v5 = load.i64 notrap aligned readonly can_move region2 v0+48-;; @002d v6 = load.i64 notrap aligned v5+8+;; @002d v6 = load.i64 notrap aligned region4 v5+8;; @002d v7 = ireduce.i32 v6;; @002d v8 = icmp uge v2, v7;; @002d v9 = uextend.i64 v2;; @002d v10 = load.i64 notrap aligned readonly can_move region2 v0+48-;; @002d v11 = load.i64 notrap aligned v10+;; @002d v11 = load.i64 notrap aligned region3 v10;; @002d v12 = iconst.i64 3;; @002d v13 = ishl v9, v12 ; v12 = 3;; @002d v14 = iadd v11, v13;; @002d v15 = iconst.i64 0;; @002d v16 = select_spectre_guard v8, v15, v14 ; v15 = 0-;; @002d v17 = load.i64 user6 aligned region3 v16+;; @002d v17 = load.i64 user6 aligned region5 v16;; @002d v18 = iconst.i64 -2;; @002d v19 = band v17, v18 ; v18 = -2;; @002d brif v17, block3(v19), block2@@ -55,7 +57,7 @@;; @002d jump block3(v23);;;; block3(v20: i64):-;; @002d v24 = load.i64 notrap aligned readonly can_move region4 v0+40+;; @002d v24 = load.i64 notrap aligned readonly can_move region6 v0+40;; @002d v25 = load.i32 notrap aligned readonly can_move v24;; @002d v26 = load.i32 user7 aligned readonly v20+16;; @002d v27 = icmp eq v26, v25@@ -65,18 +67,18 @@;; @002d v30 = load.i64 notrap aligned readonly v20+24;; @002d v31 = call_indirect sig0, v29(v30, v0);; @0032 v33 = load.i64 notrap aligned readonly can_move region2 v0+48-;; @0032 v34 = load.i64 notrap aligned v33+8+;; @0032 v34 = load.i64 notrap aligned region4 v33+8;; @0032 v35 = ireduce.i32 v34;; @0032 v36 = icmp.i32 uge v2, v35;; @0032 v37 = uextend.i64 v2;; @0032 v38 = load.i64 notrap aligned readonly can_move region2 v0+48-;; @0032 v39 = load.i64 notrap aligned v38+;; @0032 v39 = load.i64 notrap aligned region3 v38;; @0032 v40 = iconst.i64 3;; @0032 v41 = ishl v37, v40 ; v40 = 3;; @0032 v42 = iadd v39, v41;; @0032 v43 = iconst.i64 0;; @0032 v44 = select_spectre_guard v36, v43, v42 ; v43 = 0-;; @0032 v45 = load.i64 user6 aligned region3 v44+;; @0032 v45 = load.i64 user6 aligned region5 v44;; @0032 v46 = iconst.i64 -2;; @0032 v47 = band v45, v46 ; v46 = -2;; @0032 brif v45, block5(v47), block4@@ -88,7 +90,7 @@;; @0032 jump block5(v51);;;; block5(v48: i64):-;; @0032 v52 = load.i64 notrap aligned readonly can_move region4 v0+40+;; @0032 v52 = load.i64 notrap aligned readonly can_move region6 v0+40;; @0032 v53 = load.i32 notrap aligned readonly can_move v52;; @0032 v54 = load.i32 user7 aligned readonly v48+16;; @0032 v55 = icmp eq v54, v53diff --git a/tests/disas/foo.wat b/tests/disas/foo.watindex b39eaa8f36..d73a1b6840 100644--- a/tests/disas/foo.wat+++ b/tests/disas/foo.wat@@ -21,8 +21,10 @@;; region3 = 2415919112 "VMMemoryDefinition+0x8";; region4 = 805306368 "DefinedMemory(StaticModuleIndex(0), DefinedMemoryIndex(0))";; region5 = 72 "VMContext+0x48"-;; region6 = 1073741824 "PublicTable"-;; region7 = 40 "VMContext+0x28"+;; region6 = 2684354560 "VMTableDefinition+0x0"+;; region7 = 2684354568 "VMTableDefinition+0x8"+;; region8 = 1073741824 "PublicTable"+;; region9 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -37,8 +39,8 @@;; @0040 v8 = iadd v7, v6;; @0040 v9 = load.i32 little region4 v8;; @0043 v10 = load.i64 notrap aligned readonly can_move region5 v0+72-;; @0043 v11 = load.i64 notrap aligned v10+8-;; @0043 v16 = load.i64 notrap aligned v10+;; @0043 v11 = load.i64 notrap aligned region7 v10+8+;; @0043 v16 = load.i64 notrap aligned region6 v10;; @0043 v12 = ireduce.i32 v11;; @0043 v13 = icmp uge v9, v12;; @0043 v20 = iconst.i64 0@@ -47,7 +49,7 @@;; @0043 v18 = ishl v14, v17 ; v17 = 3;; @0043 v19 = iadd v16, v18;; @0043 v21 = select_spectre_guard v13, v20, v19 ; v20 = 0-;; @0043 v22 = load.i64 user6 aligned region6 v21+;; @0043 v22 = load.i64 user6 aligned region8 v21;; @0043 v23 = iconst.i64 -2;; @0043 v24 = band v22, v23 ; v23 = -2;; @0043 brif v22, block3(v24), block2@@ -59,7 +61,7 @@;;;; block3(v25: i64):;; @0043 v31 = load.i32 user7 aligned readonly v25+16-;; @0043 v29 = load.i64 notrap aligned readonly can_move region7 v0+40+;; @0043 v29 = load.i64 notrap aligned readonly can_move region9 v0+40;; @0043 v30 = load.i32 notrap aligned readonly can_move v29+4;; @0043 v32 = icmp eq v31, v30;; @0043 trapz v32, user8@@ -67,8 +69,8 @@;; @0043 v35 = load.i64 notrap aligned readonly v25+24;; @0043 v36 = call_indirect sig0, v34(v35, v0, v2);; @004a v42 = load.i32 little region4 v8-;; @004d v44 = load.i64 notrap aligned v10+8-;; @004d v49 = load.i64 notrap aligned v10+;; @004d v44 = load.i64 notrap aligned region7 v10+8+;; @004d v49 = load.i64 notrap aligned region6 v10;; @004d v45 = ireduce.i32 v44;; @004d v46 = icmp uge v42, v45;; @004d v47 = uextend.i64 v42@@ -77,7 +79,7 @@;; @004d v52 = iadd v49, v71;; v72 = iconst.i64 0;; v73 = select_spectre_guard v46, v72, v52 ; v72 = 0-;; @004d v55 = load.i64 user6 aligned region6 v73+;; @004d v55 = load.i64 user6 aligned region8 v73;; v74 = iconst.i64 -2;; v75 = band v55, v74 ; v74 = -2;; @004d brif v55, block5(v75), block4diff --git a/tests/disas/gc/call-indirect-final-type.wat b/tests/disas/gc/call-indirect-final-type.watindex edfc3c5aac..ae86894205 100644--- a/tests/disas/gc/call-indirect-final-type.wat+++ b/tests/disas/gc/call-indirect-final-type.wat@@ -18,8 +18,10 @@;; function u0:0(i64 vmctx, i64, i32, i32) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"-;; region3 = 40 "VMContext+0x28"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 2684354568 "VMTableDefinition+0x8"+;; region4 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region5 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -29,8 +31,8 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @002b v5 = load.i64 notrap aligned v0+56-;; @002b v9 = load.i64 notrap aligned v0+48+;; @002b v5 = load.i64 notrap aligned region3 v0+56+;; @002b v9 = load.i64 notrap aligned region2 v0+48;; @002b v6 = ireduce.i32 v5;; @002b v7 = icmp uge v3, v6;; @002b v13 = iconst.i64 0@@ -39,7 +41,7 @@;; @002b v11 = ishl v8, v10 ; v10 = 3;; @002b v12 = iadd v9, v11;; @002b v14 = select_spectre_guard v7, v13, v12 ; v13 = 0-;; @002b v15 = load.i64 user6 aligned region2 v14+;; @002b v15 = load.i64 user6 aligned region4 v14;; @002b v16 = iconst.i64 -2;; @002b v17 = band v15, v16 ; v16 = -2;; @002b brif v15, block3(v17), block2@@ -51,7 +53,7 @@;;;; block3(v18: i64):;; @002b v24 = load.i32 user7 aligned readonly v18+16-;; @002b v22 = load.i64 notrap aligned readonly can_move region3 v0+40+;; @002b v22 = load.i64 notrap aligned readonly can_move region5 v0+40;; @002b v23 = load.i32 notrap aligned readonly can_move v22;; @002b v25 = icmp eq v24, v23;; @002b trapz v25, user8@@ -67,8 +69,10 @@;; function u0:1(i64 vmctx, i64, i32, i32) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"-;; region3 = 40 "VMContext+0x28"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 2684354568 "VMTableDefinition+0x8"+;; region4 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region5 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -78,8 +82,8 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @0035 v5 = load.i64 notrap aligned v0+56-;; @0035 v9 = load.i64 notrap aligned v0+48+;; @0035 v5 = load.i64 notrap aligned region3 v0+56+;; @0035 v9 = load.i64 notrap aligned region2 v0+48;; @0035 v6 = ireduce.i32 v5;; @0035 v7 = icmp uge v3, v6;; @0035 v13 = iconst.i64 0@@ -88,7 +92,7 @@;; @0035 v11 = ishl v8, v10 ; v10 = 3;; @0035 v12 = iadd v9, v11;; @0035 v14 = select_spectre_guard v7, v13, v12 ; v13 = 0-;; @0035 v15 = load.i64 user6 aligned region2 v14+;; @0035 v15 = load.i64 user6 aligned region4 v14;; @0035 v16 = iconst.i64 -2;; @0035 v17 = band v15, v16 ; v16 = -2;; @0035 brif v15, block3(v17), block2@@ -100,7 +104,7 @@;;;; block3(v18: i64):;; @0035 v24 = load.i32 user7 aligned readonly v18+16-;; @0035 v22 = load.i64 notrap aligned readonly can_move region3 v0+40+;; @0035 v22 = load.i64 notrap aligned readonly can_move region5 v0+40;; @0035 v23 = load.i32 notrap aligned readonly can_move v22;; @0035 v25 = icmp eq v24, v23;; @0035 trapz v25, user8diff --git a/tests/disas/gc/copying/call-indirect-and-subtyping.wat b/tests/disas/gc/copying/call-indirect-and-subtyping.watindex e7a11b8d5a..366eb33b3d 100644--- a/tests/disas/gc/copying/call-indirect-and-subtyping.wat+++ b/tests/disas/gc/copying/call-indirect-and-subtyping.wat@@ -18,8 +18,9 @@;; function u0:0(i64 vmctx, i64, i32) tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"-;; region3 = 40 "VMContext+0x28"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region4 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -34,13 +35,13 @@;; @005c v3 = iconst.i32 2;; @005c v4 = icmp uge v2, v3 ; v3 = 2;; @005c v10 = iconst.i64 0-;; @005c v6 = load.i64 notrap aligned readonly can_move v0+112+;; @005c v6 = load.i64 notrap aligned readonly can_move region2 v0+112;; @005c v5 = uextend.i64 v2;; @005c v7 = iconst.i64 3;; @005c v8 = ishl v5, v7 ; v7 = 3;; @005c v9 = iadd v6, v8;; @005c v11 = select_spectre_guard v4, v10, v9 ; v10 = 0-;; @005c v12 = load.i64 user6 aligned region2 v11+;; @005c v12 = load.i64 user6 aligned region3 v11;; @005c v13 = iconst.i64 -2;; @005c v14 = band v12, v13 ; v13 = -2;; @005c brif v12, block3(v14), block2@@ -52,7 +53,7 @@;;;; block3(v15: i64):;; @005c v21 = load.i32 user7 aligned readonly v15+16-;; @005c v19 = load.i64 notrap aligned readonly can_move region3 v0+40+;; @005c v19 = load.i64 notrap aligned readonly can_move region4 v0+40;; @005c v20 = load.i32 notrap aligned readonly can_move v19;; @005c v22 = icmp eq v21, v20;; @005c v23 = uextend.i32 v22diff --git a/tests/disas/gc/drc/call-indirect-and-subtyping.wat b/tests/disas/gc/drc/call-indirect-and-subtyping.watindex c59ca86e25..976cc66c8a 100644--- a/tests/disas/gc/drc/call-indirect-and-subtyping.wat+++ b/tests/disas/gc/drc/call-indirect-and-subtyping.wat@@ -19,8 +19,9 @@;; function u0:0(i64 vmctx, i64, i32) tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"-;; region3 = 40 "VMContext+0x28"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region4 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -35,13 +36,13 @@;; @005c v3 = iconst.i32 2;; @005c v4 = icmp uge v2, v3 ; v3 = 2;; @005c v10 = iconst.i64 0-;; @005c v6 = load.i64 notrap aligned readonly can_move v0+112+;; @005c v6 = load.i64 notrap aligned readonly can_move region2 v0+112;; @005c v5 = uextend.i64 v2;; @005c v7 = iconst.i64 3;; @005c v8 = ishl v5, v7 ; v7 = 3;; @005c v9 = iadd v6, v8;; @005c v11 = select_spectre_guard v4, v10, v9 ; v10 = 0-;; @005c v12 = load.i64 user6 aligned region2 v11+;; @005c v12 = load.i64 user6 aligned region3 v11;; @005c v13 = iconst.i64 -2;; @005c v14 = band v12, v13 ; v13 = -2;; @005c brif v12, block3(v14), block2@@ -53,7 +54,7 @@;;;; block3(v15: i64):;; @005c v21 = load.i32 user7 aligned readonly v15+16-;; @005c v19 = load.i64 notrap aligned readonly can_move region3 v0+40+;; @005c v19 = load.i64 notrap aligned readonly can_move region4 v0+40;; @005c v20 = load.i32 notrap aligned readonly can_move v19;; @005c v22 = icmp eq v21, v20;; @005c v23 = uextend.i32 v22diff --git a/tests/disas/gc/null/call-indirect-and-subtyping.wat b/tests/disas/gc/null/call-indirect-and-subtyping.watindex b81ec6e41c..c4a4a25850 100644--- a/tests/disas/gc/null/call-indirect-and-subtyping.wat+++ b/tests/disas/gc/null/call-indirect-and-subtyping.wat@@ -19,8 +19,9 @@;; function u0:0(i64 vmctx, i64, i32) tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"-;; region3 = 40 "VMContext+0x28"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region4 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -35,13 +36,13 @@;; @005c v3 = iconst.i32 2;; @005c v4 = icmp uge v2, v3 ; v3 = 2;; @005c v10 = iconst.i64 0-;; @005c v6 = load.i64 notrap aligned readonly can_move v0+112+;; @005c v6 = load.i64 notrap aligned readonly can_move region2 v0+112;; @005c v5 = uextend.i64 v2;; @005c v7 = iconst.i64 3;; @005c v8 = ishl v5, v7 ; v7 = 3;; @005c v9 = iadd v6, v8;; @005c v11 = select_spectre_guard v4, v10, v9 ; v10 = 0-;; @005c v12 = load.i64 user6 aligned region2 v11+;; @005c v12 = load.i64 user6 aligned region3 v11;; @005c v13 = iconst.i64 -2;; @005c v14 = band v12, v13 ; v13 = -2;; @005c brif v12, block3(v14), block2@@ -53,7 +54,7 @@;;;; block3(v15: i64):;; @005c v21 = load.i32 user7 aligned readonly v15+16-;; @005c v19 = load.i64 notrap aligned readonly can_move region3 v0+40+;; @005c v19 = load.i64 notrap aligned readonly can_move region4 v0+40;; @005c v20 = load.i32 notrap aligned readonly can_move v19;; @005c v22 = icmp eq v21, v20;; @005c v23 = uextend.i32 v22diff --git a/tests/disas/icall-loop.wat b/tests/disas/icall-loop.watindex 4a31fe0a30..8ba5c47a1f 100644--- a/tests/disas/icall-loop.wat+++ b/tests/disas/icall-loop.wat@@ -25,8 +25,9 @@;; function u0:0(i64 vmctx, i64, i32) tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"-;; region3 = 40 "VMContext+0x28"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region4 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -39,7 +40,7 @@;; @002b v4 = iconst.i32 2;; @002b v5 = icmp uge v2, v4 ; v4 = 2;; @002b v11 = iconst.i64 0-;; @002b v7 = load.i64 notrap aligned readonly can_move v0+48+;; @002b v7 = load.i64 notrap aligned readonly can_move region2 v0+48;; @002b v6 = uextend.i64 v2;; @002b v8 = iconst.i64 3;; @002b v9 = ishl v6, v8 ; v8 = 3@@ -47,12 +48,12 @@;; @002b v12 = select_spectre_guard v5, v11, v10 ; v11 = 0;; @002b v14 = iconst.i64 -2;; @002b v17 = iconst.i32 0-;; @002b v20 = load.i64 notrap aligned readonly can_move region3 v0+40+;; @002b v20 = load.i64 notrap aligned readonly can_move region4 v0+40;; @002b v21 = load.i32 notrap aligned readonly can_move v20;; @0027 jump block2;;;; block2:-;; @002b v13 = load.i64 user6 aligned region2 v12+;; @002b v13 = load.i64 user6 aligned region3 v12;; v29 = iconst.i64 -2;; v30 = band v13, v29 ; v29 = -2;; @002b brif v13, block5(v30), block4@@ -75,8 +76,9 @@;; function u0:1(i64 vmctx, i64) tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"-;; region3 = 40 "VMContext+0x28"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region4 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -86,19 +88,19 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64):-;; @0038 v6 = load.i64 notrap aligned readonly can_move v0+48+;; @0038 v6 = load.i64 notrap aligned readonly can_move region2 v0+48;; v34 = iconst.i64 8;; @0038 v9 = iadd v6, v34 ; v34 = 8;; @0038 v13 = iconst.i64 -2;; @0038 v16 = iconst.i32 0;; v33 = iconst.i64 1-;; @0038 v19 = load.i64 notrap aligned readonly can_move region3 v0+40+;; @0038 v19 = load.i64 notrap aligned readonly can_move region4 v0+40;; @0038 v20 = load.i32 notrap aligned readonly can_move v19;; @0034 jump block2;;;; block2:;; v35 = iadd.i64 v6, v34 ; v34 = 8-;; @0038 v12 = load.i64 user6 aligned region2 v35+;; @0038 v12 = load.i64 user6 aligned region3 v35;; v36 = iconst.i64 -2;; v37 = band v12, v36 ; v36 = -2;; @0038 brif v12, block5(v37), block4diff --git a/tests/disas/icall-simd.wat b/tests/disas/icall-simd.watindex 469dbeb8b0..54b6a25399 100644--- a/tests/disas/icall-simd.wat+++ b/tests/disas/icall-simd.wat@@ -11,8 +11,9 @@;; function u0:0(i64 vmctx, i64, i32, i8x16) -> i8x16 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"-;; region3 = 40 "VMContext+0x28"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region4 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -25,13 +26,13 @@;; @0033 v5 = iconst.i32 23;; @0033 v6 = icmp uge v2, v5 ; v5 = 23;; @0033 v7 = uextend.i64 v2-;; @0033 v8 = load.i64 notrap aligned readonly can_move v0+48+;; @0033 v8 = load.i64 notrap aligned readonly can_move region2 v0+48;; @0033 v9 = iconst.i64 3;; @0033 v10 = ishl v7, v9 ; v9 = 3;; @0033 v11 = iadd v8, v10;; @0033 v12 = iconst.i64 0;; @0033 v13 = select_spectre_guard v6, v12, v11 ; v12 = 0-;; @0033 v14 = load.i64 user6 aligned region2 v13+;; @0033 v14 = load.i64 user6 aligned region3 v13;; @0033 v15 = iconst.i64 -2;; @0033 v16 = band v14, v15 ; v15 = -2;; @0033 brif v14, block3(v16), block2@@ -43,7 +44,7 @@;; @0033 jump block3(v20);;;; block3(v17: i64):-;; @0033 v21 = load.i64 notrap aligned readonly can_move region3 v0+40+;; @0033 v21 = load.i64 notrap aligned readonly can_move region4 v0+40;; @0033 v22 = load.i32 notrap aligned readonly can_move v21;; @0033 v23 = load.i32 user7 aligned readonly v17+16;; @0033 v24 = icmp eq v23, v22diff --git a/tests/disas/icall.wat b/tests/disas/icall.watindex 4b42ef3ad1..d3cac126ba 100644--- a/tests/disas/icall.wat+++ b/tests/disas/icall.wat@@ -11,8 +11,9 @@;; function u0:0(i64 vmctx, i64, i32, f32) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"-;; region3 = 40 "VMContext+0x28"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region4 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -25,13 +26,13 @@;; @0033 v5 = iconst.i32 23;; @0033 v6 = icmp uge v2, v5 ; v5 = 23;; @0033 v7 = uextend.i64 v2-;; @0033 v8 = load.i64 notrap aligned readonly can_move v0+48+;; @0033 v8 = load.i64 notrap aligned readonly can_move region2 v0+48;; @0033 v9 = iconst.i64 3;; @0033 v10 = ishl v7, v9 ; v9 = 3;; @0033 v11 = iadd v8, v10;; @0033 v12 = iconst.i64 0;; @0033 v13 = select_spectre_guard v6, v12, v11 ; v12 = 0-;; @0033 v14 = load.i64 user6 aligned region2 v13+;; @0033 v14 = load.i64 user6 aligned region3 v13;; @0033 v15 = iconst.i64 -2;; @0033 v16 = band v14, v15 ; v15 = -2;; @0033 brif v14, block3(v16), block2@@ -43,7 +44,7 @@;; @0033 jump block3(v20);;;; block3(v17: i64):-;; @0033 v21 = load.i64 notrap aligned readonly can_move region3 v0+40+;; @0033 v21 = load.i64 notrap aligned readonly can_move region4 v0+40;; @0033 v22 = load.i32 notrap aligned readonly can_move v21;; @0033 v23 = load.i32 user7 aligned readonly v17+16;; @0033 v24 = icmp eq v23, v22diff --git a/tests/disas/indirect-call-no-caching.wat b/tests/disas/indirect-call-no-caching.watindex e2994e06a3..b5f4608ef7 100644--- a/tests/disas/indirect-call-no-caching.wat+++ b/tests/disas/indirect-call-no-caching.wat@@ -71,8 +71,9 @@;; function u0:3(i64 vmctx, i64, i32) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"-;; region3 = 40 "VMContext+0x28"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region4 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -85,13 +86,13 @@;; @0050 v4 = iconst.i32 10;; @0050 v5 = icmp uge v2, v4 ; v4 = 10;; @0050 v6 = uextend.i64 v2-;; @0050 v7 = load.i64 notrap aligned readonly can_move v0+48+;; @0050 v7 = load.i64 notrap aligned readonly can_move region2 v0+48;; @0050 v8 = iconst.i64 3;; @0050 v9 = ishl v6, v8 ; v8 = 3;; @0050 v10 = iadd v7, v9;; @0050 v11 = iconst.i64 0;; @0050 v12 = select_spectre_guard v5, v11, v10 ; v11 = 0-;; @0050 v13 = load.i64 user6 aligned region2 v12+;; @0050 v13 = load.i64 user6 aligned region3 v12;; @0050 v14 = iconst.i64 -2;; @0050 v15 = band v13, v14 ; v14 = -2;; @0050 brif v13, block3(v15), block2@@ -103,7 +104,7 @@;; @0050 jump block3(v19);;;; block3(v16: i64):-;; @0050 v20 = load.i64 notrap aligned readonly can_move region3 v0+40+;; @0050 v20 = load.i64 notrap aligned readonly can_move region4 v0+40;; @0050 v21 = load.i32 notrap aligned readonly can_move v20;; @0050 v22 = load.i32 user7 aligned readonly v16+16;; @0050 v23 = icmp eq v22, v21diff --git a/tests/disas/readonly-funcrefs.wat b/tests/disas/readonly-funcrefs.watindex 669651cf26..df2b6d4c83 100644--- a/tests/disas/readonly-funcrefs.wat+++ b/tests/disas/readonly-funcrefs.wat@@ -36,8 +36,9 @@;; function u0:1(i64 vmctx, i64, i32) tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"-;; region3 = 40 "VMContext+0x28"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region4 = 40 "VMContext+0x28";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -50,13 +51,13 @@;; @0031 v3 = iconst.i32 2;; @0031 v4 = icmp uge v2, v3 ; v3 = 2;; @0031 v10 = iconst.i64 0-;; @0031 v6 = load.i64 notrap aligned readonly can_move v0+48+;; @0031 v6 = load.i64 notrap aligned readonly can_move region2 v0+48;; @0031 v5 = uextend.i64 v2;; @0031 v7 = iconst.i64 3;; @0031 v8 = ishl v5, v7 ; v7 = 3;; @0031 v9 = iadd v6, v8;; @0031 v11 = select_spectre_guard v4, v10, v9 ; v10 = 0-;; @0031 v12 = load.i64 user6 aligned region2 v11+;; @0031 v12 = load.i64 user6 aligned region3 v11;; @0031 v13 = iconst.i64 -2;; @0031 v14 = band v12, v13 ; v13 = -2;; @0031 brif v12, block3(v14), block2@@ -68,7 +69,7 @@;;;; block3(v15: i64):;; @0031 v21 = load.i32 user7 aligned readonly v15+16-;; @0031 v19 = load.i64 notrap aligned readonly can_move region3 v0+40+;; @0031 v19 = load.i64 notrap aligned readonly can_move region4 v0+40;; @0031 v20 = load.i32 notrap aligned readonly can_move v19;; @0031 v22 = icmp eq v21, v20;; @0031 trapz v22, user8diff --git a/tests/disas/startup-elem-active.wat b/tests/disas/startup-elem-active.watindex 6addf7f477..4262c9fdf8 100644--- a/tests/disas/startup-elem-active.wat+++ b/tests/disas/startup-elem-active.wat@@ -43,36 +43,38 @@;; };;;; function u2415919104:0(i64 vmctx, i64) tail {-;; region0 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region0 = 2684354560 "VMTableDefinition+0x0"+;; region1 = 2684354568 "VMTableDefinition+0x8"+;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))";;;; block0(v0: i64, v1: i64):-;; v4 = load.i64 notrap aligned v0+56+;; v4 = load.i64 notrap aligned region1 v0+56;; v5 = ireduce.i32 v4;; v6 = uextend.i64 v5;; v78 = iconst.i64 4;; v84 = icmp ult v6, v78 ; v78 = 4;; trapnz v84, user6-;; v13 = load.i64 notrap aligned v0+48+;; v13 = load.i64 notrap aligned region0 v0+48;; v95 = iconst.i32 21;; v2 = iconst.i32 1;; v106 = icmp ule v5, v2 ; v2 = 1;; v71 = iconst.i64 0;; v17 = iadd v13, v78 ; v78 = 4;; v34 = select_spectre_guard v106, v71, v17 ; v71 = 0-;; store user6 aligned region0 v95, v34 ; v95 = 21+;; store user6 aligned region2 v95, v34 ; v95 = 21;; v109 = iconst.i32 23;; v115 = iconst.i32 2;; v121 = icmp ule v5, v115 ; v115 = 2;; v123 = iconst.i64 8;; v49 = iadd v13, v123 ; v123 = 8;; v51 = select_spectre_guard v121, v71, v49 ; v71 = 0-;; store user6 aligned region0 v109, v51 ; v109 = 23+;; store user6 aligned region2 v109, v51 ; v109 = 23;; v125 = iconst.i32 25;; v3 = iconst.i32 3;; v136 = icmp ule v5, v3 ; v3 = 3;; v138 = iconst.i64 12;; v66 = iadd v13, v138 ; v138 = 12;; v68 = select_spectre_guard v136, v71, v66 ; v71 = 0-;; store user6 aligned region0 v125, v68 ; v125 = 25+;; store user6 aligned region2 v125, v68 ; v125 = 25;; return;; }diff --git a/tests/disas/startup-table-initial-value.wat b/tests/disas/startup-table-initial-value.watindex 386f8e25e9..123728c2ac 100644--- a/tests/disas/startup-table-initial-value.wat+++ b/tests/disas/startup-table-initial-value.wat@@ -37,14 +37,17 @@;; };;;; function u2415919104:0(i64 vmctx, i64) tail {+;; region0 = 2684354560 "VMTableDefinition+0x0"+;; region1 = 2684354568 "VMTableDefinition+0x8"+;;;; block0(v0: i64, v1: i64):-;; v9 = load.i64 notrap aligned v0+56+;; v9 = load.i64 notrap aligned region1 v0+56;; v10 = ireduce.i32 v9;; v11 = uextend.i64 v10;; v39 = iconst.i64 10;; v51 = icmp ult v11, v39 ; v39 = 10;; trapnz v51, user6-;; v18 = load.i64 notrap aligned v0+48+;; v18 = load.i64 notrap aligned region0 v0+48;; v3 = iconst.i32 1;; v81 = iconst.i64 36;; v83 = iadd v18, v81 ; v81 = 36diff --git a/tests/disas/table-copy.wat b/tests/disas/table-copy.watindex 6f2cc1e202..2f5708f08e 100644--- a/tests/disas/table-copy.wat+++ b/tests/disas/table-copy.wat@@ -72,7 +72,9 @@;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18";; region2 = 48 "VMContext+0x30"-;; region3 = 1073741824 "PublicTable"+;; region3 = 2684354560 "VMTableDefinition+0x0"+;; region4 = 2684354568 "VMTableDefinition+0x8"+;; region5 = 1073741824 "PublicTable";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -82,7 +84,7 @@;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32, v5: i32):;; @0090 v7 = load.i64 notrap aligned readonly can_move region2 v0+48-;; @0090 v8 = load.i64 notrap aligned v7+8+;; @0090 v8 = load.i64 notrap aligned region4 v7+8;; @0090 v9 = ireduce.i32 v8;; @0090 v10 = uextend.i64 v9;; @0090 v11 = uextend.i64 v3@@ -93,7 +95,7 @@;; @0090 v16 = icmp ugt v15, v10;; @0090 trapnz v16, user6;; @0090 v17 = load.i64 notrap aligned readonly can_move region2 v0+48-;; @0090 v18 = load.i64 notrap aligned v17+;; @0090 v18 = load.i64 notrap aligned region3 v17;; @0090 v19 = uextend.i64 v3;; @0090 v20 = iconst.i64 8;; @0090 v21 = imul v19, v20 ; v20 = 8@@ -107,7 +109,7 @@;; @0090 v29 = iadd v25, v28;; @0090 v30 = icmp ugt v29, v24;; @0090 trapnz v30, user6-;; @0090 v31 = load.i64 notrap aligned readonly can_move v0+72+;; @0090 v31 = load.i64 notrap aligned readonly can_move region3 v0+72;; @0090 v32 = uextend.i64 v4;; @0090 v33 = iconst.i64 8;; @0090 v34 = imul v32, v33 ; v33 = 8@@ -135,13 +137,13 @@;; @0090 v53 = iconst.i32 6;; @0090 v54 = icmp uge v52, v53 ; v53 = 6;; @0090 v55 = uextend.i64 v52-;; @0090 v56 = load.i64 notrap aligned readonly can_move v0+72+;; @0090 v56 = load.i64 notrap aligned readonly can_move region3 v0+72;; @0090 v57 = iconst.i64 3;; @0090 v58 = ishl v55, v57 ; v57 = 3;; @0090 v59 = iadd v56, v58;; @0090 v60 = iconst.i64 0;; @0090 v61 = select_spectre_guard v54, v60, v59 ; v60 = 0-;; @0090 v62 = load.i64 user6 aligned region3 v61+;; @0090 v62 = load.i64 user6 aligned region5 v61;; @0090 v63 = iconst.i64 -2;; @0090 v64 = band v62, v63 ; v63 = -2;; @0090 brif v62, block7(v64), block6@@ -156,13 +158,13 @@;; @0090 v87 = iconst.i32 6;; @0090 v88 = icmp uge v86, v87 ; v87 = 6;; @0090 v89 = uextend.i64 v86-;; @0090 v90 = load.i64 notrap aligned readonly can_move v0+72+;; @0090 v90 = load.i64 notrap aligned readonly can_move region3 v0+72;; @0090 v91 = iconst.i64 3;; @0090 v92 = ishl v89, v91 ; v91 = 3;; @0090 v93 = iadd v90, v92;; @0090 v94 = iconst.i64 0;; @0090 v95 = select_spectre_guard v88, v94, v93 ; v94 = 0-;; @0090 v96 = load.i64 user6 aligned region3 v95+;; @0090 v96 = load.i64 user6 aligned region5 v95;; @0090 v97 = iconst.i64 -2;; @0090 v98 = band v96, v97 ; v97 = -2;; @0090 brif v96, block9(v98), block8@@ -209,8 +211,10 @@;; function u0:4(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 48 "VMContext+0x30"-;; region3 = 1073741824 "PublicTable"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 48 "VMContext+0x30"+;; region4 = 2684354568 "VMTableDefinition+0x8"+;; region5 = 1073741824 "PublicTable";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -228,13 +232,13 @@;; @009f v13 = iadd v9, v12;; @009f v14 = icmp ugt v13, v8;; @009f trapnz v14, user6-;; @009f v15 = load.i64 notrap aligned readonly can_move v0+72+;; @009f v15 = load.i64 notrap aligned readonly can_move region2 v0+72;; @009f v16 = uextend.i64 v3;; @009f v17 = iconst.i64 8;; @009f v18 = imul v16, v17 ; v17 = 8;; @009f v19 = iadd v15, v18-;; @009f v20 = load.i64 notrap aligned readonly can_move region2 v0+48-;; @009f v21 = load.i64 notrap aligned v20+8+;; @009f v20 = load.i64 notrap aligned readonly can_move region3 v0+48+;; @009f v21 = load.i64 notrap aligned region4 v20+8;; @009f v22 = ireduce.i32 v21;; @009f v23 = uextend.i64 v22;; @009f v24 = uextend.i64 v4@@ -244,8 +248,8 @@;; @009f v28 = iadd v24, v27;; @009f v29 = icmp ugt v28, v23;; @009f trapnz v29, user6-;; @009f v30 = load.i64 notrap aligned readonly can_move region2 v0+48-;; @009f v31 = load.i64 notrap aligned v30+;; @009f v30 = load.i64 notrap aligned readonly can_move region3 v0+48+;; @009f v31 = load.i64 notrap aligned region2 v30;; @009f v32 = uextend.i64 v4;; @009f v33 = iconst.i64 8;; @009f v34 = imul v32, v33 ; v33 = 8@@ -270,19 +274,19 @@;; @009f brif v41, block3(v19, v35, v4), block4(v46, v47, v49);;;; block3(v50: i64, v51: i64, v52: i32):-;; @009f v53 = load.i64 notrap aligned readonly can_move region2 v0+48-;; @009f v54 = load.i64 notrap aligned v53+8+;; @009f v53 = load.i64 notrap aligned readonly can_move region3 v0+48+;; @009f v54 = load.i64 notrap aligned region4 v53+8;; @009f v55 = ireduce.i32 v54;; @009f v56 = icmp uge v52, v55;; @009f v57 = uextend.i64 v52-;; @009f v58 = load.i64 notrap aligned readonly can_move region2 v0+48-;; @009f v59 = load.i64 notrap aligned v58+;; @009f v58 = load.i64 notrap aligned readonly can_move region3 v0+48+;; @009f v59 = load.i64 notrap aligned region2 v58;; @009f v60 = iconst.i64 3;; @009f v61 = ishl v57, v60 ; v60 = 3;; @009f v62 = iadd v59, v61;; @009f v63 = iconst.i64 0;; @009f v64 = select_spectre_guard v56, v63, v62 ; v63 = 0-;; @009f v65 = load.i64 user6 aligned region3 v64+;; @009f v65 = load.i64 user6 aligned region5 v64;; @009f v66 = iconst.i64 -2;; @009f v67 = band v65, v66 ; v66 = -2;; @009f brif v65, block7(v67), block6@@ -294,19 +298,19 @@;; @009f v87 = isub v82, v86 ; v86 = 8;; @009f v88 = iconst.i32 1;; @009f v89 = isub v83, v88 ; v88 = 1-;; @009f v90 = load.i64 notrap aligned readonly can_move region2 v0+48-;; @009f v91 = load.i64 notrap aligned v90+8+;; @009f v90 = load.i64 notrap aligned readonly can_move region3 v0+48+;; @009f v91 = load.i64 notrap aligned region4 v90+8;; @009f v92 = ireduce.i32 v91;; @009f v93 = icmp uge v89, v92;; @009f v94 = uextend.i64 v89-;; @009f v95 = load.i64 notrap aligned readonly can_move region2 v0+48-;; @009f v96 = load.i64 notrap aligned v95+;; @009f v95 = load.i64 notrap aligned readonly can_move region3 v0+48+;; @009f v96 = load.i64 notrap aligned region2 v95;; @009f v97 = iconst.i64 3;; @009f v98 = ishl v94, v97 ; v97 = 3;; @009f v99 = iadd v96, v98;; @009f v100 = iconst.i64 0;; @009f v101 = select_spectre_guard v93, v100, v99 ; v100 = 0-;; @009f v102 = load.i64 user6 aligned region3 v101+;; @009f v102 = load.i64 user6 aligned region5 v101;; @009f v103 = iconst.i64 -2;; @009f v104 = band v102, v103 ; v103 = -2;; @009f brif v102, block9(v104), block8diff --git a/tests/disas/table-get-fixed-size.wat b/tests/disas/table-get-fixed-size.watindex db7a51694c..bc6decea93 100644--- a/tests/disas/table-get-fixed-size.wat+++ b/tests/disas/table-get-fixed-size.wat@@ -18,7 +18,8 @@;; function u0:0(i64 vmctx, i64) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1073741824 "PublicTable"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1073741824 "PublicTable";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -29,13 +30,13 @@;; @0054 v4 = iconst.i32 7;; @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+;; @0054 v7 = load.i64 notrap aligned readonly can_move region2 v0+48;; @0054 v8 = iconst.i64 2;; @0054 v9 = ishl v6, v8 ; v8 = 2;; @0054 v10 = iadd v7, v9;; @0054 v11 = iconst.i64 0;; @0054 v12 = select_spectre_guard v5, v11, v10 ; v11 = 0-;; @0054 v13 = load.i32 user6 aligned region2 v12+;; @0054 v13 = load.i32 user6 aligned region3 v12;; @0056 jump block1;;;; block1:@@ -45,7 +46,8 @@;; function u0:1(i64 vmctx, i64, i32) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1073741824 "PublicTable"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1073741824 "PublicTable";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -55,13 +57,13 @@;; @005b v4 = iconst.i32 7;; @005b v5 = icmp uge v2, v4 ; v4 = 7;; @005b v6 = uextend.i64 v2-;; @005b v7 = load.i64 notrap aligned readonly can_move v0+48+;; @005b v7 = load.i64 notrap aligned readonly can_move region2 v0+48;; @005b v8 = iconst.i64 2;; @005b v9 = ishl v6, v8 ; v8 = 2;; @005b v10 = iadd v7, v9;; @005b v11 = iconst.i64 0;; @005b v12 = select_spectre_guard v5, v11, v10 ; v11 = 0-;; @005b v13 = load.i32 user6 aligned region2 v12+;; @005b v13 = load.i32 user6 aligned region3 v12;; @005d jump block1;;;; block1:diff --git a/tests/disas/table-get.wat b/tests/disas/table-get.watindex 059c14d8d5..0221f0f958 100644--- a/tests/disas/table-get.wat+++ b/tests/disas/table-get.wat@@ -17,7 +17,9 @@;; function u0:0(i64 vmctx, i64) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1073741824 "PublicTable"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 2684354568 "VMTableDefinition+0x8"+;; region4 = 1073741824 "PublicTable";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -25,17 +27,17 @@;;;; block0(v0: i64, v1: i64):;; @0051 v3 = iconst.i32 0-;; @0053 v4 = load.i64 notrap aligned v0+56+;; @0053 v4 = load.i64 notrap aligned region3 v0+56;; @0053 v5 = ireduce.i32 v4;; @0053 v6 = icmp uge v3, v5 ; v3 = 0;; @0053 v7 = uextend.i64 v3 ; v3 = 0-;; @0053 v8 = load.i64 notrap aligned v0+48+;; @0053 v8 = load.i64 notrap aligned region2 v0+48;; @0053 v9 = iconst.i64 2;; @0053 v10 = ishl v7, v9 ; v9 = 2;; @0053 v11 = iadd v8, v10;; @0053 v12 = iconst.i64 0;; @0053 v13 = select_spectre_guard v6, v12, v11 ; v12 = 0-;; @0053 v14 = load.i32 user6 aligned region2 v13+;; @0053 v14 = load.i32 user6 aligned region4 v13;; @0055 jump block1;;;; block1:@@ -45,24 +47,26 @@;; function u0:1(i64 vmctx, i64, i32) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1073741824 "PublicTable"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 2684354568 "VMTableDefinition+0x8"+;; region4 = 1073741824 "PublicTable";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @005a v4 = load.i64 notrap aligned v0+56+;; @005a v4 = load.i64 notrap aligned region3 v0+56;; @005a v5 = ireduce.i32 v4;; @005a v6 = icmp uge v2, v5;; @005a v7 = uextend.i64 v2-;; @005a v8 = load.i64 notrap aligned v0+48+;; @005a v8 = load.i64 notrap aligned region2 v0+48;; @005a v9 = iconst.i64 2;; @005a v10 = ishl v7, v9 ; v9 = 2;; @005a v11 = iadd v8, v10;; @005a v12 = iconst.i64 0;; @005a v13 = select_spectre_guard v6, v12, v11 ; v12 = 0-;; @005a v14 = load.i32 user6 aligned region2 v13+;; @005a v14 = load.i32 user6 aligned region4 v13;; @005c jump block1;;;; block1:diff --git a/tests/disas/table-set-fixed-size.wat b/tests/disas/table-set-fixed-size.watindex 6f73888fdb..742b0a1838 100644--- a/tests/disas/table-set-fixed-size.wat+++ b/tests/disas/table-set-fixed-size.wat@@ -19,7 +19,8 @@;; function u0:0(i64 vmctx, i64, i32) tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1073741824 "PublicTable"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1073741824 "PublicTable";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -30,13 +31,13 @@;; @0056 v4 = iconst.i32 7;; @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+;; @0056 v7 = load.i64 notrap aligned readonly can_move region2 v0+48;; @0056 v8 = iconst.i64 2;; @0056 v9 = ishl v6, v8 ; v8 = 2;; @0056 v10 = iadd v7, v9;; @0056 v11 = iconst.i64 0;; @0056 v12 = select_spectre_guard v5, v11, v10 ; v11 = 0-;; @0056 store user6 aligned region2 v2, v12+;; @0056 store user6 aligned region3 v2, v12;; @0058 jump block1;;;; block1:@@ -46,7 +47,8 @@;; function u0:1(i64 vmctx, i64, i32, i32) tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1073741824 "PublicTable"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1073741824 "PublicTable";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -56,13 +58,13 @@;; @005f v4 = iconst.i32 7;; @005f v5 = icmp uge v2, v4 ; v4 = 7;; @005f v6 = uextend.i64 v2-;; @005f v7 = load.i64 notrap aligned readonly can_move v0+48+;; @005f v7 = load.i64 notrap aligned readonly can_move region2 v0+48;; @005f v8 = iconst.i64 2;; @005f v9 = ishl v6, v8 ; v8 = 2;; @005f v10 = iadd v7, v9;; @005f v11 = iconst.i64 0;; @005f v12 = select_spectre_guard v5, v11, v10 ; v11 = 0-;; @005f store user6 aligned region2 v3, v12+;; @005f store user6 aligned region3 v3, v12;; @0061 jump block1;;;; block1:diff --git a/tests/disas/table-set.wat b/tests/disas/table-set.watindex 82481d16b0..717e0482bf 100644--- a/tests/disas/table-set.wat+++ b/tests/disas/table-set.wat@@ -19,7 +19,9 @@;; function u0:0(i64 vmctx, i64, i32) tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1073741824 "PublicTable"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 2684354568 "VMTableDefinition+0x8"+;; region4 = 1073741824 "PublicTable";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -27,17 +29,17 @@;;;; block0(v0: i64, v1: i64, v2: i32):;; @0051 v3 = iconst.i32 0-;; @0055 v4 = load.i64 notrap aligned v0+56+;; @0055 v4 = load.i64 notrap aligned region3 v0+56;; @0055 v5 = ireduce.i32 v4;; @0055 v6 = icmp uge v3, v5 ; v3 = 0;; @0055 v7 = uextend.i64 v3 ; v3 = 0-;; @0055 v8 = load.i64 notrap aligned v0+48+;; @0055 v8 = load.i64 notrap aligned region2 v0+48;; @0055 v9 = iconst.i64 2;; @0055 v10 = ishl v7, v9 ; v9 = 2;; @0055 v11 = iadd v8, v10;; @0055 v12 = iconst.i64 0;; @0055 v13 = select_spectre_guard v6, v12, v11 ; v12 = 0-;; @0055 store user6 aligned region2 v2, v13+;; @0055 store user6 aligned region4 v2, v13;; @0057 jump block1;;;; block1:@@ -47,24 +49,26 @@;; function u0:1(i64 vmctx, i64, i32, i32) tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1073741824 "PublicTable"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 2684354568 "VMTableDefinition+0x8"+;; region4 = 1073741824 "PublicTable";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @005e v4 = load.i64 notrap aligned v0+56+;; @005e v4 = load.i64 notrap aligned region3 v0+56;; @005e v5 = ireduce.i32 v4;; @005e v6 = icmp uge v2, v5;; @005e v7 = uextend.i64 v2-;; @005e v8 = load.i64 notrap aligned v0+48+;; @005e v8 = load.i64 notrap aligned region2 v0+48;; @005e v9 = iconst.i64 2;; @005e v10 = ishl v7, v9 ; v9 = 2;; @005e v11 = iadd v8, v10;; @005e v12 = iconst.i64 0;; @005e v13 = select_spectre_guard v6, v12, v11 ; v12 = 0-;; @005e store user6 aligned region2 v3, v13+;; @005e store user6 aligned region4 v3, v13;; @0060 jump block1;;;; block1:diff --git a/tests/disas/typed-funcrefs-eager-init.wat b/tests/disas/typed-funcrefs-eager-init.watindex c9cb49f2e0..2723e22cc7 100644--- a/tests/disas/typed-funcrefs-eager-init.wat+++ b/tests/disas/typed-funcrefs-eager-init.wat@@ -131,7 +131,8 @@;; function u0:1(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -139,16 +140,16 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32, v5: i32):-;; @0048 v12 = load.i64 notrap aligned readonly can_move v0+48+;; @0048 v12 = load.i64 notrap aligned readonly can_move region2 v0+48;; v45 = iconst.i64 8;; @0048 v15 = iadd v12, v45 ; v45 = 8-;; @0048 v18 = load.i64 user6 aligned region2 v15+;; @0048 v18 = load.i64 user6 aligned region3 v15;; @004a v19 = load.i64 user16 aligned readonly v18+8;; @004a v20 = load.i64 notrap aligned readonly v18+24;; @004a v21 = call_indirect sig0, v19(v20, v0, v2, v3, v4, v5);; v52 = iconst.i64 16;; @005b v30 = iadd v12, v52 ; v52 = 16-;; @005b v33 = load.i64 user6 aligned region2 v30+;; @005b v33 = load.i64 user6 aligned region3 v30;; @005d v34 = load.i64 user16 aligned readonly v33+8;; @005d v35 = load.i64 notrap aligned readonly v33+24;; @005d v36 = call_indirect sig0, v34(v35, v0, v2, v3, v4, v5)@@ -162,7 +163,8 @@;; function u0:2(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -170,16 +172,16 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32, v5: i32):-;; @0075 v12 = load.i64 notrap aligned readonly can_move v0+48+;; @0075 v12 = load.i64 notrap aligned readonly can_move region2 v0+48;; v45 = iconst.i64 8;; @0075 v15 = iadd v12, v45 ; v45 = 8-;; @0075 v18 = load.i64 user6 aligned region2 v15+;; @0075 v18 = load.i64 user6 aligned region3 v15;; @0075 v19 = load.i64 user7 aligned readonly v18+8;; @0075 v20 = load.i64 notrap aligned readonly v18+24;; @0075 v21 = call_indirect sig0, v19(v20, v0, v2, v3, v4, v5);; v52 = iconst.i64 16;; @0087 v30 = iadd v12, v52 ; v52 = 16-;; @0087 v33 = load.i64 user6 aligned region2 v30+;; @0087 v33 = load.i64 user6 aligned region3 v30;; @0087 v34 = load.i64 user7 aligned readonly v33+8;; @0087 v35 = load.i64 notrap aligned readonly v33+24;; @0087 v36 = call_indirect sig0, v34(v35, v0, v2, v3, v4, v5)diff --git a/tests/disas/typed-funcrefs.wat b/tests/disas/typed-funcrefs.watindex a3ab4ae7b1..d8a195dcd6 100644--- a/tests/disas/typed-funcrefs.wat+++ b/tests/disas/typed-funcrefs.wat@@ -131,7 +131,8 @@;; function u0:1(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -141,10 +142,10 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32, v5: i32):-;; @0048 v12 = load.i64 notrap aligned readonly can_move v0+48+;; @0048 v12 = load.i64 notrap aligned readonly can_move region2 v0+48;; v63 = iconst.i64 8;; @0048 v15 = iadd v12, v63 ; v63 = 8-;; @0048 v18 = load.i64 user6 aligned region2 v15+;; @0048 v18 = load.i64 user6 aligned region3 v15;; @0048 v19 = iconst.i64 -2;; @0048 v20 = band v18, v19 ; v19 = -2;; @0048 brif v18, block3(v20), block2@@ -161,7 +162,7 @@;; @004a v27 = call_indirect sig1, v25(v26, v0, v2, v3, v4, v5);; v70 = iconst.i64 16;; @005b v41 = iadd.i64 v12, v70 ; v70 = 16-;; @005b v44 = load.i64 user6 aligned region2 v41+;; @005b v44 = load.i64 user6 aligned region3 v41;; v71 = iconst.i64 -2;; v72 = band v44, v71 ; v71 = -2;; @005b brif v44, block5(v72), block4@@ -186,7 +187,8 @@;; function u0:2(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail {;; region0 = 8 "VMContext+0x8";; region1 = 268435480 "VMStoreContext+0x18"-;; region2 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))"+;; region2 = 2684354560 "VMTableDefinition+0x0"+;; region3 = 1342177280 "DefinedTable(StaticModuleIndex(0), DefinedTableIndex(0))";; gv0 = vmctx;; gv1 = load.i64 notrap aligned readonly can_move region0 gv0+8;; gv2 = load.i64 notrap aligned region1 gv1+24@@ -196,10 +198,10 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32, v5: i32):-;; @0075 v12 = load.i64 notrap aligned readonly can_move v0+48+;; @0075 v12 = load.i64 notrap aligned readonly can_move region2 v0+48;; v63 = iconst.i64 8;; @0075 v15 = iadd v12, v63 ; v63 = 8-;; @0075 v18 = load.i64 user6 aligned region2 v15+;; @0075 v18 = load.i64 user6 aligned region3 v15;; @0075 v19 = iconst.i64 -2;; @0075 v20 = band v18, v19 ; v19 = -2;; @0075 brif v18, block3(v20), block2@@ -216,7 +218,7 @@;; @0075 v27 = call_indirect sig0, v25(v26, v0, v2, v3, v4, v5);; v70 = iconst.i64 16;; @0087 v41 = iadd.i64 v12, v70 ; v70 = 16-;; @0087 v44 = load.i64 user6 aligned region2 v41+;; @0087 v44 = load.i64 user6 aligned region3 v41;; v71 = iconst.i64 -2;; v72 = band v44, v71 ; v71 = -2;; @0087 brif v44, block5(v72), block4