A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Harden Wasmtime's compiled GC code against corruption (#13321)
Alex Crichton736858d09833
diff --git a/cranelift/codegen/meta/src/pulley.rs b/cranelift/codegen/meta/src/pulley.rsindex 06d1448721..77e760eda7 100644--- a/cranelift/codegen/meta/src/pulley.rs+++ b/cranelift/codegen/meta/src/pulley.rs@@ -75,14 +75,16 @@ impl Inst<'_> {},(name, ty) => Operand::Normal { name, ty },})- .chain(if self.name.contains("Trap") {- Some(Operand::TrapCode {- name: "code",- ty: "TrapCode",- })- } else {- None- })+ .chain(+ if self.name.contains("Trap") || self.fields.iter().any(|(_, ty)| *ty == "AddrZ") {+ Some(Operand::TrapCode {+ name: "code",+ ty: "TrapCode",+ })+ } else {+ None+ },+ )}fn skip(&self) -> bool {diff --git a/cranelift/codegen/src/isa/pulley_shared/inst.isle b/cranelift/codegen/src/isa/pulley_shared/inst.isleindex ba96439db1..2fd938b50d 100644--- a/cranelift/codegen/src/isa/pulley_shared/inst.isle+++ b/cranelift/codegen/src/isa/pulley_shared/inst.isle@@ -298,6 +298,9 @@(decl pure memflags_nontrapping (MemFlags) bool)(extern constructor memflags_nontrapping memflags_nontrapping)+(decl pure partial memflags_trapping (MemFlags) TrapCode)+(extern constructor memflags_trapping memflags_trapping)+(decl pure memflags_is_wasm (MemFlags) bool)(extern constructor memflags_is_wasm memflags_is_wasm)diff --git a/cranelift/codegen/src/isa/pulley_shared/lower.isle b/cranelift/codegen/src/isa/pulley_shared/lower.isleindex d6df01f9df..d31c7528fc 100644--- a/cranelift/codegen/src/isa/pulley_shared/lower.isle+++ b/cranelift/codegen/src/isa/pulley_shared/lower.isle@@ -1069,29 +1069,48 @@(rule (emit_addro32_xload addr $I32 (ExtKind.Zero64)) (pulley_zext32 (pulley_xload32le_o32 addr)))(rule (emit_addro32_xload addr $I64 _ext) (pulley_xload64le_o32 addr))-;; Special case: wasm loads/stores that map trap use the `*_z` addressing modes-;; which generates a trap for load-from-null.+;; Special case: trapping loads/stores that map trap use the `*_z` addressing+;; modes which generates a trap for load-from-null.(rule 1 (gen_xload addr offset flags ty ext)- (if-let true (memflags_is_wasm flags))- (emit_addrz_xload (addrz addr offset) ty ext))--(decl emit_addrz_xload (AddrZ Type ExtKind) XReg)-(rule (emit_addrz_xload addr $I8 (ExtKind.None)) (pulley_xload8_u32_z addr))-(rule (emit_addrz_xload addr $I8 (ExtKind.Sign32)) (pulley_xload8_s32_z addr))-(rule (emit_addrz_xload addr $I8 (ExtKind.Zero32)) (pulley_xload8_u32_z addr))-(rule (emit_addrz_xload addr $I8 (ExtKind.Sign64)) (pulley_sext32 (pulley_xload8_s32_z addr)))-(rule (emit_addrz_xload addr $I8 (ExtKind.Zero64)) (pulley_zext32 (pulley_xload8_u32_z addr)))-(rule (emit_addrz_xload addr $I16 (ExtKind.None)) (pulley_xload16le_u32_z addr))-(rule (emit_addrz_xload addr $I16 (ExtKind.Sign32)) (pulley_xload16le_s32_z addr))-(rule (emit_addrz_xload addr $I16 (ExtKind.Zero32)) (pulley_xload16le_u32_z addr))-(rule (emit_addrz_xload addr $I16 (ExtKind.Sign64)) (pulley_sext32 (pulley_xload16le_s32_z addr)))-(rule (emit_addrz_xload addr $I16 (ExtKind.Zero64)) (pulley_zext32 (pulley_xload16le_u32_z addr)))-(rule (emit_addrz_xload addr $I32 (ExtKind.None)) (pulley_xload32le_z addr))-(rule (emit_addrz_xload addr $I32 (ExtKind.Sign32)) (pulley_xload32le_z addr))-(rule (emit_addrz_xload addr $I32 (ExtKind.Zero32)) (pulley_xload32le_z addr))-(rule (emit_addrz_xload addr $I32 (ExtKind.Sign64)) (pulley_sext32 (pulley_xload32le_z addr)))-(rule (emit_addrz_xload addr $I32 (ExtKind.Zero64)) (pulley_zext32 (pulley_xload32le_z addr)))-(rule (emit_addrz_xload addr $I64 _ext) (pulley_xload64le_z addr))+ (if-let trap (memflags_trapping flags))+ (if-let (Endianness.Little) (endianness flags))+ (emit_addrz_xload_le (addrz addr offset) ty ext trap))+(rule 1 (gen_xload addr offset flags ty ext)+ (if-let trap (memflags_trapping flags))+ (if-let (Endianness.Big) (endianness flags))+ (emit_addrz_xload_be (addrz addr offset) ty ext trap))++(decl emit_addrz_xload_le (AddrZ Type ExtKind TrapCode) XReg)+(rule (emit_addrz_xload_le addr $I8 (ExtKind.None) c) (pulley_xload8_u32_z addr c))+(rule (emit_addrz_xload_le addr $I8 (ExtKind.Sign32) c) (pulley_xload8_s32_z addr c))+(rule (emit_addrz_xload_le addr $I8 (ExtKind.Zero32) c) (pulley_xload8_u32_z addr c))+(rule (emit_addrz_xload_le addr $I8 (ExtKind.Sign64) c) (pulley_sext32 (pulley_xload8_s32_z addr c)))+(rule (emit_addrz_xload_le addr $I8 (ExtKind.Zero64) c) (pulley_zext32 (pulley_xload8_u32_z addr c)))+(rule (emit_addrz_xload_le addr $I16 (ExtKind.None) c) (pulley_xload16le_u32_z addr c))+(rule (emit_addrz_xload_le addr $I16 (ExtKind.Sign32) c) (pulley_xload16le_s32_z addr c))+(rule (emit_addrz_xload_le addr $I16 (ExtKind.Zero32) c) (pulley_xload16le_u32_z addr c))+(rule (emit_addrz_xload_le addr $I16 (ExtKind.Sign64) c) (pulley_sext32 (pulley_xload16le_s32_z addr c)))+(rule (emit_addrz_xload_le addr $I16 (ExtKind.Zero64) c) (pulley_zext32 (pulley_xload16le_u32_z addr c)))+(rule (emit_addrz_xload_le addr $I32 (ExtKind.None) c) (pulley_xload32le_z addr c))+(rule (emit_addrz_xload_le addr $I32 (ExtKind.Sign32) c) (pulley_xload32le_z addr c))+(rule (emit_addrz_xload_le addr $I32 (ExtKind.Zero32) c) (pulley_xload32le_z addr c))+(rule (emit_addrz_xload_le addr $I32 (ExtKind.Sign64) c) (pulley_sext32 (pulley_xload32le_z addr c)))+(rule (emit_addrz_xload_le addr $I32 (ExtKind.Zero64) c) (pulley_zext32 (pulley_xload32le_z addr c)))+(rule (emit_addrz_xload_le addr $I64 _ext c) (pulley_xload64le_z addr c))++(decl emit_addrz_xload_be (AddrZ Type ExtKind TrapCode) XReg)+(rule (emit_addrz_xload_be addr $I8 e c) (emit_addrz_xload_le addr $I8 e c))+(rule (emit_addrz_xload_be addr $I16 (ExtKind.None) c) (pulley_xload16be_u32_z addr c))+(rule (emit_addrz_xload_be addr $I16 (ExtKind.Sign32) c) (pulley_xload16be_s32_z addr c))+(rule (emit_addrz_xload_be addr $I16 (ExtKind.Zero32) c) (pulley_xload16be_u32_z addr c))+(rule (emit_addrz_xload_be addr $I16 (ExtKind.Sign64) c) (pulley_sext32 (pulley_xload16be_s32_z addr c)))+(rule (emit_addrz_xload_be addr $I16 (ExtKind.Zero64) c) (pulley_zext32 (pulley_xload16be_u32_z addr c)))+(rule (emit_addrz_xload_be addr $I32 (ExtKind.None) c) (pulley_xload32be_z addr c))+(rule (emit_addrz_xload_be addr $I32 (ExtKind.Sign32) c) (pulley_xload32be_z addr c))+(rule (emit_addrz_xload_be addr $I32 (ExtKind.Zero32) c) (pulley_xload32be_z addr c))+(rule (emit_addrz_xload_be addr $I32 (ExtKind.Sign64) c) (pulley_sext32 (pulley_xload32be_z addr c)))+(rule (emit_addrz_xload_be addr $I32 (ExtKind.Zero64) c) (pulley_zext32 (pulley_xload32be_z addr c)))+(rule (emit_addrz_xload_be addr $I64 _ext c) (pulley_xload64be_z addr c));; Special case: wasm loads/stores that may trap use the `*_g32` addressing;; modes. This is a superset of the `*_z` modes above and requires extracting@@ -1155,14 +1174,22 @@(pulley_fload (amode addr offset) ty flags));; Base case: use trapping loads stores with the `*_z` addressing mode for-;; wasm-looking loads/stores.+;; loads/stores.(rule 1 (gen_fload addr offset flags ty)- (if-let true (memflags_is_wasm flags))- (emit_addrz_fload (addrz addr offset) ty))+ (if-let code (memflags_trapping flags))+ (if-let (Endianness.Little) (endianness flags))+ (emit_addrz_fload_le (addrz addr offset) ty code))+(rule 1 (gen_fload addr offset flags ty)+ (if-let code (memflags_trapping flags))+ (if-let (Endianness.Big) (endianness flags))+ (emit_addrz_fload_be (addrz addr offset) ty code))-(decl emit_addrz_fload (AddrZ Type) FReg)-(rule (emit_addrz_fload addr $F32) (pulley_fload32le_z addr))-(rule (emit_addrz_fload addr $F64) (pulley_fload64le_z addr))+(decl emit_addrz_fload_le (AddrZ Type TrapCode) FReg)+(rule (emit_addrz_fload_le addr $F32 c) (pulley_fload32le_z addr c))+(rule (emit_addrz_fload_le addr $F64 c) (pulley_fload64le_z addr c))+(decl emit_addrz_fload_be (AddrZ Type TrapCode) FReg)+(rule (emit_addrz_fload_be addr $F32 c) (pulley_fload32be_z addr c))+(rule (emit_addrz_fload_be addr $F64 c) (pulley_fload64be_z addr c));; Special case: use `*_g32` addressing when the bounds-check can be;; pattern-matched.@@ -1184,19 +1211,27 @@(if-let true (memflags_nontrapping flags))(pulley_vload (amode addr offset) ty flags))-;; Base case: wasm loads/stores using the `*_z` addressing mode.+;; Base case: trapping loads/stores using the `*_z` addressing mode.+(rule 1 (gen_vload addr offset flags ty ext)+ (if-let code (memflags_trapping flags))+ (if-let (Endianness.Little) (endianness flags))+ (emit_addrz_vload_le (addrz addr offset) ty ext code))(rule 1 (gen_vload addr offset flags ty ext)- (if-let true (memflags_is_wasm flags))- (emit_addrz_vload (addrz addr offset) ty ext))--(decl emit_addrz_vload (AddrZ Type VExtKind) VReg)-(rule (emit_addrz_vload addr (ty_vec128 _) (VExtKind.None)) (pulley_vload128le_z addr))-(rule (emit_addrz_vload addr (ty_vec128 _) (VExtKind.S8x8)) (pulley_vload8x8_s_z addr))-(rule (emit_addrz_vload addr (ty_vec128 _) (VExtKind.U8x8)) (pulley_vload8x8_u_z addr))-(rule (emit_addrz_vload addr (ty_vec128 _) (VExtKind.S16x4)) (pulley_vload16x4le_s_z addr))-(rule (emit_addrz_vload addr (ty_vec128 _) (VExtKind.U16x4)) (pulley_vload16x4le_u_z addr))-(rule (emit_addrz_vload addr (ty_vec128 _) (VExtKind.S32x2)) (pulley_vload32x2le_s_z addr))-(rule (emit_addrz_vload addr (ty_vec128 _) (VExtKind.U32x2)) (pulley_vload32x2le_u_z addr))+ (if-let code (memflags_trapping flags))+ (if-let (Endianness.Big) (endianness flags))+ (emit_addrz_vload_be (addrz addr offset) ty ext code))++(decl emit_addrz_vload_le (AddrZ Type VExtKind TrapCode) VReg)+(rule (emit_addrz_vload_le addr (ty_vec128 _) (VExtKind.None) c) (pulley_vload128le_z addr c))+(rule (emit_addrz_vload_le addr (ty_vec128 _) (VExtKind.S8x8) c) (pulley_vload8x8_s_z addr c))+(rule (emit_addrz_vload_le addr (ty_vec128 _) (VExtKind.U8x8) c) (pulley_vload8x8_u_z addr c))+(rule (emit_addrz_vload_le addr (ty_vec128 _) (VExtKind.S16x4) c) (pulley_vload16x4le_s_z addr c))+(rule (emit_addrz_vload_le addr (ty_vec128 _) (VExtKind.U16x4) c) (pulley_vload16x4le_u_z addr c))+(rule (emit_addrz_vload_le addr (ty_vec128 _) (VExtKind.S32x2) c) (pulley_vload32x2le_s_z addr c))+(rule (emit_addrz_vload_le addr (ty_vec128 _) (VExtKind.U32x2) c) (pulley_vload32x2le_u_z addr c))++(decl emit_addrz_vload_be (AddrZ Type VExtKind TrapCode) VReg)+(rule (emit_addrz_vload_be addr (ty_vec128 _) (VExtKind.None) c) (pulley_vload128be_z addr c));; Special case: use `*_g32` addressing when the bounds-check can be;; pattern-matched.@@ -1263,19 +1298,33 @@(if-let true (memflags_nontrapping flags))(pulley_vstore (amode addr offset) src ty flags))-;; Base case: wasm stores+;; Base case: trapping stores(rule 3 (gen_store src addr offset flags ty)- (if-let true (memflags_is_wasm flags))- (emit_addrz_store (addrz addr offset) src ty))--(decl emit_addrz_store (AddrZ Value Type) SideEffectNoResult)-(rule (emit_addrz_store addr val $I8) (pulley_xstore8_z addr val))-(rule (emit_addrz_store addr val $I16) (pulley_xstore16le_z addr val))-(rule (emit_addrz_store addr val $I32) (pulley_xstore32le_z addr val))-(rule (emit_addrz_store addr val $I64) (pulley_xstore64le_z addr val))-(rule (emit_addrz_store addr val $F32) (pulley_fstore32le_z addr val))-(rule (emit_addrz_store addr val $F64) (pulley_fstore64le_z addr val))-(rule 1 (emit_addrz_store addr val (ty_vec128 _)) (pulley_vstore128le_z addr val))+ (if-let code (memflags_trapping flags))+ (if-let (Endianness.Little) (endianness flags))+ (emit_addrz_store_le (addrz addr offset) src ty code))+(rule 3 (gen_store src addr offset flags ty)+ (if-let code (memflags_trapping flags))+ (if-let (Endianness.Big) (endianness flags))+ (emit_addrz_store_be (addrz addr offset) src ty code))++(decl emit_addrz_store_le (AddrZ Value Type TrapCode) SideEffectNoResult)+(rule (emit_addrz_store_le addr val $I8 c) (pulley_xstore8_z addr val c))+(rule (emit_addrz_store_le addr val $I16 c) (pulley_xstore16le_z addr val c))+(rule (emit_addrz_store_le addr val $I32 c) (pulley_xstore32le_z addr val c))+(rule (emit_addrz_store_le addr val $I64 c) (pulley_xstore64le_z addr val c))+(rule (emit_addrz_store_le addr val $F32 c) (pulley_fstore32le_z addr val c))+(rule (emit_addrz_store_le addr val $F64 c) (pulley_fstore64le_z addr val c))+(rule 1 (emit_addrz_store_le addr val (ty_vec128 _) c) (pulley_vstore128le_z addr val c))++(decl emit_addrz_store_be (AddrZ Value Type TrapCode) SideEffectNoResult)+(rule (emit_addrz_store_be addr val $I8 c) (pulley_xstore8_z addr val c))+(rule (emit_addrz_store_be addr val $I16 c) (pulley_xstore16be_z addr val c))+(rule (emit_addrz_store_be addr val $I32 c) (pulley_xstore32be_z addr val c))+(rule (emit_addrz_store_be addr val $I64 c) (pulley_xstore64be_z addr val c))+(rule (emit_addrz_store_be addr val $F32 c) (pulley_fstore32be_z addr val c))+(rule (emit_addrz_store_be addr val $F64 c) (pulley_fstore64be_z addr val c))+(rule 1 (emit_addrz_store_be addr val (ty_vec128 _) c) (pulley_vstore128be_z addr val c));; special case: wasm stores with a folded bounds check(rule 4 (gen_store src addr offset flags ty)diff --git a/cranelift/codegen/src/isa/pulley_shared/lower/isle.rs b/cranelift/codegen/src/isa/pulley_shared/lower/isle.rsindex d72b6a0237..af900f72fa 100644--- a/cranelift/codegen/src/isa/pulley_shared/lower/isle.rs+++ b/cranelift/codegen/src/isa/pulley_shared/lower/isle.rs@@ -276,6 +276,10 @@ whereflags.trap_code().is_none()}+ fn memflags_trapping(&mut self, flags: MemFlags) -> Option<TrapCode> {+ flags.trap_code()+ }+fn memflags_is_wasm(&mut self, flags: MemFlags) -> bool {flags.trap_code() == Some(TrapCode::HEAP_OUT_OF_BOUNDS)&& self.endianness(flags) == Endianness::Littlediff --git a/cranelift/filetests/filetests/isa/pulley32/load.clif b/cranelift/filetests/filetests/isa/pulley32/load.clifindex fc0b6156d4..8a3886e176 100644--- a/cranelift/filetests/filetests/isa/pulley32/load.clif+++ b/cranelift/filetests/filetests/isa/pulley32/load.clif@@ -9,7 +9,7 @@ block0(v0: i32):; VCode:; block0:-; xload32le_z x0, x0, 0+; xload32le_z x0, x0, 0 // trap=TrapCode(253); ret;; Disassembled:@@ -24,7 +24,7 @@ block0(v0: i32):; VCode:; block0:-; xload64le_z x0, x0, 0+; xload64le_z x0, x0, 0 // trap=TrapCode(253); ret;; Disassembled:@@ -39,7 +39,7 @@ block0(v0: i32):; VCode:; block0:-; xload32le_z x0, x0, 4+; xload32le_z x0, x0, 4 // trap=TrapCode(253); ret;; Disassembled:@@ -54,7 +54,7 @@ block0(v0: i32):; VCode:; block0:-; xload64le_z x0, x0, 8+; xload64le_z x0, x0, 8 // trap=TrapCode(253); ret;; Disassembled:diff --git a/cranelift/filetests/filetests/isa/pulley32/store.clif b/cranelift/filetests/filetests/isa/pulley32/store.clifindex 7e4217f580..701e3236b3 100644--- a/cranelift/filetests/filetests/isa/pulley32/store.clif+++ b/cranelift/filetests/filetests/isa/pulley32/store.clif@@ -9,7 +9,7 @@ block0(v0: i32, v1: i32):; VCode:; block0:-; xstore32le_z x1, 0, x0+; xstore32le_z x1, 0, x0 // trap=TrapCode(253); ret;; Disassembled:@@ -24,7 +24,7 @@ block0(v0: i64, v1: i32):; VCode:; block0:-; xstore64le_z x1, 0, x0+; xstore64le_z x1, 0, x0 // trap=TrapCode(253); ret;; Disassembled:@@ -39,7 +39,7 @@ block0(v0: i32, v1: i32):; VCode:; block0:-; xstore32le_z x1, 4, x0+; xstore32le_z x1, 4, x0 // trap=TrapCode(253); ret;; Disassembled:@@ -54,7 +54,7 @@ block0(v0: i64, v1: i32):; VCode:; block0:-; xstore64le_z x1, 8, x0+; xstore64le_z x1, 8, x0 // trap=TrapCode(253); ret;; Disassembled:diff --git a/cranelift/filetests/filetests/isa/pulley64/load.clif b/cranelift/filetests/filetests/isa/pulley64/load.clifindex a8ad2b01f9..c42a62f79d 100644--- a/cranelift/filetests/filetests/isa/pulley64/load.clif+++ b/cranelift/filetests/filetests/isa/pulley64/load.clif@@ -9,7 +9,7 @@ block0(v0: i64):; VCode:; block0:-; xload8_u32_z x0, x0, 0+; xload8_u32_z x0, x0, 0 // trap=TrapCode(253); ret;; Disassembled:@@ -24,7 +24,7 @@ block0(v0: i64):; VCode:; block0:-; xload8_s32_z x0, x0, 0+; xload8_s32_z x0, x0, 0 // trap=TrapCode(253); ret;; Disassembled:@@ -39,7 +39,7 @@ block0(v0: i64):; VCode:; block0:-; xload8_u32_z x0, x0, 0+; xload8_u32_z x0, x0, 0 // trap=TrapCode(253); ret;; Disassembled:@@ -54,7 +54,7 @@ block0(v0: i64):; VCode:; block0:-; xload16le_u32_z x0, x0, 0+; xload16le_u32_z x0, x0, 0 // trap=TrapCode(253); ret;; Disassembled:@@ -69,7 +69,7 @@ block0(v0: i64):; VCode:; block0:-; xload16le_s32_z x0, x0, 0+; xload16le_s32_z x0, x0, 0 // trap=TrapCode(253); ret;; Disassembled:@@ -84,7 +84,7 @@ block0(v0: i64):; VCode:; block0:-; xload16le_u32_z x0, x0, 0+; xload16le_u32_z x0, x0, 0 // trap=TrapCode(253); ret;; Disassembled:@@ -99,7 +99,7 @@ block0(v0: i64):; VCode:; block0:-; xload32le_z x0, x0, 0+; xload32le_z x0, x0, 0 // trap=TrapCode(253); ret;; Disassembled:@@ -114,7 +114,7 @@ block0(v0: i64):; VCode:; block0:-; xload32le_z x2, x0, 0+; xload32le_z x2, x0, 0 // trap=TrapCode(253); sext32 x0, x2; ret;@@ -131,7 +131,7 @@ block0(v0: i64):; VCode:; block0:-; xload32le_z x2, x0, 0+; xload32le_z x2, x0, 0 // trap=TrapCode(253); zext32 x0, x2; ret;@@ -148,7 +148,7 @@ block0(v0: i64):; VCode:; block0:-; xload64le_z x0, x0, 0+; xload64le_z x0, x0, 0 // trap=TrapCode(253); ret;; Disassembled:@@ -163,7 +163,7 @@ block0(v0: i64):; VCode:; block0:-; xload8_u32_z x0, x0, 4+; xload8_u32_z x0, x0, 4 // trap=TrapCode(253); ret;; Disassembled:@@ -178,7 +178,7 @@ block0(v0: i64):; VCode:; block0:-; xload8_s32_z x0, x0, 4+; xload8_s32_z x0, x0, 4 // trap=TrapCode(253); ret;; Disassembled:@@ -193,7 +193,7 @@ block0(v0: i64):; VCode:; block0:-; xload8_u32_z x0, x0, 4+; xload8_u32_z x0, x0, 4 // trap=TrapCode(253); ret;; Disassembled:@@ -208,7 +208,7 @@ block0(v0: i64):; VCode:; block0:-; xload16le_u32_z x0, x0, 4+; xload16le_u32_z x0, x0, 4 // trap=TrapCode(253); ret;; Disassembled:@@ -223,7 +223,7 @@ block0(v0: i64):; VCode:; block0:-; xload16le_s32_z x0, x0, 4+; xload16le_s32_z x0, x0, 4 // trap=TrapCode(253); ret;; Disassembled:@@ -238,7 +238,7 @@ block0(v0: i64):; VCode:; block0:-; xload16le_u32_z x0, x0, 4+; xload16le_u32_z x0, x0, 4 // trap=TrapCode(253); ret;; Disassembled:@@ -253,7 +253,7 @@ block0(v0: i64):; VCode:; block0:-; xload32le_z x0, x0, 4+; xload32le_z x0, x0, 4 // trap=TrapCode(253); ret;; Disassembled:@@ -268,7 +268,7 @@ block0(v0: i64):; VCode:; block0:-; xload32le_z x2, x0, 4+; xload32le_z x2, x0, 4 // trap=TrapCode(253); sext32 x0, x2; ret;@@ -285,7 +285,7 @@ block0(v0: i64):; VCode:; block0:-; xload32le_z x2, x0, 4+; xload32le_z x2, x0, 4 // trap=TrapCode(253); zext32 x0, x2; ret;@@ -302,7 +302,7 @@ block0(v0: i64):; VCode:; block0:-; xload64le_z x0, x0, 65536+; xload64le_z x0, x0, 65536 // trap=TrapCode(253); ret;; Disassembled:@@ -317,7 +317,7 @@ block0(v0: i64):; VCode:; block0:-; xload8_u32_z x0, x0, 65536+; xload8_u32_z x0, x0, 65536 // trap=TrapCode(253); ret;; Disassembled:@@ -332,7 +332,7 @@ block0(v0: i64):; VCode:; block0:-; xload8_s32_z x0, x0, 65536+; xload8_s32_z x0, x0, 65536 // trap=TrapCode(253); ret;; Disassembled:@@ -347,7 +347,7 @@ block0(v0: i64):; VCode:; block0:-; xload8_u32_z x0, x0, 65536+; xload8_u32_z x0, x0, 65536 // trap=TrapCode(253); ret;; Disassembled:@@ -362,7 +362,7 @@ block0(v0: i64):; VCode:; block0:-; xload16le_u32_z x0, x0, 65536+; xload16le_u32_z x0, x0, 65536 // trap=TrapCode(253); ret;; Disassembled:@@ -377,7 +377,7 @@ block0(v0: i64):; VCode:; block0:-; xload16le_s32_z x0, x0, 65536+; xload16le_s32_z x0, x0, 65536 // trap=TrapCode(253); ret;; Disassembled:@@ -392,7 +392,7 @@ block0(v0: i64):; VCode:; block0:-; xload16le_u32_z x0, x0, 65536+; xload16le_u32_z x0, x0, 65536 // trap=TrapCode(253); ret;; Disassembled:@@ -407,7 +407,7 @@ block0(v0: i64):; VCode:; block0:-; xload32le_z x0, x0, 65536+; xload32le_z x0, x0, 65536 // trap=TrapCode(253); ret;; Disassembled:@@ -422,7 +422,7 @@ block0(v0: i64):; VCode:; block0:-; xload32le_z x2, x0, 65536+; xload32le_z x2, x0, 65536 // trap=TrapCode(253); sext32 x0, x2; ret;@@ -439,7 +439,7 @@ block0(v0: i64):; VCode:; block0:-; xload32le_z x2, x0, 65536+; xload32le_z x2, x0, 65536 // trap=TrapCode(253); zext32 x0, x2; ret;@@ -456,7 +456,7 @@ block0(v0: i64):; VCode:; block0:-; xload64le_z x0, x0, 65536+; xload64le_z x0, x0, 65536 // trap=TrapCode(253); ret;; Disassembled:@@ -472,10 +472,122 @@ block0(v0: i64):; VCode:; block0:-; xload64le_z x0, x0, 18+; xload64le_z x0, x0, 18 // trap=TrapCode(253); ret;; Disassembled:; xload64le_z x0, x0, 18; ret+function %load_i8_be_custom_trap(i64) -> i8 {+block0(v0: i64):+ v1 = iadd_imm v0, 10+ v2 = load.i8 big user12 v1+8+ return v2+}++; VCode:+; block0:+; xload8_u32_z x0, x0, 18 // trap=TrapCode(12)+; ret+;+; Disassembled:+; xload8_u32_z x0, x0, 18+; ret++function %load_i16_be_custom_trap(i64) -> i16 {+block0(v0: i64):+ v1 = iadd_imm v0, 10+ v2 = load.i16 big user12 v1+8+ return v2+}++; VCode:+; block0:+; xload16be_u32_z x0, x0, 18 // trap=TrapCode(12)+; ret+;+; Disassembled:+; xload16be_u32_z x0, x0, 18+; ret++function %load_i32_be_custom_trap(i64) -> i32 {+block0(v0: i64):+ v1 = iadd_imm v0, 10+ v2 = load.i32 big user12 v1+8+ return v2+}++; VCode:+; block0:+; xload32be_z x0, x0, 18 // trap=TrapCode(12)+; ret+;+; Disassembled:+; xload32be_z x0, x0, 18+; ret++function %load_i64_be_custom_trap(i64) -> i64 {+block0(v0: i64):+ v1 = iadd_imm v0, 10+ v2 = load.i64 big user12 v1+8+ return v2+}++; VCode:+; block0:+; xload64be_z x0, x0, 18 // trap=TrapCode(12)+; ret+;+; Disassembled:+; xload64be_z x0, x0, 18+; ret++function %load_f32_be_custom_trap(i64) -> f32 {+block0(v0: i64):+ v1 = iadd_imm v0, 10+ v2 = load.f32 big user12 v1+8+ return v2+}++; VCode:+; block0:+; fload32be_z f0, x0, 18 // trap=TrapCode(12)+; ret+;+; Disassembled:+; fload32be_z f0, x0, 18+; ret++function %load_f64_be_custom_trap(i64) -> f64 {+block0(v0: i64):+ v1 = iadd_imm v0, 10+ v2 = load.f64 big user12 v1+8+ return v2+}++; VCode:+; block0:+; fload64be_z f0, x0, 18 // trap=TrapCode(12)+; ret+;+; Disassembled:+; fload64be_z f0, x0, 18+; ret++function %load_i64x2_be_custom_trap(i64) -> i64x2 {+block0(v0: i64):+ v1 = iadd_imm v0, 10+ v2 = load.i64x2 big user12 v1+8+ return v2+}++; VCode:+; block0:+; vload128be_z v0, x0, 18 // trap=TrapCode(12)+; ret+;+; Disassembled:+; vload128be_z v0, x0, 18+; ret+diff --git a/cranelift/filetests/filetests/isa/pulley64/store.clif b/cranelift/filetests/filetests/isa/pulley64/store.clifindex 7f3c881319..dae8b9793a 100644--- a/cranelift/filetests/filetests/isa/pulley64/store.clif+++ b/cranelift/filetests/filetests/isa/pulley64/store.clif@@ -9,7 +9,7 @@ block0(v0: i32, v1: i64):; VCode:; block0:-; xstore32le_z x1, 0, x0+; xstore32le_z x1, 0, x0 // trap=TrapCode(253); ret;; Disassembled:@@ -24,7 +24,7 @@ block0(v0: i64, v1: i64):; VCode:; block0:-; xstore64le_z x1, 0, x0+; xstore64le_z x1, 0, x0 // trap=TrapCode(253); ret;; Disassembled:@@ -39,7 +39,7 @@ block0(v0: i32, v1: i64):; VCode:; block0:-; xstore32le_z x1, 4, x0+; xstore32le_z x1, 4, x0 // trap=TrapCode(253); ret;; Disassembled:@@ -54,10 +54,115 @@ block0(v0: i64, v1: i64):; VCode:; block0:-; xstore64le_z x1, 8, x0+; xstore64le_z x1, 8, x0 // trap=TrapCode(253); ret;; Disassembled:; xstore64le_z x1, 8, x0; ret+function %store_i8_be_custom(i8, i64) {+block0(v0: i8, v1: i64):+ store big user13 v0, v1+ return+}++; VCode:+; block0:+; xstore8_z x1, 0, x0 // trap=TrapCode(13)+; ret+;+; Disassembled:+; xstore8_z x1, 0, x0+; ret++function %store_i16_be_custom(i16, i64) {+block0(v0: i16, v1: i64):+ store big user13 v0, v1+ return+}++; VCode:+; block0:+; xstore16be_z x1, 0, x0 // trap=TrapCode(13)+; ret+;+; Disassembled:+; xstore16be_z x1, 0, x0+; ret++function %store_i32_be_custom(i32, i64) {+block0(v0: i32, v1: i64):+ store big user13 v0, v1+ return+}++; VCode:+; block0:+; xstore32be_z x1, 0, x0 // trap=TrapCode(13)+; ret+;+; Disassembled:+; xstore32be_z x1, 0, x0+; ret++function %store_i64_be_custom(i64, i64) {+block0(v0: i64, v1: i64):+ store big user13 v0, v1+ return+}++; VCode:+; block0:+; xstore64be_z x1, 0, x0 // trap=TrapCode(13)+; ret+;+; Disassembled:+; xstore64be_z x1, 0, x0+; ret++function %store_f32_be_custom(f32, i64) {+block0(v0: f32, v1: i64):+ store big user13 v0, v1+ return+}++; VCode:+; block0:+; fstore32be_z x0, 0, f0 // trap=TrapCode(13)+; ret+;+; Disassembled:+; fstore32be_z x0, 0, f0+; ret++function %store_f64_be_custom(f64, i64) {+block0(v0: f64, v1: i64):+ store big user13 v0, v1+ return+}++; VCode:+; block0:+; fstore64be_z x0, 0, f0 // trap=TrapCode(13)+; ret+;+; Disassembled:+; fstore64be_z x0, 0, f0+; ret++function %store_i64x2_be_custom(i64x2, i64) {+block0(v0: i64x2, v1: i64):+ store big user13 v0, v1+ return+}++; VCode:+; block0:+; vstore128be_z x0, 0, v0 // trap=TrapCode(13)+; ret+;+; Disassembled:+; vstore128be_z x0, 0, v0+; ret+diff --git a/crates/cli-flags/src/lib.rs b/crates/cli-flags/src/lib.rsindex 37e98b93df..e8d15bc5bd 100644--- a/crates/cli-flags/src/lib.rs+++ b/crates/cli-flags/src/lib.rs@@ -266,6 +266,13 @@ wasmtime_option_group! {#[serde(deserialize_with = "crate::opt::cli_parse_wrapper")]pub inlining: Option<wasmtime::Inlining>,+ /// Whether or not trap metadata is present for wasm internal assertions+ /// in compiled code.+ pub metadata_for_internal_asserts: Option<bool>,+ /// Whether or not trap metadata is present for detection of gc+ /// corruption in compiled code.+ pub metadata_for_gc_heap_corruption: Option<bool>,+#[prefixed = "cranelift"]#[serde(default)]/// Set a cranelift-specific option. Use `wasmtime settings` to see@@ -975,6 +982,12 @@ impl CommonOptions {if let Some(enable) = self.codegen.inlining {config.compiler_inlining(enable);}+ if let Some(enable) = self.codegen.metadata_for_internal_asserts {+ config.metadata_for_internal_asserts(enable);+ }+ if let Some(enable) = self.codegen.metadata_for_gc_heap_corruption {+ config.metadata_for_gc_heap_corruption(enable);+ }// async_stack_size enabled by either async or stack-switching, so// cannot directly use match_feature!diff --git a/crates/cranelift/src/compiled_function.rs b/crates/cranelift/src/compiled_function.rsindex b28f2d5349..8641bb7fec 100644--- a/crates/cranelift/src/compiled_function.rs+++ b/crates/cranelift/src/compiled_function.rs@@ -7,6 +7,7 @@ use cranelift_codegen::{};use wasmtime_environ::{FilePos, FrameStateSlotBuilder, InstructionAddressMap, ModulePC, PrimaryMap, TrapInformation,+ Tunables,};#[derive(Debug, Clone, PartialEq, Eq, Default)]@@ -144,8 +145,14 @@ impl CompiledFunction {}/// Returns an iterator to the function's trap information.- pub fn traps(&self) -> impl Iterator<Item = TrapInformation> + '_ {- self.buffer.traps().iter().filter_map(mach_trap_to_trap)+ pub fn traps<'a>(+ &'a self,+ tunables: &'a Tunables,+ ) -> impl Iterator<Item = TrapInformation> + 'a {+ self.buffer+ .traps()+ .iter()+ .filter_map(move |t| mach_trap_to_trap(t, tunables))}/// Get the function's address map from the metadata.diff --git a/crates/cranelift/src/compiler.rs b/crates/cranelift/src/compiler.rsindex dc2df65574..546b6ad36b 100644--- a/crates/cranelift/src/compiler.rs+++ b/crates/cranelift/src/compiler.rs@@ -540,7 +540,10 @@ impl wasmtime_environ::Compiler for Compiler {func.buffer.user_stack_maps(),);- traps.push(range.clone(), &func.traps().collect::<Vec<_>>());+ traps.push(+ range.clone(),+ &func.traps(&self.tunables).collect::<Vec<_>>(),+ );clif_to_env_exception_tables(&mut exception_tables,range.clone(),diff --git a/crates/cranelift/src/func_environ/gc/enabled.rs b/crates/cranelift/src/func_environ/gc/enabled.rsindex 0a65d1c8a8..b5ac2cac73 100644--- a/crates/cranelift/src/func_environ/gc/enabled.rs+++ b/crates/cranelift/src/func_environ/gc/enabled.rs@@ -3,7 +3,7 @@ use crate::bounds_checks::BoundsCheck;use crate::func_environ::{Extension, FuncEnvironment};use crate::translate::{Heap, HeapData, MemoryKind, StructFieldsVec, TargetEnvironment};use crate::trap::TranslateTrap;-use crate::{Reachability, TRAP_INTERNAL_ASSERT};+use crate::{Reachability, TRAP_GC_HEAP_CORRUPT, TRAP_INTERNAL_ASSERT};use cranelift_codegen::ir::immediates::Offset32;use cranelift_codegen::ir::{BlockArg, ExceptionTableData, ExceptionTableItem};use cranelift_codegen::{@@ -27,6 +27,15 @@ mod null;#[cfg(feature = "gc-copying")]mod copying;+/// Flags to use for general-purpose GC loads/stores.+///+/// This is used for accesses to the GC heap which aren't expected to trap, but+/// retain internal assertion metadata to report if such a trap happens. This+/// is here to ensure that in the face of heap corruption that there's no+/// possible UB within Cranelift and/or the runtime.+const GC_MEMFLAGS: ir::MemFlags =+ ir::MemFlags::new().with_trap_code(Some(crate::TRAP_GC_HEAP_CORRUPT));+/// Get the default GC compiler.pub fn gc_compiler(func_env: &mut FuncEnvironment<'_>) -> WasmResult<Box<dyn GcCompiler>> {// If this function requires a GC compiler, that is not too bad of an@@ -161,12 +170,10 @@ fn emit_gc_kind_assert(object_size: wasmtime_environ::VM_GC_HEADER_SIZE,},);- let kind_and_reserved_bits = builder.ins().load(- ir::types::I32,- ir::MemFlags::trusted().with_readonly(),- kind_addr,- 0,- );+ let kind_and_reserved_bits =+ builder+ .ins()+ .load(ir::types::I32, GC_MEMFLAGS.with_readonly(), kind_addr, 0);let kind_mask = builder.ins().iconst(ir::types::I32, i64::from(VMGcKind::MASK));@@ -202,7 +209,7 @@ fn read_field_at_addr();// Data inside GC objects is always little endian.- let flags = ir::MemFlags::trusted().with_endianness(ir::Endianness::Little);+ let flags = GC_MEMFLAGS.with_endianness(ir::Endianness::Little);let value = match ty {WasmStorageType::I8 => builder.ins().load(ir::types::I8, flags, addr, 0),@@ -321,7 +328,7 @@ fn write_field_at_addr(new_val: ir::Value,) -> WasmResult<()> {// Data inside GC objects is always little endian.- let flags = ir::MemFlags::trusted().with_endianness(ir::Endianness::Little);+ let flags = GC_MEMFLAGS.with_endianness(ir::Endianness::Little);match field_ty {WasmStorageType::I8 => {@@ -928,12 +935,9 @@ pub fn translate_array_len(access_size: u8::try_from(ir::types::I32.bytes()).unwrap(),},);- let result = builder.ins().load(- ir::types::I32,- ir::MemFlags::trusted().with_readonly(),- len_field,- 0,- );+ let result = builder+ .ins()+ .load(ir::types::I32, GC_MEMFLAGS.with_readonly(), len_field, 0);log::trace!("translate_array_len(..) -> {result:?}");Ok(result)}@@ -973,7 +977,7 @@ fn emit_array_size_info(let all_elems_size = builder.ins().imul(one_elem_size, array_len);let high_bits = builder.ins().ushr_imm(all_elems_size, 32);- builder.ins().trapnz(high_bits, TRAP_INTERNAL_ASSERT);+ builder.ins().trapnz(high_bits, TRAP_GC_HEAP_CORRUPT);let all_elems_size = builder.ins().ireduce(ir::types::I32, all_elems_size);let base_size = builder@@ -982,7 +986,7 @@ fn emit_array_size_info(let obj_size =builder.ins()- .uadd_overflow_trap(all_elems_size, base_size, TRAP_INTERNAL_ASSERT);+ .uadd_overflow_trap(all_elems_size, base_size, TRAP_GC_HEAP_CORRUPT);let one_elem_size = builder.ins().ireduce(ir::types::I32, one_elem_size);@@ -1244,12 +1248,10 @@ pub fn translate_ref_test(object_size: wasmtime_environ::VM_GC_HEADER_SIZE,},);- let actual_kind = builder.ins().load(- ir::types::I32,- ir::MemFlags::trusted().with_readonly(),- kind_addr,- 0,- );+ let actual_kind =+ builder+ .ins()+ .load(ir::types::I32, GC_MEMFLAGS.with_readonly(), kind_addr, 0);let expected_kind = builder.ins().iconst(ir::types::I32, i64::from(expected_kind.as_u32()));@@ -1301,12 +1303,10 @@ pub fn translate_ref_test(access_size: func_env.offsets.size_of_vmshared_type_index(),},);- let actual_shared_ty = builder.ins().load(- ir::types::I32,- ir::MemFlags::trusted().with_readonly(),- ty_addr,- 0,- );+ let actual_shared_ty =+ builder+ .ins()+ .load(ir::types::I32, GC_MEMFLAGS.with_readonly(), ty_addr, 0);func_env.is_subtype(builder, actual_shared_ty, expected_shared_ty)}@@ -1321,7 +1321,7 @@ pub fn translate_ref_test(let actual_shared_ty = func_env.load_funcref_type_index(&mut builder.cursor(),- ir::MemFlags::trusted().with_readonly(),+ GC_MEMFLAGS.with_readonly(),val,);@@ -1594,7 +1594,7 @@ impl FuncEnvironment<'_> {&gc_heap,gc_ref,bounds_check,- crate::TRAP_INTERNAL_ASSERT,+ crate::TRAP_GC_HEAP_CORRUPT,) {Reachability::Reachable(v) => v,Reachability::Unreachable => {diff --git a/crates/cranelift/src/func_environ/gc/enabled/copying.rs b/crates/cranelift/src/func_environ/gc/enabled/copying.rsindex 336f2df487..9d34d413c5 100644--- a/crates/cranelift/src/func_environ/gc/enabled/copying.rs+++ b/crates/cranelift/src/func_environ/gc/enabled/copying.rs@@ -218,7 +218,7 @@ impl CopyingCompiler {val: ir::Value,) -> WasmResult<()> {// Data inside GC objects is always little endian.- let flags = ir::MemFlags::trusted().with_endianness(ir::Endianness::Little);+ let flags = GC_MEMFLAGS.with_endianness(ir::Endianness::Little);match ty {WasmStorageType::Val(WasmValType::Ref(r)) => match r.heap_type.top() {@@ -286,9 +286,7 @@ impl GcCompiler for CopyingCompiler {);let len_addr = builder.ins().iadd_imm(object_addr, i64::from(len_offset));let len = init.len(&mut builder.cursor());- builder- .ins()- .store(ir::MemFlags::trusted(), len, len_addr, 0);+ builder.ins().store(GC_MEMFLAGS, len, len_addr, 0);// Initialize elements.let len_to_elems_delta = builder.ins().iconst(ptr_ty, i64::from(len_to_elems_delta));diff --git a/crates/cranelift/src/func_environ/gc/enabled/drc.rs b/crates/cranelift/src/func_environ/gc/enabled/drc.rsindex 66d9667c97..a13daac721 100644--- a/crates/cranelift/src/func_environ/gc/enabled/drc.rs+++ b/crates/cranelift/src/func_environ/gc/enabled/drc.rs@@ -39,9 +39,7 @@ impl DrcCompiler {access_size: u8::try_from(ir::types::I64.bytes()).unwrap(),},);- builder- .ins()- .load(ir::types::I64, ir::MemFlags::trusted(), pointer, 0)+ builder.ins().load(ir::types::I64, GC_MEMFLAGS, pointer, 0)}/// Generate code to update the given GC reference's ref count to the new@@ -64,9 +62,7 @@ impl DrcCompiler {access_size: u8::try_from(ir::types::I64.bytes()).unwrap(),},);- builder- .ins()- .store(ir::MemFlags::trusted(), new_ref_count, pointer, 0);+ builder.ins().store(GC_MEMFLAGS, new_ref_count, pointer, 0);}/// Generate code to increment or decrement the given GC reference's ref@@ -108,9 +104,7 @@ impl DrcCompiler {// Load the current first list element, which will be our new next list// element.- let next = builder- .ins()- .load(ir::types::I32, ir::MemFlags::trusted(), head, 0);+ let next = builder.ins().load(ir::types::I32, GC_MEMFLAGS, head, 0);// Update our object's header to point to `next` and consider itself part of the list.self.set_next_over_approximated_stack_root(func_env, builder, gc_ref, next);@@ -120,9 +114,7 @@ impl DrcCompiler {self.mutate_ref_count(func_env, builder, gc_ref, 1);// Commit this object as the new head of the list.- builder- .ins()- .store(ir::MemFlags::trusted(), gc_ref, head, 0);+ builder.ins().store(GC_MEMFLAGS, gc_ref, head, 0);}/// Load a pointer to the first element of the DRC heap's@@ -163,7 +155,7 @@ impl DrcCompiler {access_size: u8::try_from(ir::types::I32.bytes()).unwrap(),},);- builder.ins().store(ir::MemFlags::trusted(), next, ptr, 0);+ builder.ins().store(GC_MEMFLAGS, next, ptr, 0);}/// Set the in-over-approximated-stack-roots list bit in a `VMDrcHeader`'s@@ -199,9 +191,7 @@ impl DrcCompiler {access_size: u8::try_from(ir::types::I32.bytes()).unwrap(),},);- builder- .ins()- .store(ir::MemFlags::trusted(), new_reserved, ptr, 0);+ builder.ins().store(GC_MEMFLAGS, new_reserved, ptr, 0);}/// Write to an uninitialized field or element inside a GC object.@@ -214,7 +204,7 @@ impl DrcCompiler {val: ir::Value,) -> WasmResult<()> {// Data inside GC objects is always little endian.- let flags = ir::MemFlags::trusted().with_endianness(ir::Endianness::Little);+ let flags = GC_MEMFLAGS.with_endianness(ir::Endianness::Little);match ty {WasmStorageType::Val(WasmValType::Ref(r)) => match r.heap_type.top() {@@ -396,9 +386,7 @@ impl GcCompiler for DrcCompiler {let object_addr = builder.ins().iadd(base, extended_array_ref);let len_addr = builder.ins().iadd_imm(object_addr, i64::from(len_offset));let len = init.len(&mut builder.cursor());- builder- .ins()- .store(ir::MemFlags::trusted(), len, len_addr, 0);+ builder.ins().store(GC_MEMFLAGS, len, len_addr, 0);// Finally, initialize the elements.let len_to_elems_delta = builder.ins().iconst(ptr_ty, i64::from(len_to_elems_delta));@@ -666,9 +654,7 @@ impl GcCompiler for DrcCompiler {access_size: u8::try_from(ir::types::I32.bytes()).unwrap(),},);- let reserved = builder- .ins()- .load(ir::types::I32, ir::MemFlags::trusted(), ptr, 0);+ let reserved = builder.ins().load(ir::types::I32, GC_MEMFLAGS, ptr, 0);let in_set_bit = builder.ins().iconst(ir::types::I32,i64::from(wasmtime_environ::drc::HEADER_IN_OVER_APPROX_LIST_BIT),diff --git a/crates/cranelift/src/func_environ/gc/enabled/null.rs b/crates/cranelift/src/func_environ/gc/enabled/null.rsindex 6d3b59d373..dc7cba2e16 100644--- a/crates/cranelift/src/func_environ/gc/enabled/null.rs+++ b/crates/cranelift/src/func_environ/gc/enabled/null.rs@@ -79,7 +79,7 @@ impl NullCompiler {);let next = builder.ins()- .load(ir::types::I32, ir::MemFlags::trusted(), ptr_to_next, 0);+ .load(ir::types::I32, GC_MEMFLAGS, ptr_to_next, 0);// Increment the bump "pointer" to the requested alignment://@@ -157,20 +157,20 @@ impl NullCompiler {),};builder.ins().store(- ir::MemFlags::trusted(),+ GC_MEMFLAGS,kind_and_size,ptr_to_object,i32::try_from(wasmtime_environ::VM_GC_HEADER_KIND_OFFSET).unwrap(),);builder.ins().store(- ir::MemFlags::trusted(),+ GC_MEMFLAGS,ty,ptr_to_object,i32::try_from(wasmtime_environ::VM_GC_HEADER_TYPE_INDEX_OFFSET).unwrap(),);builder.ins()- .store(ir::MemFlags::trusted(), end_of_object, ptr_to_next, 0);+ .store(GC_MEMFLAGS, end_of_object, ptr_to_next, 0);log::trace!("emit_inline_alloc(..) -> ({aligned}, {ptr_to_object})");(aligned, ptr_to_object)@@ -223,9 +223,7 @@ impl GcCompiler for NullCompiler {// any pointers or offsets out from the (untrusted) GC heap.let len_addr = builder.ins().iadd_imm(ptr_to_object, i64::from(len_offset));let len = init.len(&mut builder.cursor());- builder- .ins()- .store(ir::MemFlags::trusted(), len, len_addr, 0);+ builder.ins().store(GC_MEMFLAGS, len, len_addr, 0);// Finally, initialize the elements.let len_to_elems_delta = builder.ins().iconst(ptr_ty, i64::from(len_to_elems_delta));diff --git a/crates/cranelift/src/lib.rs b/crates/cranelift/src/lib.rsindex 8c0a2da908..aaa33ecda0 100644--- a/crates/cranelift/src/lib.rs+++ b/crates/cranelift/src/lib.rs@@ -25,8 +25,8 @@ use cranelift_entity::PrimaryMap;use target_lexicon::Architecture;use wasmtime_environ::{- BuiltinFunctionIndex, FlagValue, FuncKey, Trap, TrapInformation, Tunables, WasmFuncType,- WasmHeapTopType, WasmHeapType, WasmValType,+ BuiltinFunctionIndex, CompiledTrap, FlagValue, FuncKey, Trap, TrapInformation, Tunables,+ WasmFuncType, WasmHeapTopType, WasmHeapType, WasmValType,};pub use builder::builder;@@ -48,7 +48,8 @@ mod trap;use self::compiler::Compiler;const TRAP_INTERNAL_ASSERT: TrapCode = TrapCode::unwrap_user(1);-const TRAP_OFFSET: u8 = 2;+const TRAP_GC_HEAP_CORRUPT: TrapCode = TrapCode::unwrap_user(2);+const TRAP_OFFSET: u8 = 3;pub const TRAP_CANNOT_LEAVE_COMPONENT: TrapCode =TrapCode::unwrap_user(Trap::CannotLeaveComponent as u8 + TRAP_OFFSET);pub const TRAP_INDIRECT_CALL_TO_NULL: TrapCode =@@ -254,29 +255,39 @@ fn to_flag_value(v: &settings::Value) -> FlagValue<'static> {}/// Converts machine traps to trap information.-pub fn mach_trap_to_trap(trap: &MachTrap) -> Option<TrapInformation> {+pub fn mach_trap_to_trap(trap: &MachTrap, tunables: &Tunables) -> Option<TrapInformation> {let &MachTrap { offset, code } = trap;Some(TrapInformation {code_offset: offset,- trap_code: clif_trap_to_env_trap(code)?,+ trap_code: clif_trap_to_env_trap(code, tunables)?,})}-fn clif_trap_to_env_trap(trap: ir::TrapCode) -> Option<Trap> {- Some(match trap {+fn clif_trap_to_env_trap(trap: ir::TrapCode, tunables: &Tunables) -> Option<CompiledTrap> {+ Some(CompiledTrap::Normal(match trap {ir::TrapCode::STACK_OVERFLOW => Trap::StackOverflow,ir::TrapCode::HEAP_OUT_OF_BOUNDS => Trap::MemoryOutOfBounds,ir::TrapCode::INTEGER_OVERFLOW => Trap::IntegerOverflow,ir::TrapCode::INTEGER_DIVISION_BY_ZERO => Trap::IntegerDivisionByZero,ir::TrapCode::BAD_CONVERSION_TO_INTEGER => Trap::BadConversionToInteger,- // These do not get converted to wasmtime traps, since they- // shouldn't ever be hit in theory. Instead of catching and handling- // these, we let the signal crash the process.- TRAP_INTERNAL_ASSERT => return None,+ TRAP_INTERNAL_ASSERT => {+ return if tunables.metadata_for_internal_asserts {+ Some(CompiledTrap::InternalAssert)+ } else {+ None+ };+ }+ TRAP_GC_HEAP_CORRUPT => {+ return if tunables.metadata_for_gc_heap_corruption {+ Some(CompiledTrap::GcHeapCorrupt)+ } else {+ None+ };+ }other => Trap::from_u8(other.as_raw().get() - TRAP_OFFSET).unwrap(),- })+ }))}/// Converts machine relocations to relocation informationdiff --git a/crates/cranelift/src/trap.rs b/crates/cranelift/src/trap.rsindex 3b72f0282a..158f3239e7 100644--- a/crates/cranelift/src/trap.rs+++ b/crates/cranelift/src/trap.rs@@ -27,7 +27,7 @@ pub trait TranslateTrap {fn trap(&mut self, builder: &mut FunctionBuilder, trap: ir::TrapCode) {match (self.clif_instruction_traps_enabled(),- crate::clif_trap_to_env_trap(trap),+ crate::clif_trap_to_env_trap(trap, self.compiler().tunables()),) {// If libcall traps are disabled or there's no wasmtime-defined trap// code for this, then emit a native trap instruction.@@ -42,7 +42,7 @@ pub trait TranslateTrap {let debug_tags = self.debug_tags(builder.srcloc());let trap_libcall = self.builtin_funcref(builder, BuiltinFunctionIndex::trap());let vmctx = self.vmctx_val(&mut builder.cursor());- let trap_code = builder.ins().iconst(I8, i64::from(trap as u8));+ let trap_code = builder.ins().iconst(I8, i64::from(trap.as_u8()));builder.ins().call(trap_libcall, &[vmctx, trap_code]);let raise_libcall = self.builtin_funcref(builder, BuiltinFunctionIndex::raise());let inst = builder.ins().call(raise_libcall, &[vmctx]);diff --git a/crates/environ/src/compile/trap_encoding.rs b/crates/environ/src/compile/trap_encoding.rsindex c5d5b63a54..139c85a7ee 100644--- a/crates/environ/src/compile/trap_encoding.rs+++ b/crates/environ/src/compile/trap_encoding.rs@@ -46,7 +46,7 @@ impl TrapEncodingBuilder {let pos = func_start + info.code_offset;assert!(pos >= self.last_offset);self.offsets.push(U32::new(LittleEndian, pos));- self.traps.push(info.trap_code as u8);+ self.traps.push(info.trap_code.as_u8());self.last_offset = pos;}diff --git a/crates/environ/src/trap_encoding.rs b/crates/environ/src/trap_encoding.rsindex 4a8d89a8ce..8f68a022a8 100644--- a/crates/environ/src/trap_encoding.rs+++ b/crates/environ/src/trap_encoding.rs@@ -10,7 +10,51 @@ pub struct TrapInformation {pub code_offset: u32,/// Code of the trap.- pub trap_code: Trap,+ pub trap_code: CompiledTrap,+}++/// Possible traps that can be compiled into WebAssembly modules.+#[derive(Debug, PartialEq, Eq, Clone)]+pub enum CompiledTrap {+ /// A normal trap, expected to possibly be hit at runtime.+ Normal(Trap),+ /// An internal assertion in the compiled code itself.+ InternalAssert,+ /// The GC heap was detected as being corrupt.+ GcHeapCorrupt,+}++impl CompiledTrap {+ /// Encodes this as a byte.+ pub fn as_u8(&self) -> u8 {+ match self {+ CompiledTrap::Normal(trap) => {+ let ret = *trap as u8;+ debug_assert_ne!(ret, CompiledTrap::InternalAssert.as_u8());+ debug_assert_ne!(ret, CompiledTrap::GcHeapCorrupt.as_u8());+ ret+ }+ CompiledTrap::InternalAssert => 0xFF,+ CompiledTrap::GcHeapCorrupt => 0xFE,+ }+ }++ /// Decodes a byte as a trap.+ pub fn from_u8(byte: u8) -> Option<CompiledTrap> {+ if byte == 0xFF {+ Some(CompiledTrap::InternalAssert)+ } else if byte == 0xFE {+ Some(CompiledTrap::GcHeapCorrupt)+ } else {+ Trap::from_u8(byte).map(CompiledTrap::Normal)+ }+ }+}++impl From<Trap> for CompiledTrap {+ fn from(trap: Trap) -> CompiledTrap {+ CompiledTrap::Normal(trap)+ }}macro_rules! generate_trap_type {@@ -239,7 +283,7 @@ impl core::error::Error for Trap {}/// The `section` provided is expected to have been built by/// `TrapEncodingBuilder` above. Additionally the `offset` should be a relative/// offset within the text section of the compilation image.-pub fn lookup_trap_code(section: &[u8], offset: usize) -> Option<Trap> {+pub fn lookup_trap_code(section: &[u8], offset: usize) -> Option<CompiledTrap> {let (offsets, traps) = parse(section)?;// The `offsets` table is sorted in the trap section so perform a binary@@ -258,7 +302,7 @@ pub fn lookup_trap_code(section: &[u8], offset: usize) -> Option<Trap> {debug_assert!(index < traps.len());let byte = *traps.get(index)?;- let trap = Trap::from_u8(byte);+ let trap = CompiledTrap::from_u8(byte);debug_assert!(trap.is_some(), "missing mapping for {byte}");trap}@@ -275,12 +319,12 @@ fn parse(section: &[u8]) -> Option<(&[U32<LittleEndian>], &[u8])> {/// Returns an iterator over all of the traps encoded in `section`, which should/// have been produced by `TrapEncodingBuilder`.-pub fn iterate_traps(section: &[u8]) -> Option<impl Iterator<Item = (u32, Trap)> + '_> {+pub fn iterate_traps(section: &[u8]) -> Option<impl Iterator<Item = (u32, CompiledTrap)> + '_> {let (offsets, traps) = parse(section)?;- Some(- offsets- .iter()- .zip(traps)- .map(|(offset, trap)| (offset.get(LittleEndian), Trap::from_u8(*trap).unwrap())),- )+ Some(offsets.iter().zip(traps).map(|(offset, trap)| {+ (+ offset.get(LittleEndian),+ CompiledTrap::from_u8(*trap).unwrap(),+ )+ }))}diff --git a/crates/environ/src/tunables.rs b/crates/environ/src/tunables.rsindex 0c3aa7b5c2..113eb9e9ab 100644--- a/crates/environ/src/tunables.rs+++ b/crates/environ/src/tunables.rs@@ -180,6 +180,14 @@ define_tunables! {////// This is the same as `memory_may_move` but for GC heaps.pub gc_heap_may_move: bool,++ /// Boolean to track whether compiled code retains metadata necessary to+ /// report extra information on internal assertions failing.+ pub metadata_for_internal_asserts: bool,++ /// Boolean to track whether compiled code retains metadata necessary to+ /// report extra information on gc heap corruption being detected.+ pub metadata_for_gc_heap_corruption: bool,}pub struct ConfigTunables {@@ -263,6 +271,8 @@ impl Tunables {gc_heap_guard_size: 0,gc_heap_reservation_for_growth: 0,gc_heap_may_move: true,+ metadata_for_internal_asserts: false,+ metadata_for_gc_heap_corruption: true,}}diff --git a/crates/fuzzing/src/generators/config.rs b/crates/fuzzing/src/generators/config.rsindex 372909b7c1..f3fea142f4 100644--- a/crates/fuzzing/src/generators/config.rs+++ b/crates/fuzzing/src/generators/config.rs@@ -350,6 +350,10 @@ impl Config {cfg.wasm.relaxed_simd = Some(false);}cfg.codegen.collector = Some(self.wasmtime.collector.to_wasmtime());+ cfg.codegen.metadata_for_internal_asserts =+ Some(self.wasmtime.metadata_for_internal_asserts);+ cfg.codegen.metadata_for_gc_heap_corruption =+ Some(self.wasmtime.metadata_for_gc_heap_corruption);let compiler_strategy = &self.wasmtime.compiler_strategy;let cranelift_strategy = match compiler_strategy {@@ -599,6 +603,8 @@ pub struct WasmtimeConfig {collector: Collector,gc_zeal_alloc_counter: Option<NonZeroU32>,table_lazy_init: bool,+ metadata_for_internal_asserts: bool,+ metadata_for_gc_heap_corruption: bool,/// Configuration for whether wasm is invoked in an async fashion and how/// it's cooperatively time-sliced.diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rsindex 71a92566ee..7fdc18e8cc 100644--- a/crates/wasmtime/src/config.rs+++ b/crates/wasmtime/src/config.rs@@ -3255,6 +3255,44 @@ impl Config {self.rr_config = cfg;self}++ /// Whether or not trap metadata is generated in compiled wasms for internal+ /// asserts in the compiled code itself.+ ///+ /// Wasmtime inserts metadata within compiled artifacts which contain a+ /// table of known trap codes for all instructions. If a trap via a signal+ /// happens, and it's not listed in these tables, then that's considered a+ /// fatal bug that crashes the process. This option controls whether trap+ /// codes are inserted into metadata for internal asserts as part of+ /// Wasmtime's translation process. These internal asserts should never be+ /// triggered, but if they are then the process dies with a signal.+ ///+ /// Inserting trap metadata into compiled artifacts can take extra space in+ /// the final artifact. The trap tables for the artifact will be larger as+ /// they contain more trap codes to contain.+ ///+ /// This is intended as a debugging option and is set to `false` by+ /// default.+ pub fn metadata_for_internal_asserts(&mut self, enable: bool) -> &mut Self {+ self.tunables.metadata_for_internal_asserts = Some(enable);+ self+ }++ /// Whether or not trap metadata is generated in compiled wasms for+ /// detection of corruption in the GC heap.+ ///+ /// For more information about what metadata is in this scenario, see+ /// [`Config::metadata_for_internal_asserts`]. Note, though, that this+ /// option is enabled by default unlike internal asserts. This is intended+ /// as a defense-in-depth option for generated code in the face of GC heap+ /// corruption. If the GC heap is corrupted and is detected then the+ /// trapping instruction will be gracefully handled and delivered to the+ /// embedder. Otherwise if this option were set to `false` then the process+ /// would be aborted due to a signal.+ pub fn metadata_for_gc_heap_corruption(&mut self, enable: bool) -> &mut Self {+ self.tunables.metadata_for_gc_heap_corruption = Some(enable);+ self+ }}impl Default for Config {diff --git a/crates/wasmtime/src/engine/serialization.rs b/crates/wasmtime/src/engine/serialization.rsindex 55f68805ee..b4a216f31f 100644--- a/crates/wasmtime/src/engine/serialization.rs+++ b/crates/wasmtime/src/engine/serialization.rs@@ -336,6 +336,12 @@ impl Metadata<'_> {// This doesn't affect compilation, it's just a runtime setting.gc_heap_reservation_for_growth: _,++ // No need to match whether or not this metadata is emitted, if it+ // is or isn't then that's fine, the runtime handles it the same+ // way.+ metadata_for_internal_asserts: _,+ metadata_for_gc_heap_corruption: _,} = self.tunables;Self::check_collector(collector, other.collector)?;diff --git a/crates/wasmtime/src/runtime.rs b/crates/wasmtime/src/runtime.rsindex d19e8b7824..97e43a30bc 100644--- a/crates/wasmtime/src/runtime.rs+++ b/crates/wasmtime/src/runtime.rs@@ -31,7 +31,6 @@ use core::marker;use core::pin::Pin;use core::task::{Context, Poll};-#[cfg(feature = "component-model-async")]mod bug;#[macro_use]@@ -81,10 +80,8 @@ cfg_if::cfg_if! {}}-#[cfg(feature = "component-model-async")]pub use bug::WasmtimeBug;-#[cfg(feature = "component-model-async")]-pub(crate) use bug::bail_bug;+pub(crate) use bug::{bail_bug, bug};pub use code_memory::CodeMemory;#[cfg(feature = "debug")]pub use debug::*;diff --git a/crates/wasmtime/src/runtime/bug.rs b/crates/wasmtime/src/runtime/bug.rsindex 1864a3ea31..9982509139 100644--- a/crates/wasmtime/src/runtime/bug.rs+++ b/crates/wasmtime/src/runtime/bug.rs@@ -24,16 +24,23 @@ use core::fmt;/// good alternative to panicking in the case that this is actually executed at/// runtime.macro_rules! bail_bug {+ ($($arg:tt)*) => {{+ $crate::bail!($crate::bug!($($arg)*))+ }}+}+pub(crate) use bail_bug;++/// Similar to `bail_bug`, but just returns a `WasmtimeBug`.+macro_rules! bug {($($arg:tt)*) => {{// Minimize argument passing to the `new` function by placing the// file/line in a static which is passed by reference to just pass a// single extra pointer argument.static POS: (&'static str, u32) = (file!(), line!());- $crate::bail!(crate::WasmtimeBug::new(format_args!($($arg)*), &POS))+ crate::WasmtimeBug::new(format_args!($($arg)*), &POS)}}}--pub(crate) use bail_bug;+pub(crate) use bug;/// Error which indicates a bug in Wasmtime.///diff --git a/crates/wasmtime/src/runtime/code_memory.rs b/crates/wasmtime/src/runtime/code_memory.rsindex 5c972a3547..3aee69d991 100644--- a/crates/wasmtime/src/runtime/code_memory.rs+++ b/crates/wasmtime/src/runtime/code_memory.rs@@ -13,7 +13,7 @@ use object::{read::elf::{FileHeader as _, SectionHeader as _},};use wasmtime_environ::StaticModuleIndex;-use wasmtime_environ::{Trap, lookup_trap_code, obj};+use wasmtime_environ::{CompiledTrap, lookup_trap_code, obj};use wasmtime_unwinder::ExceptionTable;/// Management of executable memory within a `MmapVec`@@ -613,7 +613,7 @@ impl CodeMemory {/// Looks up the given offset within this module's text section and returns/// the trap code associated with that instruction, if there is one.- pub fn lookup_trap_code(&self, text_offset: usize) -> Option<Trap> {+ pub fn lookup_trap_code(&self, text_offset: usize) -> Option<CompiledTrap> {lookup_trap_code(self.trap_data(), text_offset)}diff --git a/crates/wasmtime/src/runtime/trap.rs b/crates/wasmtime/src/runtime/trap.rsindex 7a80dff0af..d3c7820778 100644--- a/crates/wasmtime/src/runtime/trap.rs+++ b/crates/wasmtime/src/runtime/trap.rs@@ -2,10 +2,12 @@use super::coredump::WasmCoreDump;use crate::prelude::*;use crate::store::StoreOpaque;-use crate::{AsContext, Module};+use crate::{AsContext, Module, bug};use core::fmt;use core::num::NonZeroUsize;-use wasmtime_environ::{FilePos, demangle_function_name, demangle_function_name_or_index};+use wasmtime_environ::{+ CompiledTrap, FilePos, demangle_function_name, demangle_function_name_or_index,+};/// Representation of a WebAssembly trap and what caused it to occur.///@@ -103,7 +105,15 @@ pub(crate) fn from_runtime_box(faulting_addr,trap,} => {- let mut err: Error = trap.into();+ let mut err: Error = match trap {+ CompiledTrap::Normal(trap) => trap.into(),+ CompiledTrap::InternalAssert => {+ bug!("internal assert triggered in compiled code").into()+ }+ CompiledTrap::GcHeapCorrupt => {+ bug!("gc heap corruption detected in compiled code").into()+ }+ };// If a fault address was present, for example with segfaults,// then simultaneously assert that it's within a known linear memorydiff --git a/crates/wasmtime/src/runtime/vm/interpreter.rs b/crates/wasmtime/src/runtime/vm/interpreter.rsindex 7d64312d92..849108786d 100644--- a/crates/wasmtime/src/runtime/vm/interpreter.rs+++ b/crates/wasmtime/src/runtime/vm/interpreter.rs@@ -464,12 +464,12 @@ impl InterpreterRef<'_> {match kind {Some(kind) => {let trap = match kind {- TrapKind::IntegerOverflow => Trap::IntegerOverflow,- TrapKind::DivideByZero => Trap::IntegerDivisionByZero,- TrapKind::BadConversionToInteger => Trap::BadConversionToInteger,- TrapKind::MemoryOutOfBounds => Trap::MemoryOutOfBounds,- TrapKind::DisabledOpcode => Trap::DisabledOpcode,- TrapKind::StackOverflow => Trap::StackOverflow,+ TrapKind::IntegerOverflow => Trap::IntegerOverflow.into(),+ TrapKind::DivideByZero => Trap::IntegerDivisionByZero.into(),+ TrapKind::BadConversionToInteger => Trap::BadConversionToInteger.into(),+ TrapKind::MemoryOutOfBounds => Trap::MemoryOutOfBounds.into(),+ TrapKind::DisabledOpcode => Trap::DisabledOpcode.into(),+ TrapKind::StackOverflow => Trap::StackOverflow.into(),};s.set_jit_trap(regs, None, trap);s.entry_trap_handler()diff --git a/crates/wasmtime/src/runtime/vm/libcalls.rs b/crates/wasmtime/src/runtime/vm/libcalls.rsindex 2ef761ed35..b65d5a9113 100644--- a/crates/wasmtime/src/runtime/vm/libcalls.rs+++ b/crates/wasmtime/src/runtime/vm/libcalls.rs@@ -56,6 +56,7 @@#[cfg(feature = "stack-switching")]use super::stack_switching::VMContObj;+use crate::bail_bug;use crate::prelude::*;use crate::runtime::store::{Asyncness, InstanceId, StoreInstanceId, StoreOpaque};#[cfg(feature = "gc")]@@ -71,8 +72,8 @@ use core::ptr::NonNull;use core::time::Duration;use wasmtime_core::math::WasmFloat;use wasmtime_environ::{- DataIndex, DefinedMemoryIndex, DefinedTableIndex, ElemIndex, FuncIndex, MemoryIndex,- TableIndex, Trap,+ CompiledTrap, DataIndex, DefinedMemoryIndex, DefinedTableIndex, ElemIndex, FuncIndex,+ MemoryIndex, TableIndex, Trap,};#[cfg(feature = "wmemcheck")]use wasmtime_wmemcheck::AccessError::{@@ -1744,7 +1745,11 @@ fn fma_f64x2(/// only ever returns an error, and this hooks into the machinery to handle/// `Result` values to record such trap information.fn trap(_store: &mut dyn VMStore, _instance: InstanceId, code: u8) -> Result<Infallible> {- Err(wasmtime_environ::Trap::from_u8(code).unwrap().into())+ match CompiledTrap::from_u8(code).unwrap() {+ CompiledTrap::Normal(trap) => Err(trap.into()),+ CompiledTrap::InternalAssert => bail_bug!("internal assert hit in wasm"),+ CompiledTrap::GcHeapCorrupt => bail_bug!("GC heap corruption detected"),+ }}fn raise(store: &mut dyn VMStore, _instance: InstanceId) {diff --git a/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs b/crates/wasmtime/src/runtime/vm/sys/unix/machports.rsindex 04af59c8d0..34ee897e3b 100644--- a/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs+++ b/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs@@ -56,7 +56,7 @@ use mach2::traps::*;use std::io;use std::mem;use std::thread;-use wasmtime_environ::Trap;+use wasmtime_environ::CompiledTrap;/// Process-global port that we use to route thread-level exceptions to.static mut WASMTIME_PORT: mach_port_name_t = MACH_PORT_NULL;@@ -325,7 +325,7 @@ unsafe fn handle_exception(request: &mut ExceptionRequest) -> bool {state.__rbp as usize,);- let resume = |state: &mut ThreadState, pc: usize, fp: usize, fault1: usize, fault2: usize, trap: Trap| {+ let resume = |state: &mut ThreadState, pc: usize, fp: usize, fault1: usize, fault2: usize, trap: CompiledTrap| {// The x86_64 ABI requires a 16-byte stack alignment for// functions, so typically we'll be 16-byte aligned. In this// case we simulate a `call` instruction by decrementing the@@ -356,7 +356,7 @@ unsafe fn handle_exception(request: &mut ExceptionRequest) -> bool {state.__rsi = fp as u64;state.__rdx = fault1 as u64;state.__rcx = fault2 as u64;- state.__r8 = trap as u64;+ state.__r8 = trap.as_u8().into();};let mut thread_state = ThreadState::new();} else if #[cfg(target_arch = "aarch64")] {@@ -369,7 +369,7 @@ unsafe fn handle_exception(request: &mut ExceptionRequest) -> bool {state.__fp as usize,);- let resume = |state: &mut ThreadState, pc: usize, fp: usize, fault1: usize, fault2: usize, trap: Trap| {+ let resume = |state: &mut ThreadState, pc: usize, fp: usize, fault1: usize, fault2: usize, trap: CompiledTrap| {// Clobber LR with the faulting PC, so unwinding resumes at the// faulting instruction. The previous value of LR has been saved// by the callee (in Cranelift generated code), so no need to@@ -382,7 +382,7 @@ unsafe fn handle_exception(request: &mut ExceptionRequest) -> bool {state.__x[1] = fp as u64;state.__x[2] = fault1 as u64;state.__x[3] = fault2 as u64;- state.__x[4] = trap as u64;+ state.__x[4] = trap.as_u8().into();state.__pc = (unwind as *const ()).addr() as u64;};let mut thread_state = unsafe { mem::zeroed::<ThreadState>() };@@ -464,7 +464,7 @@ unsafe extern "C" fn unwind(pc: usize, fp: usize, fault1: usize, fault2: usize,0 => None,_ => Some(fault2),};- let trap = Trap::from_u8(trap).unwrap();+ let trap = CompiledTrap::from_u8(trap).unwrap();state.set_jit_trap(regs, faulting_addr, trap);state.entry_trap_handler()});diff --git a/crates/wasmtime/src/runtime/vm/traphandlers.rs b/crates/wasmtime/src/runtime/vm/traphandlers.rsindex 3df7153d01..afd9168ba6 100644--- a/crates/wasmtime/src/runtime/vm/traphandlers.rs+++ b/crates/wasmtime/src/runtime/vm/traphandlers.rs@@ -391,7 +391,7 @@ pub enum TrapReason {faulting_addr: Option<usize>,/// The trap code associated with this trap.- trap: wasmtime_environ::Trap,+ trap: wasmtime_environ::CompiledTrap,},}@@ -970,7 +970,7 @@ impl CallThreadState {&self,TrapRegisters { pc, fp, .. }: TrapRegisters,faulting_addr: Option<usize>,- trap: wasmtime_environ::Trap,+ trap: wasmtime_environ::CompiledTrap,) {let mut unwind = UnwindReason::from(TrapReason::Jit {pc,diff --git a/pulley/src/interp.rs b/pulley/src/interp.rsindex 940d35237b..5b3f794453 100644--- a/pulley/src/interp.rs+++ b/pulley/src/interp.rs@@ -1231,7 +1231,7 @@ impl AddressingMode for AddrZ {// a trap, but all other addresses are allowed.let host_addr = i.state[self.addr].get_ptr::<T>();if host_addr.is_null() {- i.done_trap_kind::<I>(Some(TrapKind::MemoryOutOfBounds))?;+ i.done_trap_kind::<I>(None)?;unreachable!();}unsafe {@@ -3111,7 +3111,7 @@ impl ExtendedOpVisitor for Interpreter<'_> {#[interp_disable_if_cfg(pulley_disable_interp_simd)]fn vload128le_z(&mut self, dst: VReg, addr: AddrZ) -> ControlFlow<Done> {- let val = unsafe { self.load_ne::<u128, crate::VLoad128Z>(addr)? };+ let val = unsafe { self.load_ne::<u128, crate::VLoad128LeZ>(addr)? };self.state[dst].set_u128(u128::from_le(val));ControlFlow::Continue(())}@@ -5627,4 +5627,99 @@ impl ExtendedOpVisitor for Interpreter<'_> {self.set_i128(dst_lo, dst_hi, result as i128);ControlFlow::Continue(())}++ // =========================================================================+ // z addressing modes (big endian)++ fn xload16be_u32_z(&mut self, dst: XReg, addr: AddrZ) -> ControlFlow<Done> {+ let result = unsafe { self.load_ne::<u16, crate::XLoad16BeU32Z>(addr)? };+ self.state[dst].set_u32(u16::from_be(result).into());+ ControlFlow::Continue(())+ }++ fn xload16be_s32_z(&mut self, dst: XReg, addr: AddrZ) -> ControlFlow<Done> {+ let result = unsafe { self.load_ne::<i16, crate::XLoad16BeS32Z>(addr)? };+ self.state[dst].set_i32(i16::from_be(result).into());+ ControlFlow::Continue(())+ }++ fn xload32be_z(&mut self, dst: XReg, addr: AddrZ) -> ControlFlow<Done> {+ let result = unsafe { self.load_ne::<i32, crate::XLoad32BeZ>(addr)? };+ self.state[dst].set_i32(i32::from_be(result));+ ControlFlow::Continue(())+ }++ fn xload64be_z(&mut self, dst: XReg, addr: AddrZ) -> ControlFlow<Done> {+ let result = unsafe { self.load_ne::<i64, crate::XLoad64BeZ>(addr)? };+ self.state[dst].set_i64(i64::from_be(result));+ ControlFlow::Continue(())+ }++ fn xstore16be_z(&mut self, addr: AddrZ, val: XReg) -> ControlFlow<Done> {+ let val = self.state[val].get_u32() as u16;+ unsafe {+ self.store_ne::<u16, crate::XStore16BeZ>(addr, val.to_be())?;+ }+ ControlFlow::Continue(())+ }++ fn xstore32be_z(&mut self, addr: AddrZ, val: XReg) -> ControlFlow<Done> {+ let val = self.state[val].get_u32();+ unsafe {+ self.store_ne::<u32, crate::XStore32BeZ>(addr, val.to_be())?;+ }+ ControlFlow::Continue(())+ }++ fn xstore64be_z(&mut self, addr: AddrZ, val: XReg) -> ControlFlow<Done> {+ let val = self.state[val].get_u64();+ unsafe {+ self.store_ne::<u64, crate::XStore64BeZ>(addr, val.to_be())?;+ }+ ControlFlow::Continue(())+ }++ fn fload32be_z(&mut self, dst: FReg, addr: AddrZ) -> ControlFlow<Done> {+ let val = unsafe { self.load_ne::<u32, crate::Fload32BeZ>(addr)? };+ self.state[dst].set_f32(f32::from_bits(u32::from_be(val)));+ ControlFlow::Continue(())+ }++ fn fload64be_z(&mut self, dst: FReg, addr: AddrZ) -> ControlFlow<Done> {+ let val = unsafe { self.load_ne::<u64, crate::Fload64BeZ>(addr)? };+ self.state[dst].set_f64(f64::from_bits(u64::from_be(val)));+ ControlFlow::Continue(())+ }++ fn fstore32be_z(&mut self, addr: AddrZ, src: FReg) -> ControlFlow<Done> {+ let val = self.state[src].get_f32();+ unsafe {+ self.store_ne::<u32, crate::Fstore32BeZ>(addr, val.to_bits().to_be())?;+ }+ ControlFlow::Continue(())+ }++ fn fstore64be_z(&mut self, addr: AddrZ, src: FReg) -> ControlFlow<Done> {+ let val = self.state[src].get_f64();+ unsafe {+ self.store_ne::<u64, crate::Fstore64BeZ>(addr, val.to_bits().to_be())?;+ }+ ControlFlow::Continue(())+ }++ #[interp_disable_if_cfg(pulley_disable_interp_simd)]+ fn vload128be_z(&mut self, dst: VReg, addr: AddrZ) -> ControlFlow<Done> {+ let val = unsafe { self.load_ne::<u128, crate::VLoad128BeZ>(addr)? };+ self.state[dst].set_u128(u128::from_be(val));+ ControlFlow::Continue(())+ }++ #[interp_disable_if_cfg(pulley_disable_interp_simd)]+ fn vstore128be_z(&mut self, addr: AddrZ, src: VReg) -> ControlFlow<Done> {+ let val = self.state[src].get_u128();+ unsafe {+ self.store_ne::<u128, crate::Vstore128BeZ>(addr, val.to_be())?;+ }+ ControlFlow::Continue(())+ }}diff --git a/pulley/src/lib.rs b/pulley/src/lib.rsindex dba201017d..36a09cb13a 100644--- a/pulley/src/lib.rs+++ b/pulley/src/lib.rs@@ -746,7 +746,7 @@ macro_rules! for_each_extended_op {/// `*addr = src`vstore128le_o32 = Vstore128LeO32 { addr: AddrO32, src: VReg };/// `dst = *(ptr + offset)`- vload128le_z = VLoad128Z { dst: VReg, addr: AddrZ };+ vload128le_z = VLoad128LeZ { dst: VReg, addr: AddrZ };/// `*(ptr + offset) = src`vstore128le_z = Vstore128LeZ { addr: AddrZ, src: VReg };/// `dst = *(ptr + offset)`@@ -1380,6 +1380,33 @@ macro_rules! for_each_extended_op {lhs: XReg,rhs: XReg};++ /// `low32(dst) = zext_16_32(*addr)`+ xload16be_u32_z = XLoad16BeU32Z { dst: XReg, addr: AddrZ };+ /// `low32(dst) = sext_16_32(*addr)`+ xload16be_s32_z = XLoad16BeS32Z { dst: XReg, addr: AddrZ };+ /// `low32(dst) = *addr`+ xload32be_z = XLoad32BeZ { dst: XReg, addr: AddrZ };+ /// `dst = *addr`+ xload64be_z = XLoad64BeZ { dst: XReg, addr: AddrZ };+ /// `*addr = low16(src)`+ xstore16be_z = XStore16BeZ { addr: AddrZ, src: XReg };+ /// `*addr = low32(src)`+ xstore32be_z = XStore32BeZ { addr: AddrZ, src: XReg };+ /// `*addr = src`+ xstore64be_z = XStore64BeZ { addr: AddrZ, src: XReg };+ /// `low32(dst) = zext(*addr)`+ fload32be_z = Fload32BeZ { dst: FReg, addr: AddrZ };+ /// `dst = *addr`+ fload64be_z = Fload64BeZ { dst: FReg, addr: AddrZ };+ /// `*addr = low32(src)`+ fstore32be_z = Fstore32BeZ { addr: AddrZ, src: FReg };+ /// `*addr = src`+ fstore64be_z = Fstore64BeZ { addr: AddrZ, src: FReg };+ /// `dst = *(ptr + offset)`+ vload128be_z = VLoad128BeZ { dst: VReg, addr: AddrZ };+ /// `*(ptr + offset) = src`+ vstore128be_z = Vstore128BeZ { addr: AddrZ, src: VReg };}};}diff --git a/src/commands/objdump.rs b/src/commands/objdump.rsindex d5560f22c6..a81dc2a8be 100644--- a/src/commands/objdump.rs+++ b/src/commands/objdump.rs@@ -11,8 +11,8 @@ use std::path::{Path, PathBuf};use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor};use wasmtime::{Engine, Result, bail, error::Context as _};use wasmtime_environ::{- FilePos, FrameInstPos, FrameStackShape, FrameStateSlot, FrameTable, FrameTableDescriptorIndex,- ModulePC, StackMap, Trap, obj,+ CompiledTrap, FilePos, FrameInstPos, FrameStackShape, FrameStateSlot, FrameTable,+ FrameTableDescriptorIndex, ModulePC, StackMap, obj,};use wasmtime_unwinder::{ExceptionHandler, ExceptionTable};@@ -429,7 +429,7 @@ enum Func {struct Decorator<'a> {objdump: &'a ObjdumpCommand,addrmap: Option<Peekable<Box<dyn Iterator<Item = (u32, FilePos)> + 'a>>>,- traps: Option<Peekable<Box<dyn Iterator<Item = (u32, Trap)> + 'a>>>,+ traps: Option<Peekable<Box<dyn Iterator<Item = (u32, CompiledTrap)> + 'a>>>,stack_maps: Option<Peekable<Box<dyn Iterator<Item = (u32, StackMap<'a>)> + 'a>>>,exception_tables:Option<Peekable<Box<dyn Iterator<Item = (u32, Option<u32>, Vec<ExceptionHandler>)> + 'a>>>,diff --git a/tests/disas/arith.wat b/tests/disas/arith.watindex 4c11e32051..c4b35bf67c 100644--- a/tests/disas/arith.wat+++ b/tests/disas/arith.wat@@ -25,7 +25,7 @@;; @0021 v3 = iconst.i32 4;; @0023 v4 = iconst.i32 4;; @0025 v5 = isub v3, v4 ; v3 = 4, v4 = 4-;; @002c trapnz v5, user11+;; @002c trapnz v5, user12;; @002a jump block4;;;; block4:diff --git a/tests/disas/call-indirect.wat b/tests/disas/call-indirect.watindex 03eea1afde..728a32da4a 100644--- a/tests/disas/call-indirect.wat+++ b/tests/disas/call-indirect.wat@@ -30,7 +30,7 @@;; @0035 v11 = iadd v9, v10;; @0035 v12 = iconst.i64 0;; @0035 v13 = select_spectre_guard v7, v12, v11 ; v12 = 0-;; @0035 v14 = load.i64 user5 aligned table v13+;; @0035 v14 = load.i64 user6 aligned table v13;; v29 = iconst.i64 -2;; @0035 v15 = band v14, v29 ; v29 = -2;; @0035 brif v14, block3(v15), block2@@ -44,9 +44,9 @@;; block3(v16: i64):;; @0035 v22 = load.i64 notrap aligned readonly can_move v0+40;; @0035 v23 = load.i32 notrap aligned readonly can_move v22+4-;; @0035 v24 = load.i32 user6 aligned readonly v16+16+;; @0035 v24 = load.i32 user7 aligned readonly v16+16;; @0035 v25 = icmp eq v24, v23-;; @0035 trapz v25, user7+;; @0035 trapz v25, user8;; @0035 v26 = load.i64 notrap aligned readonly v16+8;; @0035 v27 = load.i64 notrap aligned readonly v16+24;; @0035 v28 = call_indirect sig0, v26(v27, v0, v2)diff --git a/tests/disas/component-model/direct-adapter-calls-inlining.wat b/tests/disas/component-model/direct-adapter-calls-inlining.watindex 3f45198ab2..321b7789ab 100644--- a/tests/disas/component-model/direct-adapter-calls-inlining.wat+++ b/tests/disas/component-model/direct-adapter-calls-inlining.wat@@ -94,7 +94,7 @@;; v20 = load.i64 notrap aligned readonly can_move v5+104;; v19 = iconst.i32 23;; call_indirect sig1, v21(v20, v5, v19) ; v19 = 23-;; trap user11+;; trap user12;;;; block5:;; v22 = load.i64 notrap aligned readonly can_move v5+112diff --git a/tests/disas/component-model/direct-adapter-calls.wat b/tests/disas/component-model/direct-adapter-calls.watindex 278158af83..8867869944 100644--- a/tests/disas/component-model/direct-adapter-calls.wat+++ b/tests/disas/component-model/direct-adapter-calls.wat@@ -118,7 +118,7 @@;; @0081 v13 = load.i64 notrap aligned readonly can_move v0+104;; @007f v11 = iconst.i32 23;; @0081 call_indirect sig0, v14(v13, v0, v11) ; v11 = 23-;; @0083 trap user11+;; @0083 trap user12;;;; block3:;; @0085 v15 = load.i64 notrap aligned readonly can_move v0+112diff --git a/tests/disas/conditional-traps.wat b/tests/disas/conditional-traps.watindex 3b05dafecb..afca9ed8e0 100644--- a/tests/disas/conditional-traps.wat+++ b/tests/disas/conditional-traps.wat@@ -28,7 +28,7 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0031 trapnz v2, user11+;; @0031 trapnz v2, user12;; @002f jump block3;;;; block3:@@ -48,7 +48,7 @@;; v5 = iconst.i32 0;; @0038 v3 = icmp eq v2, v5 ; v5 = 0;; @0038 v4 = uextend.i32 v3-;; @003b trapnz v4, user11+;; @003b trapnz v4, user12;; @0039 jump block3;;;; block3:diff --git a/tests/disas/debug-exceptions.wat b/tests/disas/debug-exceptions.watindex 5937806cb9..a95b35ceb3 100644--- a/tests/disas/debug-exceptions.wat+++ b/tests/disas/debug-exceptions.wat@@ -30,35 +30,35 @@;; ldr x0, [x0, #0x18];; mov x1, sp;; cmp x1, x0-;; b.lo #0x194+;; b.lo #0x1c0;; 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 [37, 1, 0, 148]+;; ╰─╼ breakpoint patch: wasm PC 0x35, patch bytes [46, 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 [35, 1, 0, 148]+;; ╰─╼ breakpoint patch: wasm PC 0x37, patch bytes [44, 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 [33, 1, 0, 148]+;; ╰─╼ breakpoint patch: wasm PC 0x3d, patch bytes [42, 1, 0, 148];; mov w19, #0x2a;; stur w19, [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 [30, 1, 0, 148]+;; ╰─╼ breakpoint patch: wasm PC 0x3f, patch bytes [39, 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 [29, 1, 0, 148]+;; ╰─╼ breakpoint patch: wasm PC 0x40, patch bytes [38, 1, 0, 148];; stur w19, [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 [27, 1, 0, 148]+;; ╰─╼ breakpoint patch: wasm PC 0x42, patch bytes [36, 1, 0, 148];; ldur x2, [sp, #0x10]-;; bl #0x444+;; bl #0x468;; 84: mov x20, x2;; mov w3, #0x4000000;; ldur x0, [sp, #0x10]@@ -67,64 +67,63 @@;; mov w5, #0x28;; mov w6, #8;; ldur x2, [sp, #0x10]-;; bl #0x368+;; bl #0x38c;; a8: ldur x0, [sp, #0x10]-;; ldr x5, [x0, #8]-;; ldr x6, [x5, #0x20]-;; stur x5, [sp, #0x20]-;; add x3, x6, #0x20-;; str w19, [x3, w2, uxtw]-;; add x3, x6, #0x18-;; mov x0, x20+;; 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 w3, #0-;; add x4, x6, #0x1c-;; stur x6, [sp, #0x18]-;; str w3, [x4, w2, uxtw];; mov x3, x2;; ldur x2, [sp, #0x10]-;; bl #0x47c+;; bl #0x4a0;; ├─╼ exception frame offset: SP = FP - 0xc0;; ╰─╼ exception handler: tag=0, context at [SP+0x10], handler=0x100;; e8: mov w3, #9;; ldur x2, [sp, #0x10]-;; bl #0x3d8+;; bl #0x3fc;; f4: ldur x2, [sp, #0x10]-;; bl #0x410+;; 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 x2, x0-;; mov w3, w2-;; mov x4, #0x28-;; adds x3, x3, x4-;; cset x4, hs-;; tst w4, #0xff-;; b.ne #0x1ac-;; 11c: ldur x5, [sp, #0x20]-;; ldr x1, [x5, #0x28]-;; cmp x3, x1-;; b.hi #0x1b0-;; 12c: ldur x6, [sp, #0x18]-;; add x0, x6, #0x20-;; ldr w0, [x0, w2, uxtw]+;; 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+;; 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 [233, 0, 0, 148]+;; ╰─╼ breakpoint patch: wasm PC 0x48, patch bytes [243, 0, 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-;; 158: ldur x0, [sp, #0x10]+;; 154: 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 [226, 0, 0, 148]+;; ╰─╼ breakpoint patch: wasm PC 0x4a, patch bytes [236, 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 [225, 0, 0, 148]+;; ╰─╼ breakpoint patch: wasm PC 0x4b, patch bytes [235, 0, 0, 148];; add sp, sp, #0x30;; ldp d8, d9, [sp], #0x10;; ldp d10, d11, [sp], #0x10@@ -137,12 +136,24 @@;; ldp x27, x28, [sp], #0x10;; ldp x29, x30, [sp], #0x10;; ret-;; 194: stur x2, [sp, #0x10]-;; 198: mov w3, #0-;; 19c: bl #0x3d8-;; 1a0: ldur x2, [sp, #0x10]-;; 1a4: bl #0x410+;; 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+;; 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-;; 1a8: .byte 0x1f, 0xc1, 0x00, 0x00-;; 1ac: .byte 0x1f, 0xc1, 0x00, 0x00-;; 1b0: .byte 0x1f, 0xc1, 0x00, 0x00+;; 1d4: .byte 0x1f, 0xc1, 0x00, 0x00diff --git a/tests/disas/duplicate-function-types.wat b/tests/disas/duplicate-function-types.watindex 05352ffdb3..0682b67449 100644--- a/tests/disas/duplicate-function-types.wat+++ b/tests/disas/duplicate-function-types.wat@@ -42,7 +42,7 @@;; @002d v11 = iadd v9, v10;; @002d v12 = iconst.i64 0;; @002d v13 = select_spectre_guard v7, v12, v11 ; v12 = 0-;; @002d v14 = load.i64 user5 aligned table v13+;; @002d v14 = load.i64 user6 aligned table v13;; v60 = iconst.i64 -2;; @002d v15 = band v14, v60 ; v60 = -2;; @002d brif v14, block3(v15), block2@@ -56,9 +56,9 @@;; block3(v16: i64):;; @002d v22 = load.i64 notrap aligned readonly can_move v0+40;; @002d v23 = load.i32 notrap aligned readonly can_move v22-;; @002d v24 = load.i32 user6 aligned readonly v16+16+;; @002d v24 = load.i32 user7 aligned readonly v16+16;; @002d v25 = icmp eq v24, v23-;; @002d trapz v25, user7+;; @002d trapz v25, user8;; @002d v26 = load.i64 notrap aligned readonly v16+8;; @002d v27 = load.i64 notrap aligned readonly v16+24;; @002d v28 = call_indirect sig0, v26(v27, v0)@@ -74,7 +74,7 @@;; @0032 v36 = iadd v34, v35;; @0032 v37 = iconst.i64 0;; @0032 v38 = select_spectre_guard v32, v37, v36 ; v37 = 0-;; @0032 v39 = load.i64 user5 aligned table v38+;; @0032 v39 = load.i64 user6 aligned table v38;; v54 = iconst.i64 -2;; @0032 v40 = band v39, v54 ; v54 = -2;; @0032 brif v39, block5(v40), block4@@ -88,9 +88,9 @@;; block5(v41: i64):;; @0032 v47 = load.i64 notrap aligned readonly can_move v0+40;; @0032 v48 = load.i32 notrap aligned readonly can_move v47-;; @0032 v49 = load.i32 user6 aligned readonly v41+16+;; @0032 v49 = load.i32 user7 aligned readonly v41+16;; @0032 v50 = icmp eq v49, v48-;; @0032 trapz v50, user7+;; @0032 trapz v50, user8;; @0032 v51 = load.i64 notrap aligned readonly v41+8;; @0032 v52 = load.i64 notrap aligned readonly v41+24;; @0032 v53 = call_indirect sig0, v51(v52, v0)diff --git a/tests/disas/gc/copying/array-fill.wat b/tests/disas/gc/copying/array-fill.watindex 978c00170b..f2ecd5443b 100644--- a/tests/disas/gc/copying/array-fill.wat+++ b/tests/disas/gc/copying/array-fill.wat@@ -19,28 +19,28 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i64, v5: i32):-;; @0027 trapz v2, user15+;; @0027 trapz v2, user16;; @0027 v41 = load.i64 notrap aligned readonly can_move v0+8;; @0027 v7 = load.i64 notrap aligned readonly can_move v41+32;; @0027 v6 = uextend.i64 v2;; @0027 v8 = iadd v7, v6;; @0027 v9 = iconst.i64 16;; @0027 v10 = iadd v8, v9 ; v9 = 16-;; @0027 v11 = load.i32 notrap aligned readonly v10-;; @0027 v12 = uadd_overflow_trap v3, v5, user16+;; @0027 v11 = load.i32 user2 readonly v10+;; @0027 v12 = uadd_overflow_trap v3, v5, user17;; @0027 v13 = icmp ugt v12, v11-;; @0027 trapnz v13, user16+;; @0027 trapnz v13, user17;; @0027 v15 = uextend.i64 v11;; v43 = iconst.i64 3;; v44 = ishl v15, v43 ; v43 = 3;; v40 = iconst.i64 32;; @0027 v17 = ushr v44, v40 ; v40 = 32-;; @0027 trapnz v17, user1+;; @0027 trapnz v17, user2;; v53 = iconst.i32 3;; v54 = ishl v11, v53 ; v53 = 3;; @0027 v19 = iconst.i32 24-;; @0027 v20 = uadd_overflow_trap v54, v19, user1 ; v19 = 24-;; @0027 v24 = uadd_overflow_trap v2, v20, user1+;; @0027 v20 = uadd_overflow_trap v54, v19, user2 ; v19 = 24+;; @0027 v24 = uadd_overflow_trap v2, v20, user2;; @0027 v25 = uextend.i64 v24;; @0027 v27 = iadd v7, v25;; v60 = ishl v3, v53 ; v53 = 3@@ -59,7 +59,7 @@;; @0027 brif v36, block4, block3;;;; block3:-;; @0027 store.i64 notrap aligned little v4, v35+;; @0027 store.i64 user2 little v4, v35;; v66 = iconst.i64 8;; v67 = iadd.i64 v35, v66 ; v66 = 8;; @0027 jump block2(v67)diff --git a/tests/disas/gc/copying/array-get-s.wat b/tests/disas/gc/copying/array-get-s.watindex 85e1a41e2d..58ef50e570 100644--- a/tests/disas/gc/copying/array-get-s.wat+++ b/tests/disas/gc/copying/array-get-s.wat@@ -19,30 +19,30 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @0022 trapz v2, user15+;; @0022 trapz v2, user16;; @0022 v34 = load.i64 notrap aligned readonly can_move v0+8;; @0022 v6 = load.i64 notrap aligned readonly can_move v34+32;; @0022 v5 = uextend.i64 v2;; @0022 v7 = iadd v6, v5;; @0022 v8 = iconst.i64 16;; @0022 v9 = iadd v7, v8 ; v8 = 16-;; @0022 v10 = load.i32 notrap aligned readonly v9+;; @0022 v10 = load.i32 user2 readonly v9;; @0022 v11 = icmp ult v3, v10-;; @0022 trapz v11, user16+;; @0022 trapz v11, user17;; @0022 v13 = uextend.i64 v10;; v33 = iconst.i64 32;; @0022 v15 = ushr v13, v33 ; v33 = 32-;; @0022 trapnz v15, user1+;; @0022 trapnz v15, user2;; @0022 v17 = iconst.i32 20-;; @0022 v18 = uadd_overflow_trap v10, v17, user1 ; v17 = 20-;; @0022 v22 = uadd_overflow_trap v2, v18, user1+;; @0022 v18 = uadd_overflow_trap v10, v17, user2 ; v17 = 20+;; @0022 v22 = uadd_overflow_trap v2, v18, user2;; @0022 v23 = uextend.i64 v22;; @0022 v25 = iadd v6, v23;; @0022 v21 = iadd v3, v17 ; v17 = 20;; @0022 v26 = isub v18, v21;; @0022 v27 = uextend.i64 v26;; @0022 v28 = isub v25, v27-;; @0022 v29 = load.i8 notrap aligned little v28+;; @0022 v29 = load.i8 user2 little v28;; @0025 jump block1;;;; block1:diff --git a/tests/disas/gc/copying/array-get-u.wat b/tests/disas/gc/copying/array-get-u.watindex cf48d8a2ee..368c1dc25b 100644--- a/tests/disas/gc/copying/array-get-u.wat+++ b/tests/disas/gc/copying/array-get-u.wat@@ -19,30 +19,30 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @0022 trapz v2, user15+;; @0022 trapz v2, user16;; @0022 v34 = load.i64 notrap aligned readonly can_move v0+8;; @0022 v6 = load.i64 notrap aligned readonly can_move v34+32;; @0022 v5 = uextend.i64 v2;; @0022 v7 = iadd v6, v5;; @0022 v8 = iconst.i64 16;; @0022 v9 = iadd v7, v8 ; v8 = 16-;; @0022 v10 = load.i32 notrap aligned readonly v9+;; @0022 v10 = load.i32 user2 readonly v9;; @0022 v11 = icmp ult v3, v10-;; @0022 trapz v11, user16+;; @0022 trapz v11, user17;; @0022 v13 = uextend.i64 v10;; v33 = iconst.i64 32;; @0022 v15 = ushr v13, v33 ; v33 = 32-;; @0022 trapnz v15, user1+;; @0022 trapnz v15, user2;; @0022 v17 = iconst.i32 20-;; @0022 v18 = uadd_overflow_trap v10, v17, user1 ; v17 = 20-;; @0022 v22 = uadd_overflow_trap v2, v18, user1+;; @0022 v18 = uadd_overflow_trap v10, v17, user2 ; v17 = 20+;; @0022 v22 = uadd_overflow_trap v2, v18, user2;; @0022 v23 = uextend.i64 v22;; @0022 v25 = iadd v6, v23;; @0022 v21 = iadd v3, v17 ; v17 = 20;; @0022 v26 = isub v18, v21;; @0022 v27 = uextend.i64 v26;; @0022 v28 = isub v25, v27-;; @0022 v29 = load.i8 notrap aligned little v28+;; @0022 v29 = load.i8 user2 little v28;; @0025 jump block1;;;; block1:diff --git a/tests/disas/gc/copying/array-get.wat b/tests/disas/gc/copying/array-get.watindex d943abc4a3..0e81aed720 100644--- a/tests/disas/gc/copying/array-get.wat+++ b/tests/disas/gc/copying/array-get.wat@@ -19,27 +19,27 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @0022 trapz v2, user15+;; @0022 trapz v2, user16;; @0022 v33 = load.i64 notrap aligned readonly can_move v0+8;; @0022 v6 = load.i64 notrap aligned readonly can_move v33+32;; @0022 v5 = uextend.i64 v2;; @0022 v7 = iadd v6, v5;; @0022 v8 = iconst.i64 16;; @0022 v9 = iadd v7, v8 ; v8 = 16-;; @0022 v10 = load.i32 notrap aligned readonly v9+;; @0022 v10 = load.i32 user2 readonly v9;; @0022 v11 = icmp ult v3, v10-;; @0022 trapz v11, user16+;; @0022 trapz v11, user17;; @0022 v13 = uextend.i64 v10;; v35 = iconst.i64 3;; v36 = ishl v13, v35 ; v35 = 3;; v32 = iconst.i64 32;; @0022 v15 = ushr v36, v32 ; v32 = 32-;; @0022 trapnz v15, user1+;; @0022 trapnz v15, user2;; v45 = iconst.i32 3;; v46 = ishl v10, v45 ; v45 = 3;; @0022 v17 = iconst.i32 24-;; @0022 v18 = uadd_overflow_trap v46, v17, user1 ; v17 = 24-;; @0022 v22 = uadd_overflow_trap v2, v18, user1+;; @0022 v18 = uadd_overflow_trap v46, v17, user2 ; v17 = 24+;; @0022 v22 = uadd_overflow_trap v2, v18, user2;; @0022 v23 = uextend.i64 v22;; @0022 v25 = iadd v6, v23;; v52 = ishl v3, v45 ; v45 = 3@@ -47,7 +47,7 @@;; @0022 v26 = isub v18, v21;; @0022 v27 = uextend.i64 v26;; @0022 v28 = isub v25, v27-;; @0022 v29 = load.i64 notrap aligned little v28+;; @0022 v29 = load.i64 user2 little v28;; @0025 jump block1;;;; block1:diff --git a/tests/disas/gc/copying/array-len.wat b/tests/disas/gc/copying/array-len.watindex e7ad10b65b..28b393da4c 100644--- a/tests/disas/gc/copying/array-len.wat+++ b/tests/disas/gc/copying/array-len.wat@@ -19,14 +19,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @001f trapz v2, user15+;; @001f trapz v2, user16;; @001f v10 = load.i64 notrap aligned readonly can_move v0+8;; @001f v5 = load.i64 notrap aligned readonly can_move v10+32;; @001f v4 = uextend.i64 v2;; @001f v6 = iadd v5, v4;; @001f v7 = iconst.i64 16;; @001f v8 = iadd v6, v7 ; v7 = 16-;; @001f v9 = load.i32 notrap aligned readonly v8+;; @001f v9 = load.i32 user2 readonly v8;; @0021 jump block1;;;; block1:diff --git a/tests/disas/gc/copying/array-new-fixed-of-gc-refs.wat b/tests/disas/gc/copying/array-new-fixed-of-gc-refs.watindex 00693251b6..3f94a93f92 100644--- a/tests/disas/gc/copying/array-new-fixed-of-gc-refs.wat+++ b/tests/disas/gc/copying/array-new-fixed-of-gc-refs.wat@@ -72,19 +72,19 @@;; @0025 v6 = iconst.i32 3;; v60 = iconst.i64 16;; @0025 v46 = iadd v45, v60 ; v60 = 16-;; @0025 store notrap aligned v6, v46 ; v6 = 3+;; @0025 store user2 v6, v46 ; v6 = 3;; v56 = load.i32 notrap v69;; v98 = iconst.i64 20;; v103 = iadd v45, v98 ; v98 = 20-;; @0025 store notrap aligned little v56, v103+;; @0025 store user2 little v56, v103;; v55 = load.i32 notrap v68;; v106 = iconst.i64 24;; v111 = iadd v45, v106 ; v106 = 24-;; @0025 store notrap aligned little v55, v111+;; @0025 store user2 little v55, v111;; v54 = load.i32 notrap v67;; v127 = iconst.i64 28;; v132 = iadd v45, v127 ; v127 = 28-;; @0025 store notrap aligned little v54, v132+;; @0025 store user2 little v54, v132;; @0029 jump block1(v44);;;; block1(v5: i32):diff --git a/tests/disas/gc/copying/array-new-fixed.wat b/tests/disas/gc/copying/array-new-fixed.watindex 3fbbe70777..c789fa9b90 100644--- a/tests/disas/gc/copying/array-new-fixed.wat+++ b/tests/disas/gc/copying/array-new-fixed.wat@@ -63,16 +63,16 @@;; @0025 v6 = iconst.i32 3;; v54 = iconst.i64 16;; @0025 v46 = iadd v45, v54 ; v54 = 16-;; @0025 store notrap aligned v6, v46 ; v6 = 3+;; @0025 store user2 v6, v46 ; v6 = 3;; v62 = iconst.i64 24;; v92 = iadd v45, v62 ; v62 = 24-;; @0025 store.i64 notrap aligned little v2, v92+;; @0025 store.i64 user2 little v2, v92;; v59 = iconst.i64 32;; v99 = iadd v45, v59 ; v59 = 32-;; @0025 store.i64 notrap aligned little v3, v99+;; @0025 store.i64 user2 little v3, v99;; v114 = iconst.i64 40;; v119 = iadd v45, v114 ; v114 = 40-;; @0025 store.i64 notrap aligned little v4, v119+;; @0025 store.i64 user2 little v4, v119;; @0029 jump block1(v44);;;; block1(v5: i32):diff --git a/tests/disas/gc/copying/array-new.wat b/tests/disas/gc/copying/array-new.watindex 82be522a68..2baae2bf5a 100644--- a/tests/disas/gc/copying/array-new.wat+++ b/tests/disas/gc/copying/array-new.wat@@ -25,11 +25,11 @@;; v63 = ishl v6, v62 ; v62 = 3;; v60 = iconst.i64 32;; @0022 v8 = ushr v63, v60 ; v60 = 32-;; @0022 trapnz v8, user17+;; @0022 trapnz v8, user18;; @0022 v5 = iconst.i32 24;; v69 = iconst.i32 3;; v70 = ishl v3, v69 ; v69 = 3-;; @0022 v10 = uadd_overflow_trap v5, v70, user17 ; v5 = 24+;; @0022 v10 = uadd_overflow_trap v5, v70, user18 ; v5 = 24;; @0022 v12 = load.i64 notrap aligned readonly can_move v0+32;; @0022 v13 = load.i32 notrap aligned can_move v12;; @0022 v20 = uextend.i64 v13@@ -78,7 +78,7 @@;; block4(v42: i32, v43: i64):;; v55 = iconst.i64 16;; @0022 v44 = iadd v43, v55 ; v55 = 16-;; @0022 store.i32 notrap aligned v3, v44+;; @0022 store.i32 user2 v3, v44;; v88 = iconst.i64 24;; v93 = iadd v43, v88 ; v88 = 24;; @0022 v51 = iadd v43, v15@@ -90,7 +90,7 @@;; @0022 brif v53, block7, block6;;;; block6:-;; @0022 store.i64 notrap aligned little v2, v52+;; @0022 store.i64 user2 little v2, v52;; v104 = iconst.i64 8;; v105 = iadd.i64 v52, v104 ; v104 = 8;; @0022 jump block5(v105)diff --git a/tests/disas/gc/copying/array-set.wat b/tests/disas/gc/copying/array-set.watindex 9e98afd8e5..02eaadc7e2 100644--- a/tests/disas/gc/copying/array-set.wat+++ b/tests/disas/gc/copying/array-set.wat@@ -19,27 +19,27 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i64):-;; @0024 trapz v2, user15+;; @0024 trapz v2, user16;; @0024 v32 = load.i64 notrap aligned readonly can_move v0+8;; @0024 v6 = load.i64 notrap aligned readonly can_move v32+32;; @0024 v5 = uextend.i64 v2;; @0024 v7 = iadd v6, v5;; @0024 v8 = iconst.i64 16;; @0024 v9 = iadd v7, v8 ; v8 = 16-;; @0024 v10 = load.i32 notrap aligned readonly v9+;; @0024 v10 = load.i32 user2 readonly v9;; @0024 v11 = icmp ult v3, v10-;; @0024 trapz v11, user16+;; @0024 trapz v11, user17;; @0024 v13 = uextend.i64 v10;; v34 = iconst.i64 3;; v35 = ishl v13, v34 ; v34 = 3;; v31 = iconst.i64 32;; @0024 v15 = ushr v35, v31 ; v31 = 32-;; @0024 trapnz v15, user1+;; @0024 trapnz v15, user2;; v44 = iconst.i32 3;; v45 = ishl v10, v44 ; v44 = 3;; @0024 v17 = iconst.i32 24-;; @0024 v18 = uadd_overflow_trap v45, v17, user1 ; v17 = 24-;; @0024 v22 = uadd_overflow_trap v2, v18, user1+;; @0024 v18 = uadd_overflow_trap v45, v17, user2 ; v17 = 24+;; @0024 v22 = uadd_overflow_trap v2, v18, user2;; @0024 v23 = uextend.i64 v22;; @0024 v25 = iadd v6, v23;; v51 = ishl v3, v44 ; v44 = 3@@ -47,7 +47,7 @@;; @0024 v26 = isub v18, v21;; @0024 v27 = uextend.i64 v26;; @0024 v28 = isub v25, v27-;; @0024 store notrap aligned little v4, v28+;; @0024 store user2 little v4, v28;; @0027 jump block1;;;; block1:diff --git a/tests/disas/gc/copying/br-on-cast-fail.wat b/tests/disas/gc/copying/br-on-cast-fail.watindex 870ebdd429..2b1215391d 100644--- a/tests/disas/gc/copying/br-on-cast-fail.wat+++ b/tests/disas/gc/copying/br-on-cast-fail.wat@@ -50,7 +50,7 @@;; @002e v15 = iadd v14, v13;; @002e v16 = iconst.i64 4;; @002e v17 = iadd v15, v16 ; v16 = 4-;; @002e v18 = load.i32 notrap aligned readonly v17+;; @002e v18 = load.i32 user2 readonly v17;; @002e v11 = load.i64 notrap aligned readonly can_move v0+40;; @002e v12 = load.i32 notrap aligned readonly can_move v11;; @002e v19 = icmp eq v18, v12diff --git a/tests/disas/gc/copying/br-on-cast.wat b/tests/disas/gc/copying/br-on-cast.watindex 749a37889a..967060f290 100644--- a/tests/disas/gc/copying/br-on-cast.wat+++ b/tests/disas/gc/copying/br-on-cast.wat@@ -50,7 +50,7 @@;; @002f v15 = iadd v14, v13;; @002f v16 = iconst.i64 4;; @002f v17 = iadd v15, v16 ; v16 = 4-;; @002f v18 = load.i32 notrap aligned readonly v17+;; @002f v18 = load.i32 user2 readonly v17;; @002f v11 = load.i64 notrap aligned readonly can_move v0+40;; @002f v12 = load.i32 notrap aligned readonly can_move v11;; @002f v19 = icmp eq v18, v12diff --git a/tests/disas/gc/copying/call-indirect-and-subtyping.wat b/tests/disas/gc/copying/call-indirect-and-subtyping.watindex ae94992428..1b3d1758ce 100644--- a/tests/disas/gc/copying/call-indirect-and-subtyping.wat+++ b/tests/disas/gc/copying/call-indirect-and-subtyping.wat@@ -38,7 +38,7 @@;; @005c v7 = ishl v5, v30 ; v30 = 3;; @005c v8 = iadd v6, v7;; @005c v10 = select_spectre_guard v4, v9, v8 ; v9 = 0-;; @005c v11 = load.i64 user5 aligned table v10+;; @005c v11 = load.i64 user6 aligned table v10;; v29 = iconst.i64 -2;; @005c v12 = band v11, v29 ; v29 = -2;; @005c brif v11, block3(v12), block2@@ -49,7 +49,7 @@;; @005c jump block3(v17);;;; block3(v13: i64):-;; @005c v21 = load.i32 user6 aligned readonly v13+16+;; @005c v21 = load.i32 user7 aligned readonly v13+16;; @005c v19 = load.i64 notrap aligned readonly can_move v0+40;; @005c v20 = load.i32 notrap aligned readonly can_move v19;; @005c v22 = icmp eq v21, v20@@ -61,7 +61,7 @@;; @005c jump block5(v25);;;; block5(v26: i32):-;; @005c trapz v26, user7+;; @005c trapz v26, user8;; @005c v27 = load.i64 notrap aligned readonly v13+8;; @005c v28 = load.i64 notrap aligned readonly v13+24;; @005c call_indirect sig0, v27(v28, v0)diff --git a/tests/disas/gc/copying/funcref-in-gc-heap-get.wat b/tests/disas/gc/copying/funcref-in-gc-heap-get.watindex fa9b4401ba..bb3c5b6de0 100644--- a/tests/disas/gc/copying/funcref-in-gc-heap-get.wat+++ b/tests/disas/gc/copying/funcref-in-gc-heap-get.wat@@ -21,14 +21,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0020 trapz v2, user15+;; @0020 trapz v2, user16;; @0020 v13 = load.i64 notrap aligned readonly can_move v0+8;; @0020 v5 = load.i64 notrap aligned readonly can_move v13+32;; @0020 v4 = uextend.i64 v2;; @0020 v6 = iadd v5, v4;; @0020 v7 = iconst.i64 16;; @0020 v8 = iadd v6, v7 ; v7 = 16-;; @0020 v11 = load.i32 notrap aligned little v8+;; @0020 v11 = load.i32 user2 little v8;; @0020 v9 = iconst.i32 -1;; @0020 v12 = call fn0(v0, v11, v9) ; v9 = -1;; @0024 jump block1diff --git a/tests/disas/gc/copying/funcref-in-gc-heap-new.wat b/tests/disas/gc/copying/funcref-in-gc-heap-new.watindex c2fb4c5a75..33799bdbcf 100644--- a/tests/disas/gc/copying/funcref-in-gc-heap-new.wat+++ b/tests/disas/gc/copying/funcref-in-gc-heap-new.wat@@ -69,7 +69,7 @@;; @0020 v41 = ireduce.i32 v40;; v44 = iconst.i64 16;; @0020 v38 = iadd v37, v44 ; v44 = 16-;; @0020 store notrap aligned little v41, v38+;; @0020 store user2 little v41, v38;; v42 = load.i32 notrap v45;; @0023 jump block1;;diff --git a/tests/disas/gc/copying/funcref-in-gc-heap-set.wat b/tests/disas/gc/copying/funcref-in-gc-heap-set.watindex 4555355a15..2e9835209c 100644--- a/tests/disas/gc/copying/funcref-in-gc-heap-set.wat+++ b/tests/disas/gc/copying/funcref-in-gc-heap-set.wat@@ -21,7 +21,7 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i64):-;; @0022 trapz v2, user15+;; @0022 trapz v2, user16;; @0022 v10 = call fn0(v0, v3);; @0022 v11 = ireduce.i32 v10;; @0022 v12 = load.i64 notrap aligned readonly can_move v0+8@@ -30,7 +30,7 @@;; @0022 v6 = iadd v5, v4;; @0022 v7 = iconst.i64 16;; @0022 v8 = iadd v6, v7 ; v7 = 16-;; @0022 store notrap aligned little v11, v8+;; @0022 store user2 little v11, v8;; @0026 jump block1;;;; block1:diff --git a/tests/disas/gc/copying/multiple-array-get.wat b/tests/disas/gc/copying/multiple-array-get.watindex 24d7d3b0f6..8ca40210ee 100644--- a/tests/disas/gc/copying/multiple-array-get.wat+++ b/tests/disas/gc/copying/multiple-array-get.wat@@ -20,27 +20,27 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32):-;; @0024 trapz v2, user15+;; @0024 trapz v2, user16;; @0024 v65 = load.i64 notrap aligned readonly can_move v0+8;; @0024 v8 = load.i64 notrap aligned readonly can_move v65+32;; @0024 v7 = uextend.i64 v2;; @0024 v9 = iadd v8, v7;; @0024 v10 = iconst.i64 16;; @0024 v11 = iadd v9, v10 ; v10 = 16-;; @0024 v12 = load.i32 notrap aligned readonly v11+;; @0024 v12 = load.i32 user2 readonly v11;; @0024 v13 = icmp ult v3, v12-;; @0024 trapz v13, user16+;; @0024 trapz v13, user17;; @0024 v15 = uextend.i64 v12;; v67 = iconst.i64 3;; v68 = ishl v15, v67 ; v67 = 3;; v64 = iconst.i64 32;; @0024 v17 = ushr v68, v64 ; v64 = 32-;; @0024 trapnz v17, user1+;; @0024 trapnz v17, user2;; v77 = iconst.i32 3;; v78 = ishl v12, v77 ; v77 = 3;; @0024 v19 = iconst.i32 24-;; @0024 v20 = uadd_overflow_trap v78, v19, user1 ; v19 = 24-;; @0024 v24 = uadd_overflow_trap v2, v20, user1+;; @0024 v20 = uadd_overflow_trap v78, v19, user2 ; v19 = 24+;; @0024 v24 = uadd_overflow_trap v2, v20, user2;; @0024 v25 = uextend.i64 v24;; @0024 v27 = iadd v8, v25;; v84 = ishl v3, v77 ; v77 = 3@@ -48,15 +48,15 @@;; @0024 v28 = isub v20, v23;; @0024 v29 = uextend.i64 v28;; @0024 v30 = isub v27, v29-;; @0024 v31 = load.i64 notrap aligned little v30+;; @0024 v31 = load.i64 user2 little v30;; @002b v38 = icmp ult v4, v12-;; @002b trapz v38, user16+;; @002b trapz v38, user17;; v86 = ishl v4, v77 ; v77 = 3;; @002b v48 = iadd v86, v19 ; v19 = 24;; @002b v53 = isub v20, v48;; @002b v54 = uextend.i64 v53;; @002b v55 = isub v27, v54-;; @002b v56 = load.i64 notrap aligned little v55+;; @002b v56 = load.i64 user2 little v55;; @002e jump block1;;;; block1:diff --git a/tests/disas/gc/copying/multiple-struct-get.wat b/tests/disas/gc/copying/multiple-struct-get.watindex a7cc16ec1f..8f70d28037 100644--- a/tests/disas/gc/copying/multiple-struct-get.wat+++ b/tests/disas/gc/copying/multiple-struct-get.wat@@ -21,17 +21,17 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0023 trapz v2, user15+;; @0023 trapz v2, user16;; @0023 v20 = load.i64 notrap aligned readonly can_move v0+8;; @0023 v6 = load.i64 notrap aligned readonly can_move v20+32;; @0023 v5 = uextend.i64 v2;; @0023 v7 = iadd v6, v5;; @0023 v8 = iconst.i64 16;; @0023 v9 = iadd v7, v8 ; v8 = 16-;; @0023 v10 = load.f32 notrap aligned little v9+;; @0023 v10 = load.f32 user2 little v9;; @0029 v14 = iconst.i64 20;; @0029 v15 = iadd v7, v14 ; v14 = 20-;; @0029 v16 = load.i8 notrap aligned little v15+;; @0029 v16 = load.i8 user2 little v15;; @002d jump block1;;;; block1:diff --git a/tests/disas/gc/copying/ref-cast.wat b/tests/disas/gc/copying/ref-cast.watindex 03df9934f1..b78acee385 100644--- a/tests/disas/gc/copying/ref-cast.wat+++ b/tests/disas/gc/copying/ref-cast.wat@@ -41,7 +41,7 @@;; @001e v15 = iadd v14, v13;; @001e v16 = iconst.i64 4;; @001e v17 = iadd v15, v16 ; v16 = 4-;; @001e v18 = load.i32 notrap aligned readonly v17+;; @001e v18 = load.i32 user2 readonly v17;; @001e v11 = load.i64 notrap aligned readonly can_move v0+40;; @001e v12 = load.i32 notrap aligned readonly can_move v11;; @001e v19 = icmp eq v18, v12@@ -56,7 +56,7 @@;; @001e jump block4(v23);;;; block4(v24: i32):-;; @001e trapz v24, user18+;; @001e trapz v24, user19;; v25 = load.i32 notrap v36;; @0021 jump block1;;diff --git a/tests/disas/gc/copying/ref-test-array.wat b/tests/disas/gc/copying/ref-test-array.watindex 2fdd661104..292816d257 100644--- a/tests/disas/gc/copying/ref-test-array.wat+++ b/tests/disas/gc/copying/ref-test-array.wat@@ -33,7 +33,7 @@;; @001b v11 = load.i64 notrap aligned readonly can_move v21+32;; @001b v10 = uextend.i64 v2;; @001b v12 = iadd v11, v10-;; @001b v15 = load.i32 notrap aligned readonly v12+;; @001b v15 = load.i32 user2 readonly v12;; @001b v16 = iconst.i32 -1476395008;; @001b v17 = band v15, v16 ; v16 = -1476395008;; @001b v18 = icmp eq v17, v16 ; v16 = -1476395008diff --git a/tests/disas/gc/copying/ref-test-concrete-func-type.wat b/tests/disas/gc/copying/ref-test-concrete-func-type.watindex a90fec1307..24e8ea9b0e 100644--- a/tests/disas/gc/copying/ref-test-concrete-func-type.wat+++ b/tests/disas/gc/copying/ref-test-concrete-func-type.wat@@ -27,7 +27,7 @@;; @0020 jump block3;;;; block3:-;; @0020 v10 = load.i32 notrap aligned readonly v2+16+;; @0020 v10 = load.i32 user2 readonly v2+16;; @0020 v8 = load.i64 notrap aligned readonly can_move v0+40;; @0020 v9 = load.i32 notrap aligned readonly can_move v8;; @0020 v11 = icmp eq v10, v9diff --git a/tests/disas/gc/copying/ref-test-concrete-type.wat b/tests/disas/gc/copying/ref-test-concrete-type.watindex b61febcda0..858c1e9c99 100644--- a/tests/disas/gc/copying/ref-test-concrete-type.wat+++ b/tests/disas/gc/copying/ref-test-concrete-type.wat@@ -38,7 +38,7 @@;; @001d v15 = iadd v14, v13;; @001d v16 = iconst.i64 4;; @001d v17 = iadd v15, v16 ; v16 = 4-;; @001d v18 = load.i32 notrap aligned readonly v17+;; @001d v18 = load.i32 user2 readonly v17;; @001d v11 = load.i64 notrap aligned readonly can_move v0+40;; @001d v12 = load.i32 notrap aligned readonly can_move v11;; @001d v19 = icmp eq v18, v12diff --git a/tests/disas/gc/copying/ref-test-eq.wat b/tests/disas/gc/copying/ref-test-eq.watindex 1e7b56465e..e713d60d7a 100644--- a/tests/disas/gc/copying/ref-test-eq.wat+++ b/tests/disas/gc/copying/ref-test-eq.wat@@ -32,7 +32,7 @@;; @001b v11 = load.i64 notrap aligned readonly can_move v21+32;; @001b v10 = uextend.i64 v2;; @001b v12 = iadd v11, v10-;; @001b v15 = load.i32 notrap aligned readonly v12+;; @001b v15 = load.i32 user2 readonly v12;; @001b v16 = iconst.i32 -1610612736;; @001b v17 = band v15, v16 ; v16 = -1610612736;; @001b v18 = icmp eq v17, v16 ; v16 = -1610612736diff --git a/tests/disas/gc/copying/ref-test-struct.wat b/tests/disas/gc/copying/ref-test-struct.watindex 9dfa56397f..84e12215b5 100644--- a/tests/disas/gc/copying/ref-test-struct.wat+++ b/tests/disas/gc/copying/ref-test-struct.wat@@ -33,7 +33,7 @@;; @001b v11 = load.i64 notrap aligned readonly can_move v21+32;; @001b v10 = uextend.i64 v2;; @001b v12 = iadd v11, v10-;; @001b v15 = load.i32 notrap aligned readonly v12+;; @001b v15 = load.i32 user2 readonly v12;; @001b v16 = iconst.i32 -1342177280;; @001b v17 = band v15, v16 ; v16 = -1342177280;; @001b v18 = icmp eq v17, v16 ; v16 = -1342177280diff --git a/tests/disas/gc/copying/struct-get.wat b/tests/disas/gc/copying/struct-get.watindex f9c33ecc01..5ea9a9ec98 100644--- a/tests/disas/gc/copying/struct-get.wat+++ b/tests/disas/gc/copying/struct-get.wat@@ -33,14 +33,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0033 trapz v2, user15+;; @0033 trapz v2, user16;; @0033 v10 = load.i64 notrap aligned readonly can_move v0+8;; @0033 v5 = load.i64 notrap aligned readonly can_move v10+32;; @0033 v4 = uextend.i64 v2;; @0033 v6 = iadd v5, v4;; @0033 v7 = iconst.i64 16;; @0033 v8 = iadd v6, v7 ; v7 = 16-;; @0033 v9 = load.f32 notrap aligned little v8+;; @0033 v9 = load.f32 user2 little v8;; @0037 jump block1;;;; block1:@@ -58,14 +58,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @003c trapz v2, user15+;; @003c trapz v2, user16;; @003c v11 = load.i64 notrap aligned readonly can_move v0+8;; @003c v5 = load.i64 notrap aligned readonly can_move v11+32;; @003c v4 = uextend.i64 v2;; @003c v6 = iadd v5, v4;; @003c v7 = iconst.i64 20;; @003c v8 = iadd v6, v7 ; v7 = 20-;; @003c v9 = load.i8 notrap aligned little v8+;; @003c v9 = load.i8 user2 little v8;; @0040 jump block1;;;; block1:@@ -84,14 +84,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0045 trapz v2, user15+;; @0045 trapz v2, user16;; @0045 v11 = load.i64 notrap aligned readonly can_move v0+8;; @0045 v5 = load.i64 notrap aligned readonly can_move v11+32;; @0045 v4 = uextend.i64 v2;; @0045 v6 = iadd v5, v4;; @0045 v7 = iconst.i64 20;; @0045 v8 = iadd v6, v7 ; v7 = 20-;; @0045 v9 = load.i8 notrap aligned little v8+;; @0045 v9 = load.i8 user2 little v8;; @0049 jump block1;;;; block1:@@ -110,14 +110,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @004e trapz v2, user15+;; @004e trapz v2, user16;; @004e v10 = load.i64 notrap aligned readonly can_move v0+8;; @004e v5 = load.i64 notrap aligned readonly can_move v10+32;; @004e v4 = uextend.i64 v2;; @004e v6 = iadd v5, v4;; @004e v7 = iconst.i64 24;; @004e v8 = iadd v6, v7 ; v7 = 24-;; @004e v9 = load.i32 notrap aligned little v8+;; @004e v9 = load.i32 user2 little v8;; @0052 jump block1;;;; block1:diff --git a/tests/disas/gc/copying/struct-new-default.wat b/tests/disas/gc/copying/struct-new-default.watindex f2c6f96afe..33e47a637b 100644--- a/tests/disas/gc/copying/struct-new-default.wat+++ b/tests/disas/gc/copying/struct-new-default.wat@@ -65,14 +65,14 @@;; @0021 v3 = f32const 0.0;; v45 = iconst.i64 16;; @0021 v40 = iadd v39, v45 ; v45 = 16-;; @0021 store notrap aligned little v3, v40 ; v3 = 0.0+;; @0021 store user2 little v3, v40 ; v3 = 0.0;; @0021 v4 = iconst.i32 0;; v44 = iconst.i64 20;; @0021 v41 = iadd v39, v44 ; v44 = 20-;; @0021 istore8 notrap aligned little v4, v41 ; v4 = 0+;; @0021 istore8 user2 little v4, v41 ; v4 = 0;; v43 = iconst.i64 24;; @0021 v42 = iadd v39, v43 ; v43 = 24-;; @0021 store notrap aligned little v4, v42 ; v4 = 0+;; @0021 store user2 little v4, v42 ; v4 = 0;; @0024 jump block1(v38);;;; block1(v2: i32):diff --git a/tests/disas/gc/copying/struct-new.wat b/tests/disas/gc/copying/struct-new.watindex 0eaaab4919..2208309bd8 100644--- a/tests/disas/gc/copying/struct-new.wat+++ b/tests/disas/gc/copying/struct-new.wat@@ -67,14 +67,14 @@;; block4(v38: i32, v39: i64):;; v47 = iconst.i64 16;; @002a v40 = iadd v39, v47 ; v47 = 16-;; @002a store.f32 notrap aligned little v2, v40+;; @002a store.f32 user2 little v2, v40;; v46 = iconst.i64 20;; @002a v41 = iadd v39, v46 ; v46 = 20-;; @002a istore8.i32 notrap aligned little v3, v41+;; @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 notrap aligned little v43, v42+;; @002a store user2 little v43, v42;; @002d jump block1(v38);;;; block1(v5: i32):diff --git a/tests/disas/gc/copying/struct-set.wat b/tests/disas/gc/copying/struct-set.watindex 1a6b8bfcd5..7173bec357 100644--- a/tests/disas/gc/copying/struct-set.wat+++ b/tests/disas/gc/copying/struct-set.wat@@ -29,14 +29,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: f32):-;; @0034 trapz v2, user15+;; @0034 trapz v2, user16;; @0034 v9 = load.i64 notrap aligned readonly can_move v0+8;; @0034 v5 = load.i64 notrap aligned readonly can_move v9+32;; @0034 v4 = uextend.i64 v2;; @0034 v6 = iadd v5, v4;; @0034 v7 = iconst.i64 16;; @0034 v8 = iadd v6, v7 ; v7 = 16-;; @0034 store notrap aligned little v3, v8+;; @0034 store user2 little v3, v8;; @0038 jump block1;;;; block1:@@ -54,14 +54,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @003f trapz v2, user15+;; @003f trapz v2, user16;; @003f v9 = load.i64 notrap aligned readonly can_move v0+8;; @003f v5 = load.i64 notrap aligned readonly can_move v9+32;; @003f v4 = uextend.i64 v2;; @003f v6 = iadd v5, v4;; @003f v7 = iconst.i64 20;; @003f v8 = iadd v6, v7 ; v7 = 20-;; @003f istore8 notrap aligned little v3, v8+;; @003f istore8 user2 little v3, v8;; @0043 jump block1;;;; block1:@@ -79,14 +79,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @004a trapz v2, user15+;; @004a trapz v2, user16;; @004a v9 = load.i64 notrap aligned readonly can_move v0+8;; @004a v5 = load.i64 notrap aligned readonly can_move v9+32;; @004a v4 = uextend.i64 v2;; @004a v6 = iadd v5, v4;; @004a v7 = iconst.i64 24;; @004a v8 = iadd v6, v7 ; v7 = 24-;; @004a store notrap aligned little v3, v8+;; @004a store user2 little v3, v8;; @004e jump block1;;;; block1:diff --git a/tests/disas/gc/copying/v128-fields.wat b/tests/disas/gc/copying/v128-fields.watindex 34b8e3aa64..7ece5c978b 100644--- a/tests/disas/gc/copying/v128-fields.wat+++ b/tests/disas/gc/copying/v128-fields.wat@@ -21,14 +21,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0022 trapz v2, user15+;; @0022 trapz v2, user16;; @0022 v19 = load.i64 notrap aligned readonly can_move v0+8;; @0022 v5 = load.i64 notrap aligned readonly can_move v19+32;; @0022 v4 = uextend.i64 v2;; @0022 v6 = iadd v5, v4;; @0022 v7 = iconst.i64 16;; @0022 v8 = iadd v6, v7 ; v7 = 16-;; @0022 v9 = load.i8x16 notrap aligned little v8+;; @0022 v9 = load.i8x16 user2 little v8;; @002e jump block1;;;; block1:diff --git a/tests/disas/gc/drc/array-fill.wat b/tests/disas/gc/drc/array-fill.watindex bf0be2fe45..d130bb7e06 100644--- a/tests/disas/gc/drc/array-fill.wat+++ b/tests/disas/gc/drc/array-fill.wat@@ -20,28 +20,28 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i64, v5: i32):-;; @0027 trapz v2, user15+;; @0027 trapz v2, user16;; @0027 v41 = load.i64 notrap aligned readonly can_move v0+8;; @0027 v7 = load.i64 notrap aligned readonly can_move v41+32;; @0027 v6 = uextend.i64 v2;; @0027 v8 = iadd v7, v6;; @0027 v9 = iconst.i64 24;; @0027 v10 = iadd v8, v9 ; v9 = 24-;; @0027 v11 = load.i32 notrap aligned readonly v10-;; @0027 v12 = uadd_overflow_trap v3, v5, user16+;; @0027 v11 = load.i32 user2 readonly v10+;; @0027 v12 = uadd_overflow_trap v3, v5, user17;; @0027 v13 = icmp ugt v12, v11-;; @0027 trapnz v13, user16+;; @0027 trapnz v13, user17;; @0027 v15 = uextend.i64 v11;; v43 = iconst.i64 3;; v44 = ishl v15, v43 ; v43 = 3;; v40 = iconst.i64 32;; @0027 v17 = ushr v44, v40 ; v40 = 32-;; @0027 trapnz v17, user1+;; @0027 trapnz v17, user2;; v53 = iconst.i32 3;; v54 = ishl v11, v53 ; v53 = 3;; @0027 v19 = iconst.i32 32-;; @0027 v20 = uadd_overflow_trap v54, v19, user1 ; v19 = 32-;; @0027 v24 = uadd_overflow_trap v2, v20, user1+;; @0027 v20 = uadd_overflow_trap v54, v19, user2 ; v19 = 32+;; @0027 v24 = uadd_overflow_trap v2, v20, user2;; @0027 v25 = uextend.i64 v24;; @0027 v27 = iadd v7, v25;; v60 = ishl v3, v53 ; v53 = 3@@ -60,7 +60,7 @@;; @0027 brif v36, block4, block3;;;; block3:-;; @0027 store.i64 notrap aligned little v4, v35+;; @0027 store.i64 user2 little v4, v35;; v66 = iconst.i64 8;; v67 = iadd.i64 v35, v66 ; v66 = 8;; @0027 jump block2(v67)diff --git a/tests/disas/gc/drc/array-get-s.wat b/tests/disas/gc/drc/array-get-s.watindex 709263f339..8055b62bd2 100644--- a/tests/disas/gc/drc/array-get-s.wat+++ b/tests/disas/gc/drc/array-get-s.wat@@ -20,30 +20,30 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @0022 trapz v2, user15+;; @0022 trapz v2, user16;; @0022 v34 = load.i64 notrap aligned readonly can_move v0+8;; @0022 v6 = load.i64 notrap aligned readonly can_move v34+32;; @0022 v5 = uextend.i64 v2;; @0022 v7 = iadd v6, v5;; @0022 v8 = iconst.i64 24;; @0022 v9 = iadd v7, v8 ; v8 = 24-;; @0022 v10 = load.i32 notrap aligned readonly v9+;; @0022 v10 = load.i32 user2 readonly v9;; @0022 v11 = icmp ult v3, v10-;; @0022 trapz v11, user16+;; @0022 trapz v11, user17;; @0022 v13 = uextend.i64 v10;; v33 = iconst.i64 32;; @0022 v15 = ushr v13, v33 ; v33 = 32-;; @0022 trapnz v15, user1+;; @0022 trapnz v15, user2;; @0022 v17 = iconst.i32 28-;; @0022 v18 = uadd_overflow_trap v10, v17, user1 ; v17 = 28-;; @0022 v22 = uadd_overflow_trap v2, v18, user1+;; @0022 v18 = uadd_overflow_trap v10, v17, user2 ; v17 = 28+;; @0022 v22 = uadd_overflow_trap v2, v18, user2;; @0022 v23 = uextend.i64 v22;; @0022 v25 = iadd v6, v23;; @0022 v21 = iadd v3, v17 ; v17 = 28;; @0022 v26 = isub v18, v21;; @0022 v27 = uextend.i64 v26;; @0022 v28 = isub v25, v27-;; @0022 v29 = load.i8 notrap aligned little v28+;; @0022 v29 = load.i8 user2 little v28;; @0025 jump block1;;;; block1:diff --git a/tests/disas/gc/drc/array-get-u.wat b/tests/disas/gc/drc/array-get-u.watindex 422e56da9b..050b3b91a1 100644--- a/tests/disas/gc/drc/array-get-u.wat+++ b/tests/disas/gc/drc/array-get-u.wat@@ -20,30 +20,30 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @0022 trapz v2, user15+;; @0022 trapz v2, user16;; @0022 v34 = load.i64 notrap aligned readonly can_move v0+8;; @0022 v6 = load.i64 notrap aligned readonly can_move v34+32;; @0022 v5 = uextend.i64 v2;; @0022 v7 = iadd v6, v5;; @0022 v8 = iconst.i64 24;; @0022 v9 = iadd v7, v8 ; v8 = 24-;; @0022 v10 = load.i32 notrap aligned readonly v9+;; @0022 v10 = load.i32 user2 readonly v9;; @0022 v11 = icmp ult v3, v10-;; @0022 trapz v11, user16+;; @0022 trapz v11, user17;; @0022 v13 = uextend.i64 v10;; v33 = iconst.i64 32;; @0022 v15 = ushr v13, v33 ; v33 = 32-;; @0022 trapnz v15, user1+;; @0022 trapnz v15, user2;; @0022 v17 = iconst.i32 28-;; @0022 v18 = uadd_overflow_trap v10, v17, user1 ; v17 = 28-;; @0022 v22 = uadd_overflow_trap v2, v18, user1+;; @0022 v18 = uadd_overflow_trap v10, v17, user2 ; v17 = 28+;; @0022 v22 = uadd_overflow_trap v2, v18, user2;; @0022 v23 = uextend.i64 v22;; @0022 v25 = iadd v6, v23;; @0022 v21 = iadd v3, v17 ; v17 = 28;; @0022 v26 = isub v18, v21;; @0022 v27 = uextend.i64 v26;; @0022 v28 = isub v25, v27-;; @0022 v29 = load.i8 notrap aligned little v28+;; @0022 v29 = load.i8 user2 little v28;; @0025 jump block1;;;; block1:diff --git a/tests/disas/gc/drc/array-get.wat b/tests/disas/gc/drc/array-get.watindex dfaefc0c15..3e55842efe 100644--- a/tests/disas/gc/drc/array-get.wat+++ b/tests/disas/gc/drc/array-get.wat@@ -20,27 +20,27 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @0022 trapz v2, user15+;; @0022 trapz v2, user16;; @0022 v33 = load.i64 notrap aligned readonly can_move v0+8;; @0022 v6 = load.i64 notrap aligned readonly can_move v33+32;; @0022 v5 = uextend.i64 v2;; @0022 v7 = iadd v6, v5;; @0022 v8 = iconst.i64 24;; @0022 v9 = iadd v7, v8 ; v8 = 24-;; @0022 v10 = load.i32 notrap aligned readonly v9+;; @0022 v10 = load.i32 user2 readonly v9;; @0022 v11 = icmp ult v3, v10-;; @0022 trapz v11, user16+;; @0022 trapz v11, user17;; @0022 v13 = uextend.i64 v10;; v35 = iconst.i64 3;; v36 = ishl v13, v35 ; v35 = 3;; v32 = iconst.i64 32;; @0022 v15 = ushr v36, v32 ; v32 = 32-;; @0022 trapnz v15, user1+;; @0022 trapnz v15, user2;; v45 = iconst.i32 3;; v46 = ishl v10, v45 ; v45 = 3;; @0022 v17 = iconst.i32 32-;; @0022 v18 = uadd_overflow_trap v46, v17, user1 ; v17 = 32-;; @0022 v22 = uadd_overflow_trap v2, v18, user1+;; @0022 v18 = uadd_overflow_trap v46, v17, user2 ; v17 = 32+;; @0022 v22 = uadd_overflow_trap v2, v18, user2;; @0022 v23 = uextend.i64 v22;; @0022 v25 = iadd v6, v23;; v52 = ishl v3, v45 ; v45 = 3@@ -48,7 +48,7 @@;; @0022 v26 = isub v18, v21;; @0022 v27 = uextend.i64 v26;; @0022 v28 = isub v25, v27-;; @0022 v29 = load.i64 notrap aligned little v28+;; @0022 v29 = load.i64 user2 little v28;; @0025 jump block1;;;; block1:diff --git a/tests/disas/gc/drc/array-len.wat b/tests/disas/gc/drc/array-len.watindex 93b984a9fc..72bc38ae6b 100644--- a/tests/disas/gc/drc/array-len.wat+++ b/tests/disas/gc/drc/array-len.wat@@ -20,14 +20,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @001f trapz v2, user15+;; @001f trapz v2, user16;; @001f v10 = load.i64 notrap aligned readonly can_move v0+8;; @001f v5 = load.i64 notrap aligned readonly can_move v10+32;; @001f v4 = uextend.i64 v2;; @001f v6 = iadd v5, v4;; @001f v7 = iconst.i64 24;; @001f v8 = iadd v6, v7 ; v7 = 24-;; @001f v9 = load.i32 notrap aligned readonly v8+;; @001f v9 = load.i32 user2 readonly v8;; @0021 jump block1;;;; block1:diff --git a/tests/disas/gc/drc/array-new-fixed-of-gc-refs.wat b/tests/disas/gc/drc/array-new-fixed-of-gc-refs.watindex 483e71b685..4a823efb3f 100644--- a/tests/disas/gc/drc/array-new-fixed-of-gc-refs.wat+++ b/tests/disas/gc/drc/array-new-fixed-of-gc-refs.wat@@ -44,7 +44,7 @@;; @0025 v22 = iadd v20, v21;; v130 = iconst.i64 24;; @0025 v23 = iadd v22, v130 ; v130 = 24-;; @0025 store notrap aligned v6, v23 ; v6 = 3+;; @0025 store user2 v6, v23 ; v6 = 3;; v93 = load.i32 notrap v137;; v128 = iconst.i32 1;; @0025 v28 = band v93, v128 ; v128 = 1@@ -59,17 +59,17 @@;; @0025 v34 = iadd.i64 v20, v32;; @0025 v35 = iconst.i64 8;; @0025 v36 = iadd v34, v35 ; v35 = 8-;; @0025 v37 = load.i64 notrap aligned v36+;; @0025 v37 = load.i64 user2 v36;; v122 = iconst.i64 1;; @0025 v38 = iadd v37, v122 ; v122 = 1-;; @0025 store notrap aligned v38, v36+;; @0025 store user2 v38, v36;; @0025 jump block3;;;; block3:;; v89 = load.i32 notrap v137;; v151 = iconst.i64 28;; v156 = iadd.i64 v22, v151 ; v151 = 28-;; @0025 store notrap aligned little v89, v156+;; @0025 store user2 little v89, v156;; v88 = load.i32 notrap v136;; v242 = iconst.i32 1;; v243 = band v88, v242 ; v242 = 1@@ -84,17 +84,17 @@;; @0025 v51 = iadd.i64 v20, v49;; v246 = iconst.i64 8;; @0025 v53 = iadd v51, v246 ; v246 = 8-;; @0025 v54 = load.i64 notrap aligned v53+;; @0025 v54 = load.i64 user2 v53;; v247 = iconst.i64 1;; @0025 v55 = iadd v54, v247 ; v247 = 1-;; @0025 store notrap aligned v55, v53+;; @0025 store user2 v55, v53;; @0025 jump block5;;;; block5:;; v84 = load.i32 notrap v136;; v133 = iconst.i64 32;; v163 = iadd.i64 v22, v133 ; v133 = 32-;; @0025 store notrap aligned little v84, v163+;; @0025 store user2 little v84, v163;; v83 = load.i32 notrap v135;; v248 = iconst.i32 1;; v249 = band v83, v248 ; v248 = 1@@ -109,17 +109,17 @@;; @0025 v68 = iadd.i64 v20, v66;; v252 = iconst.i64 8;; @0025 v70 = iadd v68, v252 ; v252 = 8-;; @0025 v71 = load.i64 notrap aligned v70+;; @0025 v71 = load.i64 user2 v70;; v253 = iconst.i64 1;; @0025 v72 = iadd v71, v253 ; v253 = 1-;; @0025 store notrap aligned v72, v70+;; @0025 store user2 v72, v70;; @0025 jump block7;;;; block7:;; v79 = load.i32 notrap v135;; v178 = iconst.i64 36;; v183 = iadd.i64 v22, v178 ; v178 = 36-;; @0025 store notrap aligned little v79, v183+;; @0025 store user2 little v79, v183;; @0029 jump block1;;;; block1:diff --git a/tests/disas/gc/drc/array-new-fixed.wat b/tests/disas/gc/drc/array-new-fixed.watindex f4180313c9..985c630a7f 100644--- a/tests/disas/gc/drc/array-new-fixed.wat+++ b/tests/disas/gc/drc/array-new-fixed.wat@@ -34,16 +34,16 @@;; @0025 v22 = iadd v20, v21;; v37 = iconst.i64 24;; @0025 v23 = iadd v22, v37 ; v37 = 24-;; @0025 store notrap aligned v6, v23 ; v6 = 3+;; @0025 store user2 v6, v23 ; v6 = 3;; v34 = iconst.i64 32;; v52 = iadd v22, v34 ; v34 = 32-;; @0025 store notrap aligned little v2, v52+;; @0025 store user2 little v2, v52;; v55 = iconst.i64 40;; v60 = iadd v22, v55 ; v55 = 40-;; @0025 store notrap aligned little v3, v60+;; @0025 store user2 little v3, v60;; v76 = iconst.i64 48;; v81 = iadd v22, v76 ; v76 = 48-;; @0025 store notrap aligned little v4, v81+;; @0025 store user2 little v4, v81;; @0029 jump block1;;;; block1:diff --git a/tests/disas/gc/drc/array-new.wat b/tests/disas/gc/drc/array-new.watindex 9ae2b3118f..513ec4378a 100644--- a/tests/disas/gc/drc/array-new.wat+++ b/tests/disas/gc/drc/array-new.wat@@ -26,11 +26,11 @@;; v38 = ishl v6, v37 ; v37 = 3;; v35 = iconst.i64 32;; @0022 v8 = ushr v38, v35 ; v35 = 32-;; @0022 trapnz v8, user17+;; @0022 trapnz v8, user18;; @0022 v5 = iconst.i32 32;; v44 = iconst.i32 3;; v45 = ishl v3, v44 ; v44 = 3-;; @0022 v10 = uadd_overflow_trap v5, v45, user17 ; v5 = 32+;; @0022 v10 = uadd_overflow_trap v5, v45, user18 ; v5 = 32;; @0022 v12 = iconst.i32 -1476395008;; @0022 v14 = load.i64 notrap aligned readonly can_move v0+40;; @0022 v15 = load.i32 notrap aligned readonly can_move v14@@ -42,7 +42,7 @@;; @0022 v20 = iadd v18, v19;; v32 = iconst.i64 24;; @0022 v21 = iadd v20, v32 ; v32 = 24-;; @0022 store notrap aligned v3, v21+;; @0022 store user2 v3, v21;; v53 = iadd v20, v35 ; v35 = 32;; @0022 v27 = uextend.i64 v10;; @0022 v28 = iadd v20, v27@@ -54,7 +54,7 @@;; @0022 brif v30, block4, block3;;;; block3:-;; @0022 store.i64 notrap aligned little v2, v29+;; @0022 store.i64 user2 little v2, v29;; v58 = iconst.i64 8;; v59 = iadd.i64 v29, v58 ; v58 = 8;; @0022 jump block2(v59)diff --git a/tests/disas/gc/drc/array-set.wat b/tests/disas/gc/drc/array-set.watindex 4bc559dfce..97fec4edc7 100644--- a/tests/disas/gc/drc/array-set.wat+++ b/tests/disas/gc/drc/array-set.wat@@ -20,27 +20,27 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i64):-;; @0024 trapz v2, user15+;; @0024 trapz v2, user16;; @0024 v32 = load.i64 notrap aligned readonly can_move v0+8;; @0024 v6 = load.i64 notrap aligned readonly can_move v32+32;; @0024 v5 = uextend.i64 v2;; @0024 v7 = iadd v6, v5;; @0024 v8 = iconst.i64 24;; @0024 v9 = iadd v7, v8 ; v8 = 24-;; @0024 v10 = load.i32 notrap aligned readonly v9+;; @0024 v10 = load.i32 user2 readonly v9;; @0024 v11 = icmp ult v3, v10-;; @0024 trapz v11, user16+;; @0024 trapz v11, user17;; @0024 v13 = uextend.i64 v10;; v34 = iconst.i64 3;; v35 = ishl v13, v34 ; v34 = 3;; v31 = iconst.i64 32;; @0024 v15 = ushr v35, v31 ; v31 = 32-;; @0024 trapnz v15, user1+;; @0024 trapnz v15, user2;; v44 = iconst.i32 3;; v45 = ishl v10, v44 ; v44 = 3;; @0024 v17 = iconst.i32 32-;; @0024 v18 = uadd_overflow_trap v45, v17, user1 ; v17 = 32-;; @0024 v22 = uadd_overflow_trap v2, v18, user1+;; @0024 v18 = uadd_overflow_trap v45, v17, user2 ; v17 = 32+;; @0024 v22 = uadd_overflow_trap v2, v18, user2;; @0024 v23 = uextend.i64 v22;; @0024 v25 = iadd v6, v23;; v51 = ishl v3, v44 ; v44 = 3@@ -48,7 +48,7 @@;; @0024 v26 = isub v18, v21;; @0024 v27 = uextend.i64 v26;; @0024 v28 = isub v25, v27-;; @0024 store notrap aligned little v4, v28+;; @0024 store user2 little v4, v28;; @0027 jump block1;;;; block1:diff --git a/tests/disas/gc/drc/br-on-cast-fail.wat b/tests/disas/gc/drc/br-on-cast-fail.watindex f0f893c70e..779728b16b 100644--- a/tests/disas/gc/drc/br-on-cast-fail.wat+++ b/tests/disas/gc/drc/br-on-cast-fail.wat@@ -51,7 +51,7 @@;; @002e v15 = iadd v14, v13;; @002e v16 = iconst.i64 4;; @002e v17 = iadd v15, v16 ; v16 = 4-;; @002e v18 = load.i32 notrap aligned readonly v17+;; @002e v18 = load.i32 user2 readonly v17;; @002e v11 = load.i64 notrap aligned readonly can_move v0+40;; @002e v12 = load.i32 notrap aligned readonly can_move v11;; @002e v19 = icmp eq v18, v12diff --git a/tests/disas/gc/drc/br-on-cast.wat b/tests/disas/gc/drc/br-on-cast.watindex 3257ae627c..8c73f1c2d2 100644--- a/tests/disas/gc/drc/br-on-cast.wat+++ b/tests/disas/gc/drc/br-on-cast.wat@@ -51,7 +51,7 @@;; @002f v15 = iadd v14, v13;; @002f v16 = iconst.i64 4;; @002f v17 = iadd v15, v16 ; v16 = 4-;; @002f v18 = load.i32 notrap aligned readonly v17+;; @002f v18 = load.i32 user2 readonly v17;; @002f v11 = load.i64 notrap aligned readonly can_move v0+40;; @002f v12 = load.i32 notrap aligned readonly can_move v11;; @002f v19 = icmp eq v18, v12diff --git a/tests/disas/gc/drc/call-indirect-and-subtyping.wat b/tests/disas/gc/drc/call-indirect-and-subtyping.watindex e7fccc198d..cb164e1b6c 100644--- a/tests/disas/gc/drc/call-indirect-and-subtyping.wat+++ b/tests/disas/gc/drc/call-indirect-and-subtyping.wat@@ -39,7 +39,7 @@;; @005c v7 = ishl v5, v30 ; v30 = 3;; @005c v8 = iadd v6, v7;; @005c v10 = select_spectre_guard v4, v9, v8 ; v9 = 0-;; @005c v11 = load.i64 user5 aligned table v10+;; @005c v11 = load.i64 user6 aligned table v10;; v29 = iconst.i64 -2;; @005c v12 = band v11, v29 ; v29 = -2;; @005c brif v11, block3(v12), block2@@ -50,7 +50,7 @@;; @005c jump block3(v17);;;; block3(v13: i64):-;; @005c v21 = load.i32 user6 aligned readonly v13+16+;; @005c v21 = load.i32 user7 aligned readonly v13+16;; @005c v19 = load.i64 notrap aligned readonly can_move v0+40;; @005c v20 = load.i32 notrap aligned readonly can_move v19;; @005c v22 = icmp eq v21, v20@@ -62,7 +62,7 @@;; @005c jump block5(v25);;;; block5(v26: i32):-;; @005c trapz v26, user7+;; @005c trapz v26, user8;; @005c v27 = load.i64 notrap aligned readonly v13+8;; @005c v28 = load.i64 notrap aligned readonly v13+24;; @005c call_indirect sig0, v27(v28, v0)diff --git a/tests/disas/gc/drc/externref-globals.wat b/tests/disas/gc/drc/externref-globals.watindex 4f4f0af185..0140179474 100644--- a/tests/disas/gc/drc/externref-globals.wat+++ b/tests/disas/gc/drc/externref-globals.wat@@ -39,27 +39,27 @@;; @0034 v11 = load.i64 notrap aligned readonly can_move v50+32;; @0034 v10 = uextend.i64 v5;; @0034 v12 = iadd v11, v10-;; @0034 v13 = load.i32 notrap aligned v12+;; @0034 v13 = load.i32 user2 v12;; @0034 v14 = iconst.i32 2;; @0034 v15 = band v13, v14 ; v14 = 2;; @0034 brif v15, block4, block3;;;; block3:;; @0034 v17 = load.i64 notrap aligned readonly v0+32-;; @0034 v18 = load.i32 notrap aligned v17+;; @0034 v18 = load.i32 user2 v17;; @0034 v22 = iconst.i64 16;; @0034 v23 = iadd.i64 v12, v22 ; v22 = 16-;; @0034 store notrap aligned v18, v23+;; @0034 store user2 v18, v23;; v55 = iconst.i32 2;; v56 = bor.i32 v13, v55 ; v55 = 2-;; @0034 store notrap aligned v56, v12+;; @0034 store user2 v56, v12;; @0034 v32 = iconst.i64 8;; @0034 v33 = iadd.i64 v12, v32 ; v32 = 8-;; @0034 v34 = load.i64 notrap aligned v33+;; @0034 v34 = load.i64 user2 v33;; v43 = iconst.i64 1;; @0034 v35 = iadd v34, v43 ; v43 = 1-;; @0034 store notrap aligned v35, v33-;; @0034 store.i32 notrap aligned v5, v17+;; @0034 store user2 v35, v33+;; @0034 store.i32 user2 v5, v17;; @0034 jump block4;;;; block4:@@ -100,10 +100,10 @@;; @003b v12 = iadd v11, v10;; @003b v13 = iconst.i64 8;; @003b v14 = iadd v12, v13 ; v13 = 8-;; @003b v15 = load.i64 notrap aligned v14+;; @003b v15 = load.i64 user2 v14;; v50 = iconst.i64 1;; @003b v16 = iadd v15, v50 ; v50 = 1-;; @003b store notrap aligned v16, v14+;; @003b store user2 v16, v14;; @003b jump block3;;;; block3:@@ -124,7 +124,7 @@;; @003b v28 = iadd v74, v26;; v75 = iconst.i64 8;; @003b v30 = iadd v28, v75 ; v75 = 8-;; @003b v31 = load.i64 notrap aligned v30+;; @003b v31 = load.i64 user2 v30;; v76 = iconst.i64 1;; v66 = icmp eq v31, v76 ; v76 = 1;; @003b brif v66, block5, block6@@ -137,7 +137,7 @@;; v43 = iconst.i64 -1;; @003b v32 = iadd.i64 v31, v43 ; v43 = -1;; v77 = iadd.i64 v28, v75 ; v75 = 8-;; @003b store notrap aligned v32, v77+;; @003b store user2 v32, v77;; @003b jump block7;;;; block7:diff --git a/tests/disas/gc/drc/funcref-in-gc-heap-get.wat b/tests/disas/gc/drc/funcref-in-gc-heap-get.watindex 82674939ba..710db4657e 100644--- a/tests/disas/gc/drc/funcref-in-gc-heap-get.wat+++ b/tests/disas/gc/drc/funcref-in-gc-heap-get.wat@@ -22,14 +22,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0020 trapz v2, user15+;; @0020 trapz v2, user16;; @0020 v13 = load.i64 notrap aligned readonly can_move v0+8;; @0020 v5 = load.i64 notrap aligned readonly can_move v13+32;; @0020 v4 = uextend.i64 v2;; @0020 v6 = iadd v5, v4;; @0020 v7 = iconst.i64 24;; @0020 v8 = iadd v6, v7 ; v7 = 24-;; @0020 v11 = load.i32 notrap aligned little v8+;; @0020 v11 = load.i32 user2 little v8;; @0020 v9 = iconst.i32 -1;; @0020 v12 = call fn0(v0, v11, v9) ; v9 = -1;; @0024 jump block1diff --git a/tests/disas/gc/drc/funcref-in-gc-heap-new.wat b/tests/disas/gc/drc/funcref-in-gc-heap-new.watindex 6c17ce9774..5f9c18aebd 100644--- a/tests/disas/gc/drc/funcref-in-gc-heap-new.wat+++ b/tests/disas/gc/drc/funcref-in-gc-heap-new.wat@@ -40,7 +40,7 @@;; @0020 v14 = iadd v12, v13;; v22 = iconst.i64 24;; @0020 v15 = iadd v14, v22 ; v22 = 24-;; @0020 store notrap aligned little v18, v15+;; @0020 store user2 little v18, v15;; v19 = load.i32 notrap v26;; @0023 jump block1;;diff --git a/tests/disas/gc/drc/funcref-in-gc-heap-set.wat b/tests/disas/gc/drc/funcref-in-gc-heap-set.watindex c9ffd92e67..d5b4fbae5f 100644--- a/tests/disas/gc/drc/funcref-in-gc-heap-set.wat+++ b/tests/disas/gc/drc/funcref-in-gc-heap-set.wat@@ -22,7 +22,7 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i64):-;; @0022 trapz v2, user15+;; @0022 trapz v2, user16;; @0022 v10 = call fn0(v0, v3);; @0022 v11 = ireduce.i32 v10;; @0022 v12 = load.i64 notrap aligned readonly can_move v0+8@@ -31,7 +31,7 @@;; @0022 v6 = iadd v5, v4;; @0022 v7 = iconst.i64 24;; @0022 v8 = iadd v6, v7 ; v7 = 24-;; @0022 store notrap aligned little v11, v8+;; @0022 store user2 little v11, v8;; @0026 jump block1;;;; block1:diff --git a/tests/disas/gc/drc/multiple-array-get.wat b/tests/disas/gc/drc/multiple-array-get.watindex 89b3e5e771..a40e835d83 100644--- a/tests/disas/gc/drc/multiple-array-get.wat+++ b/tests/disas/gc/drc/multiple-array-get.wat@@ -21,27 +21,27 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32):-;; @0024 trapz v2, user15+;; @0024 trapz v2, user16;; @0024 v65 = load.i64 notrap aligned readonly can_move v0+8;; @0024 v8 = load.i64 notrap aligned readonly can_move v65+32;; @0024 v7 = uextend.i64 v2;; @0024 v9 = iadd v8, v7;; @0024 v10 = iconst.i64 24;; @0024 v11 = iadd v9, v10 ; v10 = 24-;; @0024 v12 = load.i32 notrap aligned readonly v11+;; @0024 v12 = load.i32 user2 readonly v11;; @0024 v13 = icmp ult v3, v12-;; @0024 trapz v13, user16+;; @0024 trapz v13, user17;; @0024 v15 = uextend.i64 v12;; v67 = iconst.i64 3;; v68 = ishl v15, v67 ; v67 = 3;; v64 = iconst.i64 32;; @0024 v17 = ushr v68, v64 ; v64 = 32-;; @0024 trapnz v17, user1+;; @0024 trapnz v17, user2;; v77 = iconst.i32 3;; v78 = ishl v12, v77 ; v77 = 3;; @0024 v19 = iconst.i32 32-;; @0024 v20 = uadd_overflow_trap v78, v19, user1 ; v19 = 32-;; @0024 v24 = uadd_overflow_trap v2, v20, user1+;; @0024 v20 = uadd_overflow_trap v78, v19, user2 ; v19 = 32+;; @0024 v24 = uadd_overflow_trap v2, v20, user2;; @0024 v25 = uextend.i64 v24;; @0024 v27 = iadd v8, v25;; v84 = ishl v3, v77 ; v77 = 3@@ -49,15 +49,15 @@;; @0024 v28 = isub v20, v23;; @0024 v29 = uextend.i64 v28;; @0024 v30 = isub v27, v29-;; @0024 v31 = load.i64 notrap aligned little v30+;; @0024 v31 = load.i64 user2 little v30;; @002b v38 = icmp ult v4, v12-;; @002b trapz v38, user16+;; @002b trapz v38, user17;; v86 = ishl v4, v77 ; v77 = 3;; @002b v48 = iadd v86, v19 ; v19 = 32;; @002b v53 = isub v20, v48;; @002b v54 = uextend.i64 v53;; @002b v55 = isub v27, v54-;; @002b v56 = load.i64 notrap aligned little v55+;; @002b v56 = load.i64 user2 little v55;; @002e jump block1;;;; block1:diff --git a/tests/disas/gc/drc/multiple-struct-get.wat b/tests/disas/gc/drc/multiple-struct-get.watindex eb6ec1f056..52d07e6026 100644--- a/tests/disas/gc/drc/multiple-struct-get.wat+++ b/tests/disas/gc/drc/multiple-struct-get.wat@@ -22,17 +22,17 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0023 trapz v2, user15+;; @0023 trapz v2, user16;; @0023 v20 = load.i64 notrap aligned readonly can_move v0+8;; @0023 v6 = load.i64 notrap aligned readonly can_move v20+32;; @0023 v5 = uextend.i64 v2;; @0023 v7 = iadd v6, v5;; @0023 v8 = iconst.i64 24;; @0023 v9 = iadd v7, v8 ; v8 = 24-;; @0023 v10 = load.f32 notrap aligned little v9+;; @0023 v10 = load.f32 user2 little v9;; @0029 v14 = iconst.i64 28;; @0029 v15 = iadd v7, v14 ; v14 = 28-;; @0029 v16 = load.i8 notrap aligned little v15+;; @0029 v16 = load.i8 user2 little v15;; @002d jump block1;;;; block1:diff --git a/tests/disas/gc/drc/ref-cast.wat b/tests/disas/gc/drc/ref-cast.watindex 7958e65935..acb1d1cd6c 100644--- a/tests/disas/gc/drc/ref-cast.wat+++ b/tests/disas/gc/drc/ref-cast.wat@@ -42,7 +42,7 @@;; @001e v15 = iadd v14, v13;; @001e v16 = iconst.i64 4;; @001e v17 = iadd v15, v16 ; v16 = 4-;; @001e v18 = load.i32 notrap aligned readonly v17+;; @001e v18 = load.i32 user2 readonly v17;; @001e v11 = load.i64 notrap aligned readonly can_move v0+40;; @001e v12 = load.i32 notrap aligned readonly can_move v11;; @001e v19 = icmp eq v18, v12@@ -57,7 +57,7 @@;; @001e jump block4(v23);;;; block4(v24: i32):-;; @001e trapz v24, user18+;; @001e trapz v24, user19;; v25 = load.i32 notrap v36;; @0021 jump block1;;diff --git a/tests/disas/gc/drc/ref-test-array.wat b/tests/disas/gc/drc/ref-test-array.watindex 9895604b86..53c2d0608b 100644--- a/tests/disas/gc/drc/ref-test-array.wat+++ b/tests/disas/gc/drc/ref-test-array.wat@@ -34,7 +34,7 @@;; @001b v11 = load.i64 notrap aligned readonly can_move v21+32;; @001b v10 = uextend.i64 v2;; @001b v12 = iadd v11, v10-;; @001b v15 = load.i32 notrap aligned readonly v12+;; @001b v15 = load.i32 user2 readonly v12;; @001b v16 = iconst.i32 -1476395008;; @001b v17 = band v15, v16 ; v16 = -1476395008;; @001b v18 = icmp eq v17, v16 ; v16 = -1476395008diff --git a/tests/disas/gc/drc/ref-test-concrete-func-type.wat b/tests/disas/gc/drc/ref-test-concrete-func-type.watindex d03258a7e4..be90e6da8c 100644--- a/tests/disas/gc/drc/ref-test-concrete-func-type.wat+++ b/tests/disas/gc/drc/ref-test-concrete-func-type.wat@@ -28,7 +28,7 @@;; @0020 jump block3;;;; block3:-;; @0020 v10 = load.i32 notrap aligned readonly v2+16+;; @0020 v10 = load.i32 user2 readonly v2+16;; @0020 v8 = load.i64 notrap aligned readonly can_move v0+40;; @0020 v9 = load.i32 notrap aligned readonly can_move v8;; @0020 v11 = icmp eq v10, v9diff --git a/tests/disas/gc/drc/ref-test-concrete-type.wat b/tests/disas/gc/drc/ref-test-concrete-type.watindex 8498db7253..8d1d7b60c4 100644--- a/tests/disas/gc/drc/ref-test-concrete-type.wat+++ b/tests/disas/gc/drc/ref-test-concrete-type.wat@@ -39,7 +39,7 @@;; @001d v15 = iadd v14, v13;; @001d v16 = iconst.i64 4;; @001d v17 = iadd v15, v16 ; v16 = 4-;; @001d v18 = load.i32 notrap aligned readonly v17+;; @001d v18 = load.i32 user2 readonly v17;; @001d v11 = load.i64 notrap aligned readonly can_move v0+40;; @001d v12 = load.i32 notrap aligned readonly can_move v11;; @001d v19 = icmp eq v18, v12diff --git a/tests/disas/gc/drc/ref-test-eq.wat b/tests/disas/gc/drc/ref-test-eq.watindex 0161a22282..7ca1f0ec2d 100644--- a/tests/disas/gc/drc/ref-test-eq.wat+++ b/tests/disas/gc/drc/ref-test-eq.wat@@ -33,7 +33,7 @@;; @001b v11 = load.i64 notrap aligned readonly can_move v21+32;; @001b v10 = uextend.i64 v2;; @001b v12 = iadd v11, v10-;; @001b v15 = load.i32 notrap aligned readonly v12+;; @001b v15 = load.i32 user2 readonly v12;; @001b v16 = iconst.i32 -1610612736;; @001b v17 = band v15, v16 ; v16 = -1610612736;; @001b v18 = icmp eq v17, v16 ; v16 = -1610612736diff --git a/tests/disas/gc/drc/ref-test-struct.wat b/tests/disas/gc/drc/ref-test-struct.watindex f5dbc7da13..70f09cbfdb 100644--- a/tests/disas/gc/drc/ref-test-struct.wat+++ b/tests/disas/gc/drc/ref-test-struct.wat@@ -34,7 +34,7 @@;; @001b v11 = load.i64 notrap aligned readonly can_move v21+32;; @001b v10 = uextend.i64 v2;; @001b v12 = iadd v11, v10-;; @001b v15 = load.i32 notrap aligned readonly v12+;; @001b v15 = load.i32 user2 readonly v12;; @001b v16 = iconst.i32 -1342177280;; @001b v17 = band v15, v16 ; v16 = -1342177280;; @001b v18 = icmp eq v17, v16 ; v16 = -1342177280diff --git a/tests/disas/gc/drc/struct-get.wat b/tests/disas/gc/drc/struct-get.watindex 3316536921..eea24a9c12 100644--- a/tests/disas/gc/drc/struct-get.wat+++ b/tests/disas/gc/drc/struct-get.wat@@ -34,14 +34,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0033 trapz v2, user15+;; @0033 trapz v2, user16;; @0033 v10 = load.i64 notrap aligned readonly can_move v0+8;; @0033 v5 = load.i64 notrap aligned readonly can_move v10+32;; @0033 v4 = uextend.i64 v2;; @0033 v6 = iadd v5, v4;; @0033 v7 = iconst.i64 24;; @0033 v8 = iadd v6, v7 ; v7 = 24-;; @0033 v9 = load.f32 notrap aligned little v8+;; @0033 v9 = load.f32 user2 little v8;; @0037 jump block1;;;; block1:@@ -59,14 +59,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @003c trapz v2, user15+;; @003c trapz v2, user16;; @003c v11 = load.i64 notrap aligned readonly can_move v0+8;; @003c v5 = load.i64 notrap aligned readonly can_move v11+32;; @003c v4 = uextend.i64 v2;; @003c v6 = iadd v5, v4;; @003c v7 = iconst.i64 28;; @003c v8 = iadd v6, v7 ; v7 = 28-;; @003c v9 = load.i8 notrap aligned little v8+;; @003c v9 = load.i8 user2 little v8;; @0040 jump block1;;;; block1:@@ -85,14 +85,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0045 trapz v2, user15+;; @0045 trapz v2, user16;; @0045 v11 = load.i64 notrap aligned readonly can_move v0+8;; @0045 v5 = load.i64 notrap aligned readonly can_move v11+32;; @0045 v4 = uextend.i64 v2;; @0045 v6 = iadd v5, v4;; @0045 v7 = iconst.i64 28;; @0045 v8 = iadd v6, v7 ; v7 = 28-;; @0045 v9 = load.i8 notrap aligned little v8+;; @0045 v9 = load.i8 user2 little v8;; @0049 jump block1;;;; block1:@@ -111,14 +111,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @004e trapz v2, user15+;; @004e trapz v2, user16;; @004e v58 = load.i64 notrap aligned readonly can_move v0+8;; @004e v5 = load.i64 notrap aligned readonly can_move v58+32;; @004e v4 = uextend.i64 v2;; @004e v6 = iadd v5, v4;; @004e v7 = iconst.i64 32;; @004e v8 = iadd v6, v7 ; v7 = 32-;; @004e v9 = load.i32 notrap aligned little v8+;; @004e v9 = load.i32 user2 little v8;; v57 = iconst.i32 1;; @004e v10 = band v9, v57 ; v57 = 1;; v56 = iconst.i32 0@@ -130,27 +130,27 @@;; block2:;; @004e v14 = uextend.i64 v9;; @004e v16 = iadd.i64 v5, v14-;; @004e v17 = load.i32 notrap aligned v16+;; @004e v17 = load.i32 user2 v16;; @004e v18 = iconst.i32 2;; @004e v19 = band v17, v18 ; v18 = 2;; @004e brif v19, block4, block3;;;; block3:;; @004e v21 = load.i64 notrap aligned readonly v0+32-;; @004e v22 = load.i32 notrap aligned v21+;; @004e v22 = load.i32 user2 v21;; @004e v26 = iconst.i64 16;; @004e v27 = iadd.i64 v16, v26 ; v26 = 16-;; @004e store notrap aligned v22, v27+;; @004e store user2 v22, v27;; v60 = iconst.i32 2;; v61 = bor.i32 v17, v60 ; v60 = 2-;; @004e store notrap aligned v61, v16+;; @004e store user2 v61, v16;; @004e v36 = iconst.i64 8;; @004e v37 = iadd.i64 v16, v36 ; v36 = 8-;; @004e v38 = load.i64 notrap aligned v37+;; @004e v38 = load.i64 user2 v37;; v47 = iconst.i64 1;; @004e v39 = iadd v38, v47 ; v47 = 1-;; @004e store notrap aligned v39, v37-;; @004e store.i32 notrap aligned v9, v21+;; @004e store user2 v39, v37+;; @004e store.i32 user2 v9, v21;; @004e jump block4;;;; block4:diff --git a/tests/disas/gc/drc/struct-new-default.wat b/tests/disas/gc/drc/struct-new-default.watindex 0dbdd65d4c..f0886e21d1 100644--- a/tests/disas/gc/drc/struct-new-default.wat+++ b/tests/disas/gc/drc/struct-new-default.wat@@ -37,18 +37,18 @@;; @0021 v16 = iadd v14, v15;; v45 = iconst.i64 24;; @0021 v17 = iadd v16, v45 ; v45 = 24-;; @0021 store notrap aligned little v3, v17 ; v3 = 0.0+;; @0021 store user2 little v3, v17 ; v3 = 0.0;; @0021 v4 = iconst.i32 0;; v44 = iconst.i64 28;; @0021 v18 = iadd v16, v44 ; v44 = 28-;; @0021 istore8 notrap aligned little v4, v18 ; v4 = 0+;; @0021 istore8 user2 little v4, v18 ; v4 = 0;; jump block3;;;; block3:;; v64 = iconst.i32 0;; v43 = iconst.i64 32;; @0021 v19 = iadd.i64 v16, v43 ; v43 = 32-;; @0021 store notrap aligned little v64, v19 ; v64 = 0+;; @0021 store user2 little v64, v19 ; v64 = 0;; @0024 jump block1;;;; block1:diff --git a/tests/disas/gc/drc/struct-new.wat b/tests/disas/gc/drc/struct-new.watindex f1cbdf51d5..af99ad5a57 100644--- a/tests/disas/gc/drc/struct-new.wat+++ b/tests/disas/gc/drc/struct-new.wat@@ -39,10 +39,10 @@;; @002a v16 = iadd v14, v15;; v55 = iconst.i64 24;; @002a v17 = iadd v16, v55 ; v55 = 24-;; @002a store notrap aligned little v2, v17+;; @002a store user2 little v2, v17;; v54 = iconst.i64 28;; @002a v18 = iadd v16, v54 ; v54 = 28-;; @002a istore8 notrap aligned little v3, v18+;; @002a istore8 user2 little v3, v18;; v40 = load.i32 notrap v58;; v51 = iconst.i32 1;; @002a v20 = band v40, v51 ; v51 = 1@@ -57,17 +57,17 @@;; @002a v26 = iadd.i64 v14, v24;; @002a v27 = iconst.i64 8;; @002a v28 = iadd v26, v27 ; v27 = 8-;; @002a v29 = load.i64 notrap aligned v28+;; @002a v29 = load.i64 user2 v28;; v45 = iconst.i64 1;; @002a v30 = iadd v29, v45 ; v45 = 1-;; @002a store notrap aligned v30, v28+;; @002a store user2 v30, v28;; @002a jump block3;;;; block3:;; v36 = load.i32 notrap v58;; v53 = iconst.i64 32;; @002a v19 = iadd.i64 v16, v53 ; v53 = 32-;; @002a store notrap aligned little v36, v19+;; @002a store user2 little v36, v19;; @002d jump block1;;;; block1:diff --git a/tests/disas/gc/drc/struct-set.wat b/tests/disas/gc/drc/struct-set.watindex 7e526712c0..4a14e9b353 100644--- a/tests/disas/gc/drc/struct-set.wat+++ b/tests/disas/gc/drc/struct-set.wat@@ -30,14 +30,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: f32):-;; @0034 trapz v2, user15+;; @0034 trapz v2, user16;; @0034 v9 = load.i64 notrap aligned readonly can_move v0+8;; @0034 v5 = load.i64 notrap aligned readonly can_move v9+32;; @0034 v4 = uextend.i64 v2;; @0034 v6 = iadd v5, v4;; @0034 v7 = iconst.i64 24;; @0034 v8 = iadd v6, v7 ; v7 = 24-;; @0034 store notrap aligned little v3, v8+;; @0034 store user2 little v3, v8;; @0038 jump block1;;;; block1:@@ -55,14 +55,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @003f trapz v2, user15+;; @003f trapz v2, user16;; @003f v9 = load.i64 notrap aligned readonly can_move v0+8;; @003f v5 = load.i64 notrap aligned readonly can_move v9+32;; @003f v4 = uextend.i64 v2;; @003f v6 = iadd v5, v4;; @003f v7 = iconst.i64 28;; @003f v8 = iadd v6, v7 ; v7 = 28-;; @003f istore8 notrap aligned little v3, v8+;; @003f istore8 user2 little v3, v8;; @0043 jump block1;;;; block1:@@ -82,14 +82,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @004a trapz v2, user15+;; @004a trapz v2, user16;; @004a v59 = load.i64 notrap aligned readonly can_move v0+8;; @004a v5 = load.i64 notrap aligned readonly can_move v59+32;; @004a v4 = uextend.i64 v2;; @004a v6 = iadd v5, v4;; @004a v7 = iconst.i64 32;; @004a v8 = iadd v6, v7 ; v7 = 32-;; @004a v9 = load.i32 notrap aligned little v8+;; @004a v9 = load.i32 user2 little v8;; v58 = iconst.i32 1;; @004a v10 = band v3, v58 ; v58 = 1;; v57 = iconst.i32 0@@ -103,15 +103,15 @@;; @004a v16 = iadd.i64 v5, v14;; @004a v17 = iconst.i64 8;; @004a v18 = iadd v16, v17 ; v17 = 8-;; @004a v19 = load.i64 notrap aligned v18+;; @004a v19 = load.i64 user2 v18;; v54 = iconst.i64 1;; @004a v20 = iadd v19, v54 ; v54 = 1-;; @004a store notrap aligned v20, v18+;; @004a store user2 v20, v18;; @004a jump block3;;;; block3:;; v73 = iadd.i64 v6, v7 ; v7 = 32-;; @004a store.i32 notrap aligned little v3, v73+;; @004a store.i32 user2 little v3, v73;; v74 = iconst.i32 1;; v75 = band.i32 v9, v74 ; v74 = 1;; v76 = iconst.i32 0@@ -125,7 +125,7 @@;; @004a v32 = iadd.i64 v5, v30;; v78 = iconst.i64 8;; @004a v34 = iadd v32, v78 ; v78 = 8-;; @004a v35 = load.i64 notrap aligned v34+;; @004a v35 = load.i64 user2 v34;; v79 = iconst.i64 1;; v71 = icmp eq v35, v79 ; v79 = 1;; @004a brif v71, block5, block6@@ -138,7 +138,7 @@;; v47 = iconst.i64 -1;; @004a v36 = iadd.i64 v35, v47 ; v47 = -1;; v80 = iadd.i64 v32, v78 ; v78 = 8-;; @004a store notrap aligned v36, v80+;; @004a store user2 v36, v80;; @004a jump block7;;;; block7:diff --git a/tests/disas/gc/issue-11753.wat b/tests/disas/gc/issue-11753.watindex 0d474a8938..34ec56fcf2 100644--- a/tests/disas/gc/issue-11753.wat+++ b/tests/disas/gc/issue-11753.wat@@ -50,6 +50,7 @@;; movq 0x20(%rcx), %rcx;; movl %eax, %eax;; movl $0x2a, 0x18(%rcx, %rax)+;; ╰─╼ trap: GcHeapCorrupt;; movq %rcx, 0x10(%rsp);; movq 0x38(%rbx), %rax;; movq 0x48(%rbx), %rdi@@ -65,6 +66,7 @@;; 95: movl %eax, %eax;; movq 0x10(%rsp), %rcx;; movl 0x18(%rcx, %rax), %eax+;; ╰─╼ trap: GcHeapCorrupt;; movq 0x20(%rsp), %rbx;; movq 0x28(%rsp), %r12;; movq 0x30(%rsp), %r13@@ -75,6 +77,6 @@;; popq %rbp;; retq;; c2: ud2-;; ╰─╼ trap: StackOverflow+;; ╰─╼ trap: Normal(StackOverflow);; c4: ud2-;; ╰─╼ trap: NullReference+;; ╰─╼ trap: Normal(NullReference)diff --git a/tests/disas/gc/null/array-fill.wat b/tests/disas/gc/null/array-fill.watindex 0ee9ed2501..5977bb781d 100644--- a/tests/disas/gc/null/array-fill.wat+++ b/tests/disas/gc/null/array-fill.wat@@ -20,28 +20,28 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i64, v5: i32):-;; @0027 trapz v2, user15+;; @0027 trapz v2, user16;; @0027 v41 = load.i64 notrap aligned readonly can_move v0+8;; @0027 v7 = load.i64 notrap aligned readonly can_move v41+32;; @0027 v6 = uextend.i64 v2;; @0027 v8 = iadd v7, v6;; @0027 v9 = iconst.i64 8;; @0027 v10 = iadd v8, v9 ; v9 = 8-;; @0027 v11 = load.i32 notrap aligned readonly v10-;; @0027 v12 = uadd_overflow_trap v3, v5, user16+;; @0027 v11 = load.i32 user2 readonly v10+;; @0027 v12 = uadd_overflow_trap v3, v5, user17;; @0027 v13 = icmp ugt v12, v11-;; @0027 trapnz v13, user16+;; @0027 trapnz v13, user17;; @0027 v15 = uextend.i64 v11;; v43 = iconst.i64 3;; v44 = ishl v15, v43 ; v43 = 3;; v40 = iconst.i64 32;; @0027 v17 = ushr v44, v40 ; v40 = 32-;; @0027 trapnz v17, user1+;; @0027 trapnz v17, user2;; v53 = iconst.i32 3;; v54 = ishl v11, v53 ; v53 = 3;; @0027 v19 = iconst.i32 16-;; @0027 v20 = uadd_overflow_trap v54, v19, user1 ; v19 = 16-;; @0027 v24 = uadd_overflow_trap v2, v20, user1+;; @0027 v20 = uadd_overflow_trap v54, v19, user2 ; v19 = 16+;; @0027 v24 = uadd_overflow_trap v2, v20, user2;; @0027 v25 = uextend.i64 v24;; @0027 v27 = iadd v7, v25;; v60 = ishl v3, v53 ; v53 = 3@@ -59,7 +59,7 @@;; @0027 brif v36, block4, block3;;;; block3:-;; @0027 store.i64 notrap aligned little v4, v35+;; @0027 store.i64 user2 little v4, v35;; v66 = iconst.i64 8;; v67 = iadd.i64 v35, v66 ; v66 = 8;; @0027 jump block2(v67)diff --git a/tests/disas/gc/null/array-get-s.wat b/tests/disas/gc/null/array-get-s.watindex 4896b0fd27..a42c0b7435 100644--- a/tests/disas/gc/null/array-get-s.wat+++ b/tests/disas/gc/null/array-get-s.wat@@ -20,30 +20,30 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @0022 trapz v2, user15+;; @0022 trapz v2, user16;; @0022 v34 = load.i64 notrap aligned readonly can_move v0+8;; @0022 v6 = load.i64 notrap aligned readonly can_move v34+32;; @0022 v5 = uextend.i64 v2;; @0022 v7 = iadd v6, v5;; @0022 v8 = iconst.i64 8;; @0022 v9 = iadd v7, v8 ; v8 = 8-;; @0022 v10 = load.i32 notrap aligned readonly v9+;; @0022 v10 = load.i32 user2 readonly v9;; @0022 v11 = icmp ult v3, v10-;; @0022 trapz v11, user16+;; @0022 trapz v11, user17;; @0022 v13 = uextend.i64 v10;; v33 = iconst.i64 32;; @0022 v15 = ushr v13, v33 ; v33 = 32-;; @0022 trapnz v15, user1+;; @0022 trapnz v15, user2;; @0022 v17 = iconst.i32 12-;; @0022 v18 = uadd_overflow_trap v10, v17, user1 ; v17 = 12-;; @0022 v22 = uadd_overflow_trap v2, v18, user1+;; @0022 v18 = uadd_overflow_trap v10, v17, user2 ; v17 = 12+;; @0022 v22 = uadd_overflow_trap v2, v18, user2;; @0022 v23 = uextend.i64 v22;; @0022 v25 = iadd v6, v23;; @0022 v21 = iadd v3, v17 ; v17 = 12;; @0022 v26 = isub v18, v21;; @0022 v27 = uextend.i64 v26;; @0022 v28 = isub v25, v27-;; @0022 v29 = load.i8 notrap aligned little v28+;; @0022 v29 = load.i8 user2 little v28;; @0025 jump block1;;;; block1:diff --git a/tests/disas/gc/null/array-get-u.wat b/tests/disas/gc/null/array-get-u.watindex b1267fe290..4638bfd02b 100644--- a/tests/disas/gc/null/array-get-u.wat+++ b/tests/disas/gc/null/array-get-u.wat@@ -20,30 +20,30 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @0022 trapz v2, user15+;; @0022 trapz v2, user16;; @0022 v34 = load.i64 notrap aligned readonly can_move v0+8;; @0022 v6 = load.i64 notrap aligned readonly can_move v34+32;; @0022 v5 = uextend.i64 v2;; @0022 v7 = iadd v6, v5;; @0022 v8 = iconst.i64 8;; @0022 v9 = iadd v7, v8 ; v8 = 8-;; @0022 v10 = load.i32 notrap aligned readonly v9+;; @0022 v10 = load.i32 user2 readonly v9;; @0022 v11 = icmp ult v3, v10-;; @0022 trapz v11, user16+;; @0022 trapz v11, user17;; @0022 v13 = uextend.i64 v10;; v33 = iconst.i64 32;; @0022 v15 = ushr v13, v33 ; v33 = 32-;; @0022 trapnz v15, user1+;; @0022 trapnz v15, user2;; @0022 v17 = iconst.i32 12-;; @0022 v18 = uadd_overflow_trap v10, v17, user1 ; v17 = 12-;; @0022 v22 = uadd_overflow_trap v2, v18, user1+;; @0022 v18 = uadd_overflow_trap v10, v17, user2 ; v17 = 12+;; @0022 v22 = uadd_overflow_trap v2, v18, user2;; @0022 v23 = uextend.i64 v22;; @0022 v25 = iadd v6, v23;; @0022 v21 = iadd v3, v17 ; v17 = 12;; @0022 v26 = isub v18, v21;; @0022 v27 = uextend.i64 v26;; @0022 v28 = isub v25, v27-;; @0022 v29 = load.i8 notrap aligned little v28+;; @0022 v29 = load.i8 user2 little v28;; @0025 jump block1;;;; block1:diff --git a/tests/disas/gc/null/array-get.wat b/tests/disas/gc/null/array-get.watindex 1536cf3cf7..7b6d043eb6 100644--- a/tests/disas/gc/null/array-get.wat+++ b/tests/disas/gc/null/array-get.wat@@ -20,27 +20,27 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @0022 trapz v2, user15+;; @0022 trapz v2, user16;; @0022 v33 = load.i64 notrap aligned readonly can_move v0+8;; @0022 v6 = load.i64 notrap aligned readonly can_move v33+32;; @0022 v5 = uextend.i64 v2;; @0022 v7 = iadd v6, v5;; @0022 v8 = iconst.i64 8;; @0022 v9 = iadd v7, v8 ; v8 = 8-;; @0022 v10 = load.i32 notrap aligned readonly v9+;; @0022 v10 = load.i32 user2 readonly v9;; @0022 v11 = icmp ult v3, v10-;; @0022 trapz v11, user16+;; @0022 trapz v11, user17;; @0022 v13 = uextend.i64 v10;; v35 = iconst.i64 3;; v36 = ishl v13, v35 ; v35 = 3;; v32 = iconst.i64 32;; @0022 v15 = ushr v36, v32 ; v32 = 32-;; @0022 trapnz v15, user1+;; @0022 trapnz v15, user2;; v45 = iconst.i32 3;; v46 = ishl v10, v45 ; v45 = 3;; @0022 v17 = iconst.i32 16-;; @0022 v18 = uadd_overflow_trap v46, v17, user1 ; v17 = 16-;; @0022 v22 = uadd_overflow_trap v2, v18, user1+;; @0022 v18 = uadd_overflow_trap v46, v17, user2 ; v17 = 16+;; @0022 v22 = uadd_overflow_trap v2, v18, user2;; @0022 v23 = uextend.i64 v22;; @0022 v25 = iadd v6, v23;; v52 = ishl v3, v45 ; v45 = 3@@ -48,7 +48,7 @@;; @0022 v26 = isub v18, v21;; @0022 v27 = uextend.i64 v26;; @0022 v28 = isub v25, v27-;; @0022 v29 = load.i64 notrap aligned little v28+;; @0022 v29 = load.i64 user2 little v28;; @0025 jump block1;;;; block1:diff --git a/tests/disas/gc/null/array-len.wat b/tests/disas/gc/null/array-len.watindex 8bda2bf10f..a7e3316611 100644--- a/tests/disas/gc/null/array-len.wat+++ b/tests/disas/gc/null/array-len.wat@@ -20,14 +20,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @001f trapz v2, user15+;; @001f trapz v2, user16;; @001f v10 = load.i64 notrap aligned readonly can_move v0+8;; @001f v5 = load.i64 notrap aligned readonly can_move v10+32;; @001f v4 = uextend.i64 v2;; @001f v6 = iadd v5, v4;; @001f v7 = iconst.i64 8;; @001f v8 = iadd v6, v7 ; v7 = 8-;; @001f v9 = load.i32 notrap aligned readonly v8+;; @001f v9 = load.i32 user2 readonly v8;; @0021 jump block1;;;; block1:diff --git a/tests/disas/gc/null/array-new-fixed-of-gc-refs.wat b/tests/disas/gc/null/array-new-fixed-of-gc-refs.watindex e03154c83d..c5f3eaaca8 100644--- a/tests/disas/gc/null/array-new-fixed-of-gc-refs.wat+++ b/tests/disas/gc/null/array-new-fixed-of-gc-refs.wat@@ -32,13 +32,13 @@;; v60 = stack_addr.i64 ss0;; store notrap v4, v60;; @0025 v17 = load.i64 notrap aligned readonly v0+32-;; @0025 v18 = load.i32 notrap aligned v17+;; @0025 v18 = load.i32 user2 v17;; v80 = iconst.i32 7-;; @0025 v21 = uadd_overflow_trap v18, v80, user17 ; v80 = 7+;; @0025 v21 = uadd_overflow_trap v18, v80, user18 ; v80 = 7;; v86 = iconst.i32 -8;; @0025 v23 = band v21, v86 ; v86 = -8;; v73 = iconst.i32 24-;; @0025 v24 = uadd_overflow_trap v23, v73, user17 ; v73 = 24+;; @0025 v24 = uadd_overflow_trap v23, v73, user18 ; v73 = 24;; @0025 v56 = load.i64 notrap aligned readonly can_move v0+8;; @0025 v26 = load.i64 notrap aligned v56+40;; @0025 v25 = uextend.i64 v24@@ -51,27 +51,27 @@;; v162 = band.i32 v21, v86 ; v86 = -8;; v163 = uextend.i64 v162;; @0025 v33 = iadd v31, v163-;; @0025 store notrap aligned v87, v33 ; v87 = -1476394984+;; @0025 store user2 v87, v33 ; v87 = -1476394984;; @0025 v37 = load.i64 notrap aligned readonly can_move v0+40;; @0025 v38 = load.i32 notrap aligned readonly can_move v37-;; @0025 store notrap aligned v38, v33+4-;; @0025 store.i32 notrap aligned v24, v17+;; @0025 store user2 v38, v33+4+;; @0025 store.i32 user2 v24, v17;; @0025 v6 = iconst.i32 3;; v53 = iconst.i64 8;; @0025 v39 = iadd v33, v53 ; v53 = 8-;; @0025 store notrap aligned v6, v39 ; v6 = 3+;; @0025 store user2 v6, v39 ; v6 = 3;; v49 = load.i32 notrap v62;; v64 = iconst.i64 12;; v98 = iadd v33, v64 ; v64 = 12-;; @0025 store notrap aligned little v49, v98+;; @0025 store user2 little v49, v98;; v48 = load.i32 notrap v61;; v101 = iconst.i64 16;; v106 = iadd v33, v101 ; v101 = 16-;; @0025 store notrap aligned little v48, v106+;; @0025 store user2 little v48, v106;; v47 = load.i32 notrap v60;; v121 = iconst.i64 20;; v126 = iadd v33, v121 ; v121 = 20-;; @0025 store notrap aligned little v47, v126+;; @0025 store user2 little v47, v126;; @0029 jump block1;;;; block3 cold:diff --git a/tests/disas/gc/null/array-new-fixed.wat b/tests/disas/gc/null/array-new-fixed.watindex 4be809423b..888e1d9652 100644--- a/tests/disas/gc/null/array-new-fixed.wat+++ b/tests/disas/gc/null/array-new-fixed.wat@@ -23,13 +23,13 @@;;;; block0(v0: i64, v1: i64, v2: i64, v3: i64, v4: i64):;; @0025 v17 = load.i64 notrap aligned readonly v0+32-;; @0025 v18 = load.i32 notrap aligned v17+;; @0025 v18 = load.i32 user2 v17;; v71 = iconst.i32 7-;; @0025 v21 = uadd_overflow_trap v18, v71, user17 ; v71 = 7+;; @0025 v21 = uadd_overflow_trap v18, v71, user18 ; v71 = 7;; v77 = iconst.i32 -8;; @0025 v23 = band v21, v77 ; v77 = -8;; v64 = iconst.i32 40-;; @0025 v24 = uadd_overflow_trap v23, v64, user17 ; v64 = 40+;; @0025 v24 = uadd_overflow_trap v23, v64, user18 ; v64 = 40;; @0025 v50 = load.i64 notrap aligned readonly can_move v0+8;; @0025 v26 = load.i64 notrap aligned v50+40;; @0025 v25 = uextend.i64 v24@@ -42,24 +42,24 @@;; v140 = band.i32 v21, v77 ; v77 = -8;; v141 = uextend.i64 v140;; @0025 v33 = iadd v31, v141-;; @0025 store notrap aligned v78, v33 ; v78 = -1476394968+;; @0025 store user2 v78, v33 ; v78 = -1476394968;; @0025 v37 = load.i64 notrap aligned readonly can_move v0+40;; @0025 v38 = load.i32 notrap aligned readonly can_move v37-;; @0025 store notrap aligned v38, v33+4-;; @0025 store.i32 notrap aligned v24, v17+;; @0025 store user2 v38, v33+4+;; @0025 store.i32 user2 v24, v17;; @0025 v6 = iconst.i32 3;; v53 = iconst.i64 8;; @0025 v39 = iadd v33, v53 ; v53 = 8-;; @0025 store notrap aligned v6, v39 ; v6 = 3+;; @0025 store user2 v6, v39 ; v6 = 3;; v85 = iconst.i64 16;; v90 = iadd v33, v85 ; v85 = 16-;; @0025 store.i64 notrap aligned little v2, v90+;; @0025 store.i64 user2 little v2, v90;; v55 = iconst.i64 24;; v97 = iadd v33, v55 ; v55 = 24-;; @0025 store.i64 notrap aligned little v3, v97+;; @0025 store.i64 user2 little v3, v97;; v52 = iconst.i64 32;; v107 = iadd v33, v52 ; v52 = 32-;; @0025 store.i64 notrap aligned little v4, v107+;; @0025 store.i64 user2 little v4, v107;; @0029 jump block1;;;; block3 cold:diff --git a/tests/disas/gc/null/array-new.wat b/tests/disas/gc/null/array-new.watindex 1ab68c60f6..5202973846 100644--- a/tests/disas/gc/null/array-new.wat+++ b/tests/disas/gc/null/array-new.wat@@ -27,21 +27,21 @@;; v56 = ishl v6, v55 ; v55 = 3;; v53 = iconst.i64 32;; @0022 v8 = ushr v56, v53 ; v53 = 32-;; @0022 trapnz v8, user17+;; @0022 trapnz v8, user18;; @0022 v5 = iconst.i32 16;; v62 = iconst.i32 3;; v63 = ishl v3, v62 ; v62 = 3-;; @0022 v10 = uadd_overflow_trap v5, v63, user17 ; v5 = 16+;; @0022 v10 = uadd_overflow_trap v5, v63, user18 ; v5 = 16;; @0022 v12 = iconst.i32 -67108864;; @0022 v13 = band v10, v12 ; v12 = -67108864-;; @0022 trapnz v13, user17+;; @0022 trapnz v13, user18;; @0022 v15 = load.i64 notrap aligned readonly v0+32-;; @0022 v16 = load.i32 notrap aligned v15+;; @0022 v16 = load.i32 user2 v15;; v66 = iconst.i32 7-;; @0022 v19 = uadd_overflow_trap v16, v66, user17 ; v66 = 7+;; @0022 v19 = uadd_overflow_trap v16, v66, user18 ; v66 = 7;; v72 = iconst.i32 -8;; @0022 v21 = band v19, v72 ; v72 = -8-;; @0022 v22 = uadd_overflow_trap v21, v10, user17+;; @0022 v22 = uadd_overflow_trap v21, v10, user18;; @0022 v51 = load.i64 notrap aligned readonly can_move v0+8;; @0022 v24 = load.i64 notrap aligned v51+40;; @0022 v23 = uextend.i64 v22@@ -55,14 +55,14 @@;; v86 = band.i32 v19, v72 ; v72 = -8;; v87 = uextend.i64 v86;; @0022 v31 = iadd v29, v87-;; @0022 store notrap aligned v73, v31+;; @0022 store user2 v73, v31;; @0022 v35 = load.i64 notrap aligned readonly can_move v0+40;; @0022 v36 = load.i32 notrap aligned readonly can_move v35-;; @0022 store notrap aligned v36, v31+4-;; @0022 store.i32 notrap aligned v22, v15+;; @0022 store user2 v36, v31+4+;; @0022 store.i32 user2 v22, v15;; v54 = iconst.i64 8;; @0022 v37 = iadd v31, v54 ; v54 = 8-;; @0022 store.i32 notrap aligned v3, v37+;; @0022 store.i32 user2 v3, v37;; v76 = iconst.i64 16;; v81 = iadd v31, v76 ; v76 = 16;; @0022 v43 = uextend.i64 v10@@ -74,7 +74,7 @@;; @0022 brif v46, block6, block5;;;; block5:-;; @0022 store.i64 notrap aligned little v2, v45+;; @0022 store.i64 user2 little v2, v45;; v88 = iconst.i64 8;; v89 = iadd.i64 v45, v88 ; v88 = 8;; @0022 jump block4(v89)diff --git a/tests/disas/gc/null/array-set.wat b/tests/disas/gc/null/array-set.watindex 0fa90539fe..0b9e3f142b 100644--- a/tests/disas/gc/null/array-set.wat+++ b/tests/disas/gc/null/array-set.wat@@ -20,27 +20,27 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i64):-;; @0024 trapz v2, user15+;; @0024 trapz v2, user16;; @0024 v32 = load.i64 notrap aligned readonly can_move v0+8;; @0024 v6 = load.i64 notrap aligned readonly can_move v32+32;; @0024 v5 = uextend.i64 v2;; @0024 v7 = iadd v6, v5;; @0024 v8 = iconst.i64 8;; @0024 v9 = iadd v7, v8 ; v8 = 8-;; @0024 v10 = load.i32 notrap aligned readonly v9+;; @0024 v10 = load.i32 user2 readonly v9;; @0024 v11 = icmp ult v3, v10-;; @0024 trapz v11, user16+;; @0024 trapz v11, user17;; @0024 v13 = uextend.i64 v10;; v34 = iconst.i64 3;; v35 = ishl v13, v34 ; v34 = 3;; v31 = iconst.i64 32;; @0024 v15 = ushr v35, v31 ; v31 = 32-;; @0024 trapnz v15, user1+;; @0024 trapnz v15, user2;; v44 = iconst.i32 3;; v45 = ishl v10, v44 ; v44 = 3;; @0024 v17 = iconst.i32 16-;; @0024 v18 = uadd_overflow_trap v45, v17, user1 ; v17 = 16-;; @0024 v22 = uadd_overflow_trap v2, v18, user1+;; @0024 v18 = uadd_overflow_trap v45, v17, user2 ; v17 = 16+;; @0024 v22 = uadd_overflow_trap v2, v18, user2;; @0024 v23 = uextend.i64 v22;; @0024 v25 = iadd v6, v23;; v51 = ishl v3, v44 ; v44 = 3@@ -48,7 +48,7 @@;; @0024 v26 = isub v18, v21;; @0024 v27 = uextend.i64 v26;; @0024 v28 = isub v25, v27-;; @0024 store notrap aligned little v4, v28+;; @0024 store user2 little v4, v28;; @0027 jump block1;;;; block1:diff --git a/tests/disas/gc/null/br-on-cast-fail.wat b/tests/disas/gc/null/br-on-cast-fail.watindex 6392b1e12a..036149471d 100644--- a/tests/disas/gc/null/br-on-cast-fail.wat+++ b/tests/disas/gc/null/br-on-cast-fail.wat@@ -51,7 +51,7 @@;; @002e v15 = iadd v14, v13;; @002e v16 = iconst.i64 4;; @002e v17 = iadd v15, v16 ; v16 = 4-;; @002e v18 = load.i32 notrap aligned readonly v17+;; @002e v18 = load.i32 user2 readonly v17;; @002e v11 = load.i64 notrap aligned readonly can_move v0+40;; @002e v12 = load.i32 notrap aligned readonly can_move v11;; @002e v19 = icmp eq v18, v12diff --git a/tests/disas/gc/null/br-on-cast.wat b/tests/disas/gc/null/br-on-cast.watindex 70ef4b9335..3b2b44cf6b 100644--- a/tests/disas/gc/null/br-on-cast.wat+++ b/tests/disas/gc/null/br-on-cast.wat@@ -51,7 +51,7 @@;; @002f v15 = iadd v14, v13;; @002f v16 = iconst.i64 4;; @002f v17 = iadd v15, v16 ; v16 = 4-;; @002f v18 = load.i32 notrap aligned readonly v17+;; @002f v18 = load.i32 user2 readonly v17;; @002f v11 = load.i64 notrap aligned readonly can_move v0+40;; @002f v12 = load.i32 notrap aligned readonly can_move v11;; @002f v19 = icmp eq v18, v12diff --git a/tests/disas/gc/null/call-indirect-and-subtyping.wat b/tests/disas/gc/null/call-indirect-and-subtyping.watindex f6114c0441..da487877fe 100644--- a/tests/disas/gc/null/call-indirect-and-subtyping.wat+++ b/tests/disas/gc/null/call-indirect-and-subtyping.wat@@ -39,7 +39,7 @@;; @005c v7 = ishl v5, v30 ; v30 = 3;; @005c v8 = iadd v6, v7;; @005c v10 = select_spectre_guard v4, v9, v8 ; v9 = 0-;; @005c v11 = load.i64 user5 aligned table v10+;; @005c v11 = load.i64 user6 aligned table v10;; v29 = iconst.i64 -2;; @005c v12 = band v11, v29 ; v29 = -2;; @005c brif v11, block3(v12), block2@@ -50,7 +50,7 @@;; @005c jump block3(v17);;;; block3(v13: i64):-;; @005c v21 = load.i32 user6 aligned readonly v13+16+;; @005c v21 = load.i32 user7 aligned readonly v13+16;; @005c v19 = load.i64 notrap aligned readonly can_move v0+40;; @005c v20 = load.i32 notrap aligned readonly can_move v19;; @005c v22 = icmp eq v21, v20@@ -62,7 +62,7 @@;; @005c jump block5(v25);;;; block5(v26: i32):-;; @005c trapz v26, user7+;; @005c trapz v26, user8;; @005c v27 = load.i64 notrap aligned readonly v13+8;; @005c v28 = load.i64 notrap aligned readonly v13+24;; @005c call_indirect sig0, v27(v28, v0)diff --git a/tests/disas/gc/null/funcref-in-gc-heap-get.wat b/tests/disas/gc/null/funcref-in-gc-heap-get.watindex 48adc71c27..a77b333749 100644--- a/tests/disas/gc/null/funcref-in-gc-heap-get.wat+++ b/tests/disas/gc/null/funcref-in-gc-heap-get.wat@@ -22,14 +22,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0020 trapz v2, user15+;; @0020 trapz v2, user16;; @0020 v13 = load.i64 notrap aligned readonly can_move v0+8;; @0020 v5 = load.i64 notrap aligned readonly can_move v13+32;; @0020 v4 = uextend.i64 v2;; @0020 v6 = iadd v5, v4;; @0020 v7 = iconst.i64 8;; @0020 v8 = iadd v6, v7 ; v7 = 8-;; @0020 v11 = load.i32 notrap aligned little v8+;; @0020 v11 = load.i32 user2 little v8;; @0020 v9 = iconst.i32 -1;; @0020 v12 = call fn0(v0, v11, v9) ; v9 = -1;; @0024 jump block1diff --git a/tests/disas/gc/null/funcref-in-gc-heap-new.wat b/tests/disas/gc/null/funcref-in-gc-heap-new.watindex 268dddc1be..a2ac811af6 100644--- a/tests/disas/gc/null/funcref-in-gc-heap-new.wat+++ b/tests/disas/gc/null/funcref-in-gc-heap-new.wat@@ -25,13 +25,13 @@;;;; block0(v0: i64, v1: i64, v2: i64):;; @0020 v9 = load.i64 notrap aligned readonly v0+32-;; @0020 v10 = load.i32 notrap aligned v9+;; @0020 v10 = load.i32 user2 v9;; v46 = iconst.i32 7-;; @0020 v13 = uadd_overflow_trap v10, v46, user17 ; v46 = 7+;; @0020 v13 = uadd_overflow_trap v10, v46, user18 ; v46 = 7;; v52 = iconst.i32 -8;; @0020 v15 = band v13, v52 ; v52 = -8;; @0020 v4 = iconst.i32 16-;; @0020 v16 = uadd_overflow_trap v15, v4, user17 ; v4 = 16+;; @0020 v16 = uadd_overflow_trap v15, v4, user18 ; v4 = 16;; @0020 v38 = load.i64 notrap aligned readonly can_move v0+8;; @0020 v18 = load.i64 notrap aligned v38+40;; @0020 v17 = uextend.i64 v16@@ -44,16 +44,16 @@;; v59 = band.i32 v13, v52 ; v52 = -8;; v60 = uextend.i64 v59;; @0020 v25 = iadd v23, v60-;; @0020 store notrap aligned v53, v25 ; v53 = -1342177264+;; @0020 store user2 v53, v25 ; v53 = -1342177264;; @0020 v29 = load.i64 notrap aligned readonly can_move v0+40;; @0020 v30 = load.i32 notrap aligned readonly can_move v29-;; @0020 store notrap aligned v30, v25+4-;; @0020 store.i32 notrap aligned v16, v9+;; @0020 store user2 v30, v25+4+;; @0020 store.i32 user2 v16, v9;; @0020 v33 = call fn1(v0, v2);; @0020 v34 = ireduce.i32 v33;; v35 = iconst.i64 8;; @0020 v31 = iadd v25, v35 ; v35 = 8-;; @0020 store notrap aligned little v34, v31+;; @0020 store user2 little v34, v31;; @0023 jump block1;;;; block3 cold:diff --git a/tests/disas/gc/null/funcref-in-gc-heap-set.wat b/tests/disas/gc/null/funcref-in-gc-heap-set.watindex 7572102ecd..9d062b9911 100644--- a/tests/disas/gc/null/funcref-in-gc-heap-set.wat+++ b/tests/disas/gc/null/funcref-in-gc-heap-set.wat@@ -22,7 +22,7 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i64):-;; @0022 trapz v2, user15+;; @0022 trapz v2, user16;; @0022 v10 = call fn0(v0, v3);; @0022 v11 = ireduce.i32 v10;; @0022 v12 = load.i64 notrap aligned readonly can_move v0+8@@ -31,7 +31,7 @@;; @0022 v6 = iadd v5, v4;; @0022 v7 = iconst.i64 8;; @0022 v8 = iadd v6, v7 ; v7 = 8-;; @0022 store notrap aligned little v11, v8+;; @0022 store user2 little v11, v8;; @0026 jump block1;;;; block1:diff --git a/tests/disas/gc/null/multiple-array-get.wat b/tests/disas/gc/null/multiple-array-get.watindex ad073e5d16..a9cdecbd7d 100644--- a/tests/disas/gc/null/multiple-array-get.wat+++ b/tests/disas/gc/null/multiple-array-get.wat@@ -21,27 +21,27 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32):-;; @0024 trapz v2, user15+;; @0024 trapz v2, user16;; @0024 v65 = load.i64 notrap aligned readonly can_move v0+8;; @0024 v8 = load.i64 notrap aligned readonly can_move v65+32;; @0024 v7 = uextend.i64 v2;; @0024 v9 = iadd v8, v7;; @0024 v10 = iconst.i64 8;; @0024 v11 = iadd v9, v10 ; v10 = 8-;; @0024 v12 = load.i32 notrap aligned readonly v11+;; @0024 v12 = load.i32 user2 readonly v11;; @0024 v13 = icmp ult v3, v12-;; @0024 trapz v13, user16+;; @0024 trapz v13, user17;; @0024 v15 = uextend.i64 v12;; v67 = iconst.i64 3;; v68 = ishl v15, v67 ; v67 = 3;; v64 = iconst.i64 32;; @0024 v17 = ushr v68, v64 ; v64 = 32-;; @0024 trapnz v17, user1+;; @0024 trapnz v17, user2;; v77 = iconst.i32 3;; v78 = ishl v12, v77 ; v77 = 3;; @0024 v19 = iconst.i32 16-;; @0024 v20 = uadd_overflow_trap v78, v19, user1 ; v19 = 16-;; @0024 v24 = uadd_overflow_trap v2, v20, user1+;; @0024 v20 = uadd_overflow_trap v78, v19, user2 ; v19 = 16+;; @0024 v24 = uadd_overflow_trap v2, v20, user2;; @0024 v25 = uextend.i64 v24;; @0024 v27 = iadd v8, v25;; v84 = ishl v3, v77 ; v77 = 3@@ -49,15 +49,15 @@;; @0024 v28 = isub v20, v23;; @0024 v29 = uextend.i64 v28;; @0024 v30 = isub v27, v29-;; @0024 v31 = load.i64 notrap aligned little v30+;; @0024 v31 = load.i64 user2 little v30;; @002b v38 = icmp ult v4, v12-;; @002b trapz v38, user16+;; @002b trapz v38, user17;; v86 = ishl v4, v77 ; v77 = 3;; @002b v48 = iadd v86, v19 ; v19 = 16;; @002b v53 = isub v20, v48;; @002b v54 = uextend.i64 v53;; @002b v55 = isub v27, v54-;; @002b v56 = load.i64 notrap aligned little v55+;; @002b v56 = load.i64 user2 little v55;; @002e jump block1;;;; block1:diff --git a/tests/disas/gc/null/multiple-struct-get.wat b/tests/disas/gc/null/multiple-struct-get.watindex c1bf36395b..bbf1c22654 100644--- a/tests/disas/gc/null/multiple-struct-get.wat+++ b/tests/disas/gc/null/multiple-struct-get.wat@@ -22,17 +22,17 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0023 trapz v2, user15+;; @0023 trapz v2, user16;; @0023 v20 = load.i64 notrap aligned readonly can_move v0+8;; @0023 v6 = load.i64 notrap aligned readonly can_move v20+32;; @0023 v5 = uextend.i64 v2;; @0023 v7 = iadd v6, v5;; @0023 v8 = iconst.i64 8;; @0023 v9 = iadd v7, v8 ; v8 = 8-;; @0023 v10 = load.f32 notrap aligned little v9+;; @0023 v10 = load.f32 user2 little v9;; @0029 v14 = iconst.i64 12;; @0029 v15 = iadd v7, v14 ; v14 = 12-;; @0029 v16 = load.i8 notrap aligned little v15+;; @0029 v16 = load.i8 user2 little v15;; @002d jump block1;;;; block1:diff --git a/tests/disas/gc/null/ref-cast.wat b/tests/disas/gc/null/ref-cast.watindex cb4afa15a3..6d428d1e7f 100644--- a/tests/disas/gc/null/ref-cast.wat+++ b/tests/disas/gc/null/ref-cast.wat@@ -42,7 +42,7 @@;; @001e v15 = iadd v14, v13;; @001e v16 = iconst.i64 4;; @001e v17 = iadd v15, v16 ; v16 = 4-;; @001e v18 = load.i32 notrap aligned readonly v17+;; @001e v18 = load.i32 user2 readonly v17;; @001e v11 = load.i64 notrap aligned readonly can_move v0+40;; @001e v12 = load.i32 notrap aligned readonly can_move v11;; @001e v19 = icmp eq v18, v12@@ -57,7 +57,7 @@;; @001e jump block4(v23);;;; block4(v24: i32):-;; @001e trapz v24, user18+;; @001e trapz v24, user19;; v25 = load.i32 notrap v36;; @0021 jump block1;;diff --git a/tests/disas/gc/null/ref-test-array.wat b/tests/disas/gc/null/ref-test-array.watindex ad44ef52ac..bca4b9c483 100644--- a/tests/disas/gc/null/ref-test-array.wat+++ b/tests/disas/gc/null/ref-test-array.wat@@ -34,7 +34,7 @@;; @001b v11 = load.i64 notrap aligned readonly can_move v21+32;; @001b v10 = uextend.i64 v2;; @001b v12 = iadd v11, v10-;; @001b v15 = load.i32 notrap aligned readonly v12+;; @001b v15 = load.i32 user2 readonly v12;; @001b v16 = iconst.i32 -1476395008;; @001b v17 = band v15, v16 ; v16 = -1476395008;; @001b v18 = icmp eq v17, v16 ; v16 = -1476395008diff --git a/tests/disas/gc/null/ref-test-concrete-func-type.wat b/tests/disas/gc/null/ref-test-concrete-func-type.watindex 7b24dd1003..03caba586c 100644--- a/tests/disas/gc/null/ref-test-concrete-func-type.wat+++ b/tests/disas/gc/null/ref-test-concrete-func-type.wat@@ -28,7 +28,7 @@;; @0020 jump block3;;;; block3:-;; @0020 v10 = load.i32 notrap aligned readonly v2+16+;; @0020 v10 = load.i32 user2 readonly v2+16;; @0020 v8 = load.i64 notrap aligned readonly can_move v0+40;; @0020 v9 = load.i32 notrap aligned readonly can_move v8;; @0020 v11 = icmp eq v10, v9diff --git a/tests/disas/gc/null/ref-test-concrete-type.wat b/tests/disas/gc/null/ref-test-concrete-type.watindex 698199c1ba..c53b4e8d92 100644--- a/tests/disas/gc/null/ref-test-concrete-type.wat+++ b/tests/disas/gc/null/ref-test-concrete-type.wat@@ -39,7 +39,7 @@;; @001d v15 = iadd v14, v13;; @001d v16 = iconst.i64 4;; @001d v17 = iadd v15, v16 ; v16 = 4-;; @001d v18 = load.i32 notrap aligned readonly v17+;; @001d v18 = load.i32 user2 readonly v17;; @001d v11 = load.i64 notrap aligned readonly can_move v0+40;; @001d v12 = load.i32 notrap aligned readonly can_move v11;; @001d v19 = icmp eq v18, v12diff --git a/tests/disas/gc/null/ref-test-eq.wat b/tests/disas/gc/null/ref-test-eq.watindex f64058b78b..cc0f0d7104 100644--- a/tests/disas/gc/null/ref-test-eq.wat+++ b/tests/disas/gc/null/ref-test-eq.wat@@ -33,7 +33,7 @@;; @001b v11 = load.i64 notrap aligned readonly can_move v21+32;; @001b v10 = uextend.i64 v2;; @001b v12 = iadd v11, v10-;; @001b v15 = load.i32 notrap aligned readonly v12+;; @001b v15 = load.i32 user2 readonly v12;; @001b v16 = iconst.i32 -1610612736;; @001b v17 = band v15, v16 ; v16 = -1610612736;; @001b v18 = icmp eq v17, v16 ; v16 = -1610612736diff --git a/tests/disas/gc/null/ref-test-struct.wat b/tests/disas/gc/null/ref-test-struct.watindex adca0039e2..0b3f1d428f 100644--- a/tests/disas/gc/null/ref-test-struct.wat+++ b/tests/disas/gc/null/ref-test-struct.wat@@ -34,7 +34,7 @@;; @001b v11 = load.i64 notrap aligned readonly can_move v21+32;; @001b v10 = uextend.i64 v2;; @001b v12 = iadd v11, v10-;; @001b v15 = load.i32 notrap aligned readonly v12+;; @001b v15 = load.i32 user2 readonly v12;; @001b v16 = iconst.i32 -1342177280;; @001b v17 = band v15, v16 ; v16 = -1342177280;; @001b v18 = icmp eq v17, v16 ; v16 = -1342177280diff --git a/tests/disas/gc/null/struct-get-guard-pages.wat b/tests/disas/gc/null/struct-get-guard-pages.watindex 57d473dc84..87ffa5d181 100644--- a/tests/disas/gc/null/struct-get-guard-pages.wat+++ b/tests/disas/gc/null/struct-get-guard-pages.wat@@ -34,14 +34,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0033 trapz v2, user15+;; @0033 trapz v2, user16;; @0033 v10 = load.i64 notrap aligned readonly can_move v0+8;; @0033 v5 = load.i64 notrap aligned readonly can_move v10+32;; @0033 v4 = uextend.i64 v2;; @0033 v6 = iadd v5, v4;; @0033 v7 = iconst.i64 8;; @0033 v8 = iadd v6, v7 ; v7 = 8-;; @0033 v9 = load.f32 notrap aligned little v8+;; @0033 v9 = load.f32 user2 little v8;; @0037 jump block1;;;; block1:@@ -59,14 +59,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @003c trapz v2, user15+;; @003c trapz v2, user16;; @003c v11 = load.i64 notrap aligned readonly can_move v0+8;; @003c v5 = load.i64 notrap aligned readonly can_move v11+32;; @003c v4 = uextend.i64 v2;; @003c v6 = iadd v5, v4;; @003c v7 = iconst.i64 12;; @003c v8 = iadd v6, v7 ; v7 = 12-;; @003c v9 = load.i8 notrap aligned little v8+;; @003c v9 = load.i8 user2 little v8;; @0040 jump block1;;;; block1:@@ -85,14 +85,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0045 trapz v2, user15+;; @0045 trapz v2, user16;; @0045 v11 = load.i64 notrap aligned readonly can_move v0+8;; @0045 v5 = load.i64 notrap aligned readonly can_move v11+32;; @0045 v4 = uextend.i64 v2;; @0045 v6 = iadd v5, v4;; @0045 v7 = iconst.i64 12;; @0045 v8 = iadd v6, v7 ; v7 = 12-;; @0045 v9 = load.i8 notrap aligned little v8+;; @0045 v9 = load.i8 user2 little v8;; @0049 jump block1;;;; block1:@@ -111,14 +111,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @004e trapz v2, user15+;; @004e trapz v2, user16;; @004e v10 = load.i64 notrap aligned readonly can_move v0+8;; @004e v5 = load.i64 notrap aligned readonly can_move v10+32;; @004e v4 = uextend.i64 v2;; @004e v6 = iadd v5, v4;; @004e v7 = iconst.i64 16;; @004e v8 = iadd v6, v7 ; v7 = 16-;; @004e v9 = load.i32 notrap aligned little v8+;; @004e v9 = load.i32 user2 little v8;; @0052 jump block1;;;; block1:diff --git a/tests/disas/gc/null/struct-get-no-guard-pages.wat b/tests/disas/gc/null/struct-get-no-guard-pages.watindex bb64d884c8..8c5671bc24 100644--- a/tests/disas/gc/null/struct-get-no-guard-pages.wat+++ b/tests/disas/gc/null/struct-get-no-guard-pages.wat@@ -34,10 +34,10 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0033 trapz v2, user15+;; @0033 trapz v2, user16;; @0033 v4 = uextend.i64 v2;; @0033 v5 = iconst.i64 24-;; @0033 v6 = uadd_overflow_trap v4, v5, user1 ; v5 = 24+;; @0033 v6 = uadd_overflow_trap v4, v5, user2 ; v5 = 24;; @0033 v18 = load.i64 notrap aligned readonly can_move v0+8;; @0033 v7 = load.i64 notrap aligned v18+40;; @0033 v9 = load.i64 notrap aligned v18+32@@ -47,7 +47,7 @@;; @0033 v12 = select_spectre_guard v8, v11, v10 ; v11 = 0;; @0033 v13 = iconst.i64 8;; @0033 v14 = iadd v12, v13 ; v13 = 8-;; @0033 v15 = load.f32 notrap aligned little v14+;; @0033 v15 = load.f32 user2 little v14;; @0037 jump block1;;;; block1:@@ -65,10 +65,10 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @003c trapz v2, user15+;; @003c trapz v2, user16;; @003c v4 = uextend.i64 v2;; @003c v5 = iconst.i64 24-;; @003c v6 = uadd_overflow_trap v4, v5, user1 ; v5 = 24+;; @003c v6 = uadd_overflow_trap v4, v5, user2 ; v5 = 24;; @003c v19 = load.i64 notrap aligned readonly can_move v0+8;; @003c v7 = load.i64 notrap aligned v19+40;; @003c v9 = load.i64 notrap aligned v19+32@@ -78,7 +78,7 @@;; @003c v12 = select_spectre_guard v8, v11, v10 ; v11 = 0;; @003c v13 = iconst.i64 12;; @003c v14 = iadd v12, v13 ; v13 = 12-;; @003c v15 = load.i8 notrap aligned little v14+;; @003c v15 = load.i8 user2 little v14;; @0040 jump block1;;;; block1:@@ -97,10 +97,10 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0045 trapz v2, user15+;; @0045 trapz v2, user16;; @0045 v4 = uextend.i64 v2;; @0045 v5 = iconst.i64 24-;; @0045 v6 = uadd_overflow_trap v4, v5, user1 ; v5 = 24+;; @0045 v6 = uadd_overflow_trap v4, v5, user2 ; v5 = 24;; @0045 v19 = load.i64 notrap aligned readonly can_move v0+8;; @0045 v7 = load.i64 notrap aligned v19+40;; @0045 v9 = load.i64 notrap aligned v19+32@@ -110,7 +110,7 @@;; @0045 v12 = select_spectre_guard v8, v11, v10 ; v11 = 0;; @0045 v13 = iconst.i64 12;; @0045 v14 = iadd v12, v13 ; v13 = 12-;; @0045 v15 = load.i8 notrap aligned little v14+;; @0045 v15 = load.i8 user2 little v14;; @0049 jump block1;;;; block1:@@ -129,10 +129,10 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @004e trapz v2, user15+;; @004e trapz v2, user16;; @004e v4 = uextend.i64 v2;; @004e v5 = iconst.i64 24-;; @004e v6 = uadd_overflow_trap v4, v5, user1 ; v5 = 24+;; @004e v6 = uadd_overflow_trap v4, v5, user2 ; v5 = 24;; @004e v18 = load.i64 notrap aligned readonly can_move v0+8;; @004e v7 = load.i64 notrap aligned v18+40;; @004e v9 = load.i64 notrap aligned v18+32@@ -142,7 +142,7 @@;; @004e v12 = select_spectre_guard v8, v11, v10 ; v11 = 0;; @004e v13 = iconst.i64 16;; @004e v14 = iadd v12, v13 ; v13 = 16-;; @004e v15 = load.i32 notrap aligned little v14+;; @004e v15 = load.i32 user2 little v14;; @0052 jump block1;;;; block1:diff --git a/tests/disas/gc/null/struct-get.wat b/tests/disas/gc/null/struct-get.watindex 807aa1711b..5b996d5d10 100644--- a/tests/disas/gc/null/struct-get.wat+++ b/tests/disas/gc/null/struct-get.wat@@ -34,14 +34,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0033 trapz v2, user15+;; @0033 trapz v2, user16;; @0033 v10 = load.i64 notrap aligned readonly can_move v0+8;; @0033 v5 = load.i64 notrap aligned readonly can_move v10+32;; @0033 v4 = uextend.i64 v2;; @0033 v6 = iadd v5, v4;; @0033 v7 = iconst.i64 8;; @0033 v8 = iadd v6, v7 ; v7 = 8-;; @0033 v9 = load.f32 notrap aligned little v8+;; @0033 v9 = load.f32 user2 little v8;; @0037 jump block1;;;; block1:@@ -59,14 +59,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @003c trapz v2, user15+;; @003c trapz v2, user16;; @003c v11 = load.i64 notrap aligned readonly can_move v0+8;; @003c v5 = load.i64 notrap aligned readonly can_move v11+32;; @003c v4 = uextend.i64 v2;; @003c v6 = iadd v5, v4;; @003c v7 = iconst.i64 12;; @003c v8 = iadd v6, v7 ; v7 = 12-;; @003c v9 = load.i8 notrap aligned little v8+;; @003c v9 = load.i8 user2 little v8;; @0040 jump block1;;;; block1:@@ -85,14 +85,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0045 trapz v2, user15+;; @0045 trapz v2, user16;; @0045 v11 = load.i64 notrap aligned readonly can_move v0+8;; @0045 v5 = load.i64 notrap aligned readonly can_move v11+32;; @0045 v4 = uextend.i64 v2;; @0045 v6 = iadd v5, v4;; @0045 v7 = iconst.i64 12;; @0045 v8 = iadd v6, v7 ; v7 = 12-;; @0045 v9 = load.i8 notrap aligned little v8+;; @0045 v9 = load.i8 user2 little v8;; @0049 jump block1;;;; block1:@@ -111,14 +111,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @004e trapz v2, user15+;; @004e trapz v2, user16;; @004e v10 = load.i64 notrap aligned readonly can_move v0+8;; @004e v5 = load.i64 notrap aligned readonly can_move v10+32;; @004e v4 = uextend.i64 v2;; @004e v6 = iadd v5, v4;; @004e v7 = iconst.i64 16;; @004e v8 = iadd v6, v7 ; v7 = 16-;; @004e v9 = load.i32 notrap aligned little v8+;; @004e v9 = load.i32 user2 little v8;; @0052 jump block1;;;; block1:diff --git a/tests/disas/gc/null/struct-new-default.wat b/tests/disas/gc/null/struct-new-default.watindex 1b39fe1737..1e340d1bcd 100644--- a/tests/disas/gc/null/struct-new-default.wat+++ b/tests/disas/gc/null/struct-new-default.wat@@ -25,13 +25,13 @@;;;; block0(v0: i64, v1: i64):;; @0021 v11 = load.i64 notrap aligned readonly v0+32-;; @0021 v12 = load.i32 notrap aligned v11+;; @0021 v12 = load.i32 user2 v11;; v48 = iconst.i32 7-;; @0021 v15 = uadd_overflow_trap v12, v48, user17 ; v48 = 7+;; @0021 v15 = uadd_overflow_trap v12, v48, user18 ; v48 = 7;; v54 = iconst.i32 -8;; @0021 v17 = band v15, v54 ; v54 = -8;; @0021 v6 = iconst.i32 24-;; @0021 v18 = uadd_overflow_trap v17, v6, user17 ; v6 = 24+;; @0021 v18 = uadd_overflow_trap v17, v6, user18 ; v6 = 24;; @0021 v41 = load.i64 notrap aligned readonly can_move v0+8;; @0021 v20 = load.i64 notrap aligned v41+40;; @0021 v19 = uextend.i64 v18@@ -44,22 +44,22 @@;; v61 = band.i32 v15, v54 ; v54 = -8;; v62 = uextend.i64 v61;; @0021 v27 = iadd v25, v62-;; @0021 store notrap aligned v55, v27 ; v55 = -1342177256+;; @0021 store user2 v55, v27 ; v55 = -1342177256;; @0021 v31 = load.i64 notrap aligned readonly can_move v0+40;; @0021 v32 = load.i32 notrap aligned readonly can_move v31-;; @0021 store notrap aligned v32, v27+4-;; @0021 store.i32 notrap aligned v18, v11+;; @0021 store user2 v32, v27+4+;; @0021 store.i32 user2 v18, v11;; @0021 v3 = f32const 0.0;; v38 = iconst.i64 8;; @0021 v33 = iadd v27, v38 ; v38 = 8-;; @0021 store notrap aligned little v3, v33 ; v3 = 0.0+;; @0021 store user2 little v3, v33 ; v3 = 0.0;; @0021 v4 = iconst.i32 0;; v37 = iconst.i64 12;; @0021 v34 = iadd v27, v37 ; v37 = 12-;; @0021 istore8 notrap aligned little v4, v34 ; v4 = 0+;; @0021 istore8 user2 little v4, v34 ; v4 = 0;; v36 = iconst.i64 16;; @0021 v35 = iadd v27, v36 ; v36 = 16-;; @0021 store notrap aligned little v4, v35 ; v4 = 0+;; @0021 store user2 little v4, v35 ; v4 = 0;; @0024 jump block1;;;; block3 cold:diff --git a/tests/disas/gc/null/struct-new.wat b/tests/disas/gc/null/struct-new.watindex 1be9f6b72d..eac3f343c8 100644--- a/tests/disas/gc/null/struct-new.wat+++ b/tests/disas/gc/null/struct-new.wat@@ -28,13 +28,13 @@;; v45 = stack_addr.i64 ss0;; store notrap v4, v45;; @002a v11 = load.i64 notrap aligned readonly v0+32-;; @002a v12 = load.i32 notrap aligned v11+;; @002a v12 = load.i32 user2 v11;; v52 = iconst.i32 7-;; @002a v15 = uadd_overflow_trap v12, v52, user17 ; v52 = 7+;; @002a v15 = uadd_overflow_trap v12, v52, user18 ; v52 = 7;; v58 = iconst.i32 -8;; @002a v17 = band v15, v58 ; v58 = -8;; @002a v6 = iconst.i32 24-;; @002a v18 = uadd_overflow_trap v17, v6, user17 ; v6 = 24+;; @002a v18 = uadd_overflow_trap v17, v6, user18 ; v6 = 24;; @002a v43 = load.i64 notrap aligned readonly can_move v0+8;; @002a v20 = load.i64 notrap aligned v43+40;; @002a v19 = uextend.i64 v18@@ -47,21 +47,21 @@;; v65 = band.i32 v15, v58 ; v58 = -8;; v66 = uextend.i64 v65;; @002a v27 = iadd v25, v66-;; @002a store notrap aligned v59, v27 ; v59 = -1342177256+;; @002a store user2 v59, v27 ; v59 = -1342177256;; @002a v31 = load.i64 notrap aligned readonly can_move v0+40;; @002a v32 = load.i32 notrap aligned readonly can_move v31-;; @002a store notrap aligned v32, v27+4-;; @002a store.i32 notrap aligned v18, v11+;; @002a store user2 v32, v27+4+;; @002a store.i32 user2 v18, v11;; v40 = iconst.i64 8;; @002a v33 = iadd v27, v40 ; v40 = 8-;; @002a store.f32 notrap aligned little v2, v33+;; @002a store.f32 user2 little v2, v33;; v39 = iconst.i64 12;; @002a v34 = iadd v27, v39 ; v39 = 12-;; @002a istore8.i32 notrap aligned little v3, v34+;; @002a istore8.i32 user2 little v3, v34;; v36 = load.i32 notrap v45;; v38 = iconst.i64 16;; @002a v35 = iadd v27, v38 ; v38 = 16-;; @002a store notrap aligned little v36, v35+;; @002a store user2 little v36, v35;; @002d jump block1;;;; block3 cold:diff --git a/tests/disas/gc/null/struct-set.wat b/tests/disas/gc/null/struct-set.watindex 30e88dedfe..97f431ef92 100644--- a/tests/disas/gc/null/struct-set.wat+++ b/tests/disas/gc/null/struct-set.wat@@ -30,14 +30,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: f32):-;; @0034 trapz v2, user15+;; @0034 trapz v2, user16;; @0034 v9 = load.i64 notrap aligned readonly can_move v0+8;; @0034 v5 = load.i64 notrap aligned readonly can_move v9+32;; @0034 v4 = uextend.i64 v2;; @0034 v6 = iadd v5, v4;; @0034 v7 = iconst.i64 8;; @0034 v8 = iadd v6, v7 ; v7 = 8-;; @0034 store notrap aligned little v3, v8+;; @0034 store user2 little v3, v8;; @0038 jump block1;;;; block1:@@ -55,14 +55,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @003f trapz v2, user15+;; @003f trapz v2, user16;; @003f v9 = load.i64 notrap aligned readonly can_move v0+8;; @003f v5 = load.i64 notrap aligned readonly can_move v9+32;; @003f v4 = uextend.i64 v2;; @003f v6 = iadd v5, v4;; @003f v7 = iconst.i64 12;; @003f v8 = iadd v6, v7 ; v7 = 12-;; @003f istore8 notrap aligned little v3, v8+;; @003f istore8 user2 little v3, v8;; @0043 jump block1;;;; block1:@@ -80,14 +80,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @004a trapz v2, user15+;; @004a trapz v2, user16;; @004a v9 = load.i64 notrap aligned readonly can_move v0+8;; @004a v5 = load.i64 notrap aligned readonly can_move v9+32;; @004a v4 = uextend.i64 v2;; @004a v6 = iadd v5, v4;; @004a v7 = iconst.i64 16;; @004a v8 = iadd v6, v7 ; v7 = 16-;; @004a store notrap aligned little v3, v8+;; @004a store user2 little v3, v8;; @004e jump block1;;;; block1:diff --git a/tests/disas/gc/null/v128-fields.wat b/tests/disas/gc/null/v128-fields.watindex 76350405b5..5ebc53e6fd 100644--- a/tests/disas/gc/null/v128-fields.wat+++ b/tests/disas/gc/null/v128-fields.wat@@ -22,14 +22,14 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0022 trapz v2, user15+;; @0022 trapz v2, user16;; @0022 v19 = load.i64 notrap aligned readonly can_move v0+8;; @0022 v5 = load.i64 notrap aligned readonly can_move v19+32;; @0022 v4 = uextend.i64 v2;; @0022 v6 = iadd v5, v4;; @0022 v7 = iconst.i64 16;; @0022 v8 = iadd v6, v7 ; v7 = 16-;; @0022 v9 = load.i8x16 notrap aligned little v8+;; @0022 v9 = load.i8x16 user2 little v8;; @002e jump block1;;;; block1:diff --git a/tests/disas/gc/struct-new-default.wat b/tests/disas/gc/struct-new-default.watindex df2e6f9fe8..dc44cadca0 100644--- a/tests/disas/gc/struct-new-default.wat+++ b/tests/disas/gc/struct-new-default.wat@@ -39,22 +39,22 @@;; @0023 v17 = iadd v15, v16;; v48 = iconst.i64 24;; @0023 v18 = iadd v17, v48 ; v48 = 24-;; @0023 store notrap aligned little v3, v18 ; v3 = 0.0+;; @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 notrap aligned little v4, v19 ; v4 = 0+;; @0023 istore8 user2 little v4, v19 ; v4 = 0;; jump block3;;;; block3:;; v67 = iconst.i32 0;; v46 = iconst.i64 32;; @0023 v20 = iadd.i64 v17, v46 ; v46 = 32-;; @0023 store notrap aligned little v67, v20 ; v67 = 0+;; @0023 store user2 little v67, v20 ; v67 = 0;; @0023 v6 = vconst.i8x16 const0;; v38 = iconst.i64 48;; @0023 v37 = iadd.i64 v17, v38 ; v38 = 48-;; @0023 store notrap aligned little v6, v37 ; v6 = const0+;; @0023 store user2 little v6, v37 ; v6 = const0;; @0026 jump block1;;;; block1:diff --git a/tests/disas/gc/struct-new.wat b/tests/disas/gc/struct-new.watindex 8777f9a196..3997852121 100644--- a/tests/disas/gc/struct-new.wat+++ b/tests/disas/gc/struct-new.wat@@ -39,10 +39,10 @@;; @002a v16 = iadd v14, v15;; v55 = iconst.i64 24;; @002a v17 = iadd v16, v55 ; v55 = 24-;; @002a store notrap aligned little v2, v17+;; @002a store user2 little v2, v17;; v54 = iconst.i64 28;; @002a v18 = iadd v16, v54 ; v54 = 28-;; @002a istore8 notrap aligned little v3, v18+;; @002a istore8 user2 little v3, v18;; v40 = load.i32 notrap v58;; v51 = iconst.i32 1;; @002a v20 = band v40, v51 ; v51 = 1@@ -57,17 +57,17 @@;; @002a v26 = iadd.i64 v14, v24;; @002a v27 = iconst.i64 8;; @002a v28 = iadd v26, v27 ; v27 = 8-;; @002a v29 = load.i64 notrap aligned v28+;; @002a v29 = load.i64 user2 v28;; v45 = iconst.i64 1;; @002a v30 = iadd v29, v45 ; v45 = 1-;; @002a store notrap aligned v30, v28+;; @002a store user2 v30, v28;; @002a jump block3;;;; block3:;; v36 = load.i32 notrap v58;; v53 = iconst.i64 32;; @002a v19 = iadd.i64 v16, v53 ; v53 = 32-;; @002a store notrap aligned little v36, v19+;; @002a store user2 little v36, v19;; @002d jump block1;;;; block1:diff --git a/tests/disas/icall-loop.wat b/tests/disas/icall-loop.watindex 0ee9a15350..3918c54295 100644--- a/tests/disas/icall-loop.wat+++ b/tests/disas/icall-loop.wat@@ -50,7 +50,7 @@;; @0027 jump block2;;;; block2:-;; @002b v12 = load.i64 user5 aligned table v11+;; @002b v12 = load.i64 user6 aligned table v11;; v31 = iconst.i64 -2;; v32 = band v12, v31 ; v31 = -2;; @002b brif v12, block5(v32), block4@@ -61,9 +61,9 @@;; @002b jump block5(v18);;;; block5(v14: i64):-;; @002b v22 = load.i32 user6 aligned readonly v14+16+;; @002b v22 = load.i32 user7 aligned readonly v14+16;; @002b v23 = icmp eq v22, v21-;; @002b trapz v23, user7+;; @002b trapz v23, user8;; @002b v24 = load.i64 notrap aligned readonly v14+8;; @002b v25 = load.i64 notrap aligned readonly v14+24;; @002b v26 = call_indirect sig0, v24(v25, v0)@@ -94,7 +94,7 @@;;;; block2:;; v37 = iadd.i64 v6, v36 ; v36 = 8-;; @0038 v11 = load.i64 user5 aligned table v37+;; @0038 v11 = load.i64 user6 aligned table v37;; v38 = iconst.i64 -2;; v39 = band v11, v38 ; v38 = -2;; @0038 brif v11, block5(v39), block4@@ -106,9 +106,9 @@;; @0038 jump block5(v17);;;; block5(v13: i64):-;; @0038 v21 = load.i32 user6 aligned readonly v13+16+;; @0038 v21 = load.i32 user7 aligned readonly v13+16;; @0038 v22 = icmp eq v21, v20-;; @0038 trapz v22, user7+;; @0038 trapz v22, user8;; @0038 v23 = load.i64 notrap aligned readonly v13+8;; @0038 v24 = load.i64 notrap aligned readonly v13+24;; @0038 v25 = call_indirect sig0, v23(v24, v0)diff --git a/tests/disas/icall-simd.wat b/tests/disas/icall-simd.watindex 9066a3e340..749c30e870 100644--- a/tests/disas/icall-simd.wat+++ b/tests/disas/icall-simd.wat@@ -29,7 +29,7 @@;; @0033 v10 = iadd v8, v9;; @0033 v11 = iconst.i64 0;; @0033 v12 = select_spectre_guard v6, v11, v10 ; v11 = 0-;; @0033 v13 = load.i64 user5 aligned table v12+;; @0033 v13 = load.i64 user6 aligned table v12;; v28 = iconst.i64 -2;; @0033 v14 = band v13, v28 ; v28 = -2;; @0033 brif v13, block3(v14), block2@@ -43,9 +43,9 @@;; block3(v15: i64):;; @0033 v21 = load.i64 notrap aligned readonly can_move v0+40;; @0033 v22 = load.i32 notrap aligned readonly can_move v21-;; @0033 v23 = load.i32 user6 aligned readonly v15+16+;; @0033 v23 = load.i32 user7 aligned readonly v15+16;; @0033 v24 = icmp eq v23, v22-;; @0033 trapz v24, user7+;; @0033 trapz v24, user8;; @0033 v25 = load.i64 notrap aligned readonly v15+8;; @0033 v26 = load.i64 notrap aligned readonly v15+24;; @0033 v27 = call_indirect sig0, v25(v26, v0, v3)diff --git a/tests/disas/icall.wat b/tests/disas/icall.watindex c02c3c457f..d84d2b7c72 100644--- a/tests/disas/icall.wat+++ b/tests/disas/icall.wat@@ -29,7 +29,7 @@;; @0033 v10 = iadd v8, v9;; @0033 v11 = iconst.i64 0;; @0033 v12 = select_spectre_guard v6, v11, v10 ; v11 = 0-;; @0033 v13 = load.i64 user5 aligned table v12+;; @0033 v13 = load.i64 user6 aligned table v12;; v28 = iconst.i64 -2;; @0033 v14 = band v13, v28 ; v28 = -2;; @0033 brif v13, block3(v14), block2@@ -43,9 +43,9 @@;; block3(v15: i64):;; @0033 v21 = load.i64 notrap aligned readonly can_move v0+40;; @0033 v22 = load.i32 notrap aligned readonly can_move v21-;; @0033 v23 = load.i32 user6 aligned readonly v15+16+;; @0033 v23 = load.i32 user7 aligned readonly v15+16;; @0033 v24 = icmp eq v23, v22-;; @0033 trapz v24, user7+;; @0033 trapz v24, user8;; @0033 v25 = load.i64 notrap aligned readonly v15+8;; @0033 v26 = load.i64 notrap aligned readonly v15+24;; @0033 v27 = call_indirect sig0, v25(v26, v0, v3)diff --git a/tests/disas/if-reachability-translation-0.wat b/tests/disas/if-reachability-translation-0.watindex 7172d9788b..7b944957d4 100644--- a/tests/disas/if-reachability-translation-0.wat+++ b/tests/disas/if-reachability-translation-0.wat@@ -20,5 +20,5 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @0019 trap user11+;; @0019 trap user12;; }diff --git a/tests/disas/if-reachability-translation-2.wat b/tests/disas/if-reachability-translation-2.watindex 208fca857e..c413a0ac17 100644--- a/tests/disas/if-reachability-translation-2.wat+++ b/tests/disas/if-reachability-translation-2.wat@@ -20,7 +20,7 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @001d trapnz v2, user11+;; @001d trapnz v2, user12;; @001b jump block4;;;; block4:diff --git a/tests/disas/if-reachability-translation-3.wat b/tests/disas/if-reachability-translation-3.watindex 5c046bb4b4..c6233d977e 100644--- a/tests/disas/if-reachability-translation-3.wat+++ b/tests/disas/if-reachability-translation-3.wat@@ -20,7 +20,7 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @001f trapz v2, user11+;; @001f trapz v2, user12;; @001b jump block2;;;; block2:diff --git a/tests/disas/if-reachability-translation-4.wat b/tests/disas/if-reachability-translation-4.watindex 8fbfb6447b..213af80366 100644--- a/tests/disas/if-reachability-translation-4.wat+++ b/tests/disas/if-reachability-translation-4.wat@@ -20,9 +20,9 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32):-;; @001d trapnz v2, user11+;; @001d trapnz v2, user12;; @001b jump block4;;;; block4:-;; @001f trap user11+;; @001f trap user12;; }diff --git a/tests/disas/if-reachability-translation-5.wat b/tests/disas/if-reachability-translation-5.watindex 380fe8cdf4..e9c6eb67d5 100644--- a/tests/disas/if-reachability-translation-5.wat+++ b/tests/disas/if-reachability-translation-5.wat@@ -22,11 +22,11 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @0024 trapz v2, user11+;; @0024 trapz v2, user12;; @001c jump block2;;;; block2:-;; @0022 trapz.i32 v3, user11+;; @0022 trapz.i32 v3, user12;; @0020 jump block3;;;; block3:diff --git a/tests/disas/if-reachability-translation-6.wat b/tests/disas/if-reachability-translation-6.watindex 285e03749b..ba3a7e97e9 100644--- a/tests/disas/if-reachability-translation-6.wat+++ b/tests/disas/if-reachability-translation-6.wat@@ -22,11 +22,11 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):-;; @001e trapnz v2, user11+;; @001e trapnz v2, user12;; @001c jump block4;;;; block4:-;; @0024 trapz.i32 v3, user11+;; @0024 trapz.i32 v3, user12;; @0022 jump block3;;;; block3:diff --git a/tests/disas/if-unreachable-else-params-2.wat b/tests/disas/if-unreachable-else-params-2.watindex 407a59765c..36299c334c 100644--- a/tests/disas/if-unreachable-else-params-2.wat+++ b/tests/disas/if-unreachable-else-params-2.wat@@ -30,7 +30,7 @@;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32):;; @0049 v5 = f64const 0x1.0000000000000p0-;; @005d trapz v3, user11+;; @005d trapz v3, user12;; @0056 jump block2;;;; block2:diff --git a/tests/disas/if-unreachable-else-params.wat b/tests/disas/if-unreachable-else-params.watindex 970876e6ea..21d1e89b4f 100644--- a/tests/disas/if-unreachable-else-params.wat+++ b/tests/disas/if-unreachable-else-params.wat@@ -63,7 +63,7 @@;; @004b v8 = load.i64 notrap aligned readonly can_move v0+56;; @004b v9 = iadd v8, v7;; @004b v10 = sload16.i64 little heap v9-;; @004e trap user11+;; @004e trap user12;;;; block6:;; @005d v11 = popcnt.i32 v3 ; v3 = 35diff --git a/tests/disas/indirect-call-no-caching.wat b/tests/disas/indirect-call-no-caching.watindex ca2a591dd9..3f7e14f6a1 100644--- a/tests/disas/indirect-call-no-caching.wat+++ b/tests/disas/indirect-call-no-caching.wat@@ -83,7 +83,7 @@;; @0050 v9 = iadd v7, v8;; @0050 v10 = iconst.i64 0;; @0050 v11 = select_spectre_guard v5, v10, v9 ; v10 = 0-;; @0050 v12 = load.i64 user5 aligned table v11+;; @0050 v12 = load.i64 user6 aligned table v11;; v27 = iconst.i64 -2;; @0050 v13 = band v12, v27 ; v27 = -2;; @0050 brif v12, block3(v13), block2@@ -97,9 +97,9 @@;; block3(v14: i64):;; @0050 v20 = load.i64 notrap aligned readonly can_move v0+40;; @0050 v21 = load.i32 notrap aligned readonly can_move v20-;; @0050 v22 = load.i32 user6 aligned readonly v14+16+;; @0050 v22 = load.i32 user7 aligned readonly v14+16;; @0050 v23 = icmp eq v22, v21-;; @0050 trapz v23, user7+;; @0050 trapz v23, user8;; @0050 v24 = load.i64 notrap aligned readonly v14+8;; @0050 v25 = load.i64 notrap aligned readonly v14+24;; @0050 v26 = call_indirect sig0, v24(v25, v0)diff --git a/tests/disas/metadata-for-internal-asserts.wat b/tests/disas/metadata-for-internal-asserts.watnew file mode 100644index 0000000000..1a8312d70e--- /dev/null+++ b/tests/disas/metadata-for-internal-asserts.wat@@ -0,0 +1,48 @@+;;! target = "x86_64"+;;! test = 'compile'+;;! flags = '-Ccranelift-wasmtime_debug_checks=on -Cmetadata-for-internal-asserts'+;;! objdump = '--funcs all'++(module (func))++;; wasm[0]::function[0]:+;; pushq %rbp+;; movq %rsp, %rbp+;; movq %rbp, %rsp+;; popq %rbp+;; retq+;;+;; signatures[0]::wasm_to_array_trampoline:+;; pushq %rbp+;; movq %rsp, %rbp+;; subq $0x10, %rsp+;; movq %rbx, (%rsp)+;; movl (%rsi), %eax+;; cmpl $0x65726f63, %eax+;; jne 0x70+;; 22: movq 8(%rsi), %rax+;; movq %rbp, %rcx+;; movq %rcx, 0x30(%rax)+;; movq %rbp, %rcx+;; movq 8(%rcx), %rcx+;; movq %rcx, 0x38(%rax)+;; movq 8(%rdi), %r8+;; leaq (%rsp), %rdx+;; xorq %rcx, %rcx+;; movq %rsi, %rbx+;; callq *%r8+;; testb %al, %al+;; je 0x5e+;; 51: movq (%rsp), %rbx+;; addq $0x10, %rsp+;; movq %rbp, %rsp+;; popq %rbp+;; retq+;; 5e: movq 0x10(%rbx), %rax+;; 62: movq 0x1a0(%rax), %rax+;; 69: movq %rbx, %rdi+;; 6c: callq *%rax+;; 6e: ud2+;; ╰─╼ trap: InternalAssert+;; 70: ud2+;; ╰─╼ trap: InternalAssertdiff --git a/tests/disas/pr2559.wat b/tests/disas/pr2559.watindex 5f66e5d7f2..d7594df356 100644--- a/tests/disas/pr2559.wat+++ b/tests/disas/pr2559.wat@@ -86,7 +86,7 @@;; @0044 v22 = iconst.i32 87;; @0047 v23 = bitcast.i8x16 little v15;; @0047 v24 = select.i8x16 v22, v8, v23 ; v22 = 87-;; @0048 trap user11+;; @0048 trap user12;;;; block1(v4: i8x16):;; @0055 return v5, v8, v4@@ -126,7 +126,7 @@;; @006e v22 = iconst.i32 87;; @0071 v23 = bitcast.i8x16 little v15;; @0071 v24 = select.i8x16 v22, v8, v23 ; v22 = 87-;; @0074 trap user11+;; @0074 trap user12;;;; block1(v4: i8x16):;; @0081 return v5, v8, v4diff --git a/tests/disas/readonly-funcrefs.wat b/tests/disas/readonly-funcrefs.watindex 7b48c46313..8e70e114b1 100644--- a/tests/disas/readonly-funcrefs.wat+++ b/tests/disas/readonly-funcrefs.wat@@ -52,7 +52,7 @@;; @0031 v7 = ishl v5, v26 ; v26 = 3;; @0031 v8 = iadd v6, v7;; @0031 v10 = select_spectre_guard v4, v9, v8 ; v9 = 0-;; @0031 v11 = load.i64 user5 aligned table v10+;; @0031 v11 = load.i64 user6 aligned table v10;; v25 = iconst.i64 -2;; @0031 v12 = band v11, v25 ; v25 = -2;; @0031 brif v11, block3(v12), block2@@ -63,11 +63,11 @@;; @0031 jump block3(v17);;;; block3(v13: i64):-;; @0031 v21 = load.i32 user6 aligned readonly v13+16+;; @0031 v21 = load.i32 user7 aligned readonly v13+16;; @0031 v19 = load.i64 notrap aligned readonly can_move v0+40;; @0031 v20 = load.i32 notrap aligned readonly can_move v19;; @0031 v22 = icmp eq v21, v20-;; @0031 trapz v22, user7+;; @0031 trapz v22, user8;; @0031 v23 = load.i64 notrap aligned readonly v13+8;; @0031 v24 = load.i64 notrap aligned readonly v13+24;; @0031 call_indirect sig0, v23(v24, v0)diff --git a/tests/disas/ref-func-0.wat b/tests/disas/ref-func-0.watindex 486d5d628b..cc8711eeac 100644--- a/tests/disas/ref-func-0.wat+++ b/tests/disas/ref-func-0.wat@@ -40,35 +40,35 @@;; @008f v109 = load.i64 notrap aligned readonly can_move v0+8;; @008f v14 = load.i64 notrap aligned readonly can_move v109+32;; @008f v15 = iadd v14, v13-;; @008f v16 = load.i32 notrap aligned v15+;; @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 v0+32-;; @008f v21 = load.i32 notrap aligned v20+;; @008f v21 = load.i32 user2 v20;; @008f v22 = uextend.i64 v8;; @008f v107 = load.i64 notrap aligned readonly can_move v0+8;; @008f v23 = load.i64 notrap aligned readonly can_move v107+32;; @008f v24 = iadd v23, v22;; @008f v25 = iconst.i64 16;; @008f v26 = iadd v24, v25 ; v25 = 16-;; @008f store notrap aligned v21, v26+;; @008f store user2 v21, v26;; @008f v27 = iconst.i32 2;; @008f v28 = bor.i32 v16, v27 ; v27 = 2;; @008f v29 = uextend.i64 v8;; @008f v105 = load.i64 notrap aligned readonly can_move v0+8;; @008f v30 = load.i64 notrap aligned readonly can_move v105+32;; @008f v31 = iadd v30, v29-;; @008f store notrap aligned v28, v31+;; @008f store user2 v28, v31;; @008f v32 = uextend.i64 v8;; @008f v103 = load.i64 notrap aligned readonly can_move v0+8;; @008f v33 = load.i64 notrap aligned readonly can_move v103+32;; @008f v34 = iadd v33, v32;; @008f v35 = iconst.i64 8;; @008f v36 = iadd v34, v35 ; v35 = 8-;; @008f v37 = load.i64 notrap aligned v36+;; @008f v37 = load.i64 user2 v36;; v102 = iconst.i64 1;; @008f v38 = iadd v37, v102 ; v102 = 1;; @008f v39 = uextend.i64 v8@@ -77,8 +77,8 @@;; @008f v41 = iadd v40, v39;; @008f v42 = iconst.i64 8;; @008f v43 = iadd v41, v42 ; v42 = 8-;; @008f store notrap aligned v38, v43-;; @008f store.i32 notrap aligned v8, v20+;; @008f store user2 v38, v43+;; @008f store.i32 user2 v8, v20;; @008f jump block4;;;; block4:@@ -98,35 +98,35 @@;; @0091 v95 = load.i64 notrap aligned readonly can_move v0+8;; @0091 v52 = load.i64 notrap aligned readonly can_move v95+32;; @0091 v53 = iadd v52, v51-;; @0091 v54 = load.i32 notrap aligned v53+;; @0091 v54 = load.i32 user2 v53;; @0091 v55 = iconst.i32 2;; @0091 v56 = band v54, v55 ; v55 = 2;; @0091 brif v56, block7, block6;;;; block6:;; @0091 v58 = load.i64 notrap aligned readonly v0+32-;; @0091 v59 = load.i32 notrap aligned v58+;; @0091 v59 = load.i32 user2 v58;; @0091 v60 = uextend.i64 v46;; @0091 v93 = load.i64 notrap aligned readonly can_move v0+8;; @0091 v61 = load.i64 notrap aligned readonly can_move v93+32;; @0091 v62 = iadd v61, v60;; @0091 v63 = iconst.i64 16;; @0091 v64 = iadd v62, v63 ; v63 = 16-;; @0091 store notrap aligned v59, v64+;; @0091 store user2 v59, v64;; @0091 v65 = iconst.i32 2;; @0091 v66 = bor.i32 v54, v65 ; v65 = 2;; @0091 v67 = uextend.i64 v46;; @0091 v91 = load.i64 notrap aligned readonly can_move v0+8;; @0091 v68 = load.i64 notrap aligned readonly can_move v91+32;; @0091 v69 = iadd v68, v67-;; @0091 store notrap aligned v66, v69+;; @0091 store user2 v66, v69;; @0091 v70 = uextend.i64 v46;; @0091 v89 = load.i64 notrap aligned readonly can_move v0+8;; @0091 v71 = load.i64 notrap aligned readonly can_move v89+32;; @0091 v72 = iadd v71, v70;; @0091 v73 = iconst.i64 8;; @0091 v74 = iadd v72, v73 ; v73 = 8-;; @0091 v75 = load.i64 notrap aligned v74+;; @0091 v75 = load.i64 user2 v74;; v88 = iconst.i64 1;; @0091 v76 = iadd v75, v88 ; v88 = 1;; @0091 v77 = uextend.i64 v46@@ -135,8 +135,8 @@;; @0091 v79 = iadd v78, v77;; @0091 v80 = iconst.i64 8;; @0091 v81 = iadd v79, v80 ; v80 = 8-;; @0091 store notrap aligned v76, v81-;; @0091 store.i32 notrap aligned v46, v58+;; @0091 store user2 v76, v81+;; @0091 store.i32 user2 v46, v58;; @0091 jump block7;;;; block7:diff --git a/tests/disas/riscv64-component-builtins-asm.wat b/tests/disas/riscv64-component-builtins-asm.watindex 5d93705b9a..52dd6ed23c 100644--- a/tests/disas/riscv64-component-builtins-asm.wat+++ b/tests/disas/riscv64-component-builtins-asm.wat@@ -30,7 +30,7 @@;; andi a1, a1, 1;; bnez a1, 8;; .byte 0x00, 0x00, 0x00, 0x00-;; ╰─╼ trap: CannotLeaveComponent+;; ╰─╼ trap: Normal(CannotLeaveComponent);; ld a1, 8(a0);; ld a5, 0x10(a1);; mv a4, zerodiff --git a/tests/disas/riscv64-component-builtins.wat b/tests/disas/riscv64-component-builtins.watindex 67ee547433..d202882c5d 100644--- a/tests/disas/riscv64-component-builtins.wat+++ b/tests/disas/riscv64-component-builtins.wat@@ -23,7 +23,7 @@;; v6 = load.i32 notrap aligned v0+32;; v17 = iconst.i32 1;; v7 = band v6, v17 ; v17 = 1-;; trapz v7, user25+;; trapz v7, user26;; v10 = load.i64 notrap aligned readonly v0+8;; v11 = load.i64 notrap aligned readonly v10+16;; v8 = iconst.i32 0diff --git a/tests/disas/stack-switching/resume-suspend-data-passing.wat b/tests/disas/stack-switching/resume-suspend-data-passing.watindex 436a9de699..e64a971569 100644--- a/tests/disas/stack-switching/resume-suspend-data-passing.wat+++ b/tests/disas/stack-switching/resume-suspend-data-passing.wat@@ -68,7 +68,7 @@;; block4(v11: i64, v12: i64, v52: i32):;; v73 = iconst.i64 1;; v74 = icmp eq v11, v73 ; v73 = 1-;; @0044 trapnz v74, user21+;; @0044 trapnz v74, user22;; @0044 jump block5;;;; block5:@@ -159,7 +159,7 @@;; block0(v0: i64, v1: i64):;; @0056 v2 = iconst.i32 0;; @0056 v4 = call fn0(v0, v2) ; v2 = 0-;; @0058 trapz v4, user15+;; @0058 trapz v4, user16;; @0058 v8 = call fn1(v0, v4, v2, v2) ; v2 = 0, v2 = 0;; @0058 v9 = load.i64 notrap aligned v8+72;; @0058 v11 = uextend.i128 v9@@ -188,13 +188,13 @@;;;; block5:;; @0062 v18 = ireduce.i64 v16-;; @0062 trapz v18, user15+;; @0062 trapz v18, user16;; @0062 v21 = load.i64 notrap aligned v18+72;; v128 = iconst.i64 64;; v129 = ushr.i128 v16, v128 ; v128 = 64;; @0062 v20 = ireduce.i64 v129;; @0062 v22 = icmp eq v21, v20-;; @0062 trapz v22, user22+;; @0062 trapz v22, user23;; v130 = iconst.i64 1;; v131 = iadd v21, v130 ; v130 = 1;; @0062 store notrap aligned v131, v18+72@@ -267,7 +267,7 @@;; @0062 jump block8;;;; block9 cold:-;; @0062 trap user11+;; @0062 trap user12;;;; block10:;; v98 = iconst.i64 120diff --git a/tests/disas/stack-switching/resume-suspend.wat b/tests/disas/stack-switching/resume-suspend.watindex 8701a16710..3505ddb759 100644--- a/tests/disas/stack-switching/resume-suspend.wat+++ b/tests/disas/stack-switching/resume-suspend.wat@@ -41,7 +41,7 @@;; block2(v8: i64, v9: i64):;; v62 = iconst.i64 1;; v63 = icmp eq v8, v62 ; v62 = 1-;; @003b trapnz v63, user21+;; @003b trapnz v63, user22;; @003b jump block3;;;; block3:@@ -120,7 +120,7 @@;; block0(v0: i64, v1: i64):;; @0043 v7 = iconst.i32 0;; @0043 v9 = call fn0(v0, v7) ; v7 = 0-;; @0045 trapz v9, user15+;; @0045 trapz v9, user16;; @0045 v13 = call fn1(v0, v9, v7, v7) ; v7 = 0, v7 = 0;; @0045 v14 = load.i64 notrap aligned v13+72;; @004e jump block3@@ -131,14 +131,14 @@;; v134 = ishl v16, v130 ; v130 = 64;; v136 = ireduce.i64 v134;; v138 = bor v136, v13-;; @004e trapz v138, user15+;; @004e trapz v138, user16;; @004e v24 = load.i64 notrap aligned v138+72;; @0045 v15 = uextend.i128 v13;; @0045 v18 = bor v134, v15;; v140 = ushr v18, v130 ; v130 = 64;; @004e v23 = ireduce.i64 v140;; @004e v25 = icmp eq v24, v23-;; @004e trapz v25, user22+;; @004e trapz v25, user23;; v125 = iconst.i64 1;; @004e v26 = iadd v24, v125 ; v125 = 1;; @004e store notrap aligned v26, v138+72@@ -213,7 +213,7 @@;; @004e jump block6;;;; block7 cold:-;; @004e trap user11+;; @004e trap user12;;;; block8:;; v107 = iconst.i64 120diff --git a/tests/disas/stack-switching/symmetric-switch.wat b/tests/disas/stack-switching/symmetric-switch.watindex dbbcfe0ef2..faa06ffd06 100644--- a/tests/disas/stack-switching/symmetric-switch.wat+++ b/tests/disas/stack-switching/symmetric-switch.wat@@ -40,7 +40,7 @@;; block0(v0: i64, v1: i64):;; @003a v2 = iconst.i32 1;; @003a v4 = call fn0(v0, v2) ; v2 = 1-;; @003c trapz v4, user15+;; @003c trapz v4, user16;; @003c v5 = iconst.i32 1;; @003c v6 = iconst.i32 0;; @003c v8 = call fn1(v0, v4, v5, v6) ; v5 = 1, v6 = 0@@ -56,10 +56,10 @@;; v137 = uextend.i128 v136 ; v136 = 64;; @003e v16 = ushr v13, v137;; @003e v17 = ireduce.i64 v16-;; @003e trapz v15, user15+;; @003e trapz v15, user16;; @003e v18 = load.i64 notrap aligned v15+72;; @003e v19 = icmp eq v18, v17-;; @003e trapz v19, user22+;; @003e trapz v19, user23;; v135 = iconst.i64 1;; @003e v20 = iadd v18, v135 ; v135 = 1;; @003e store notrap aligned v20, v15+72@@ -73,7 +73,7 @@;; block2(v26: i64, v27: i64):;; v133 = iconst.i64 1;; @003e v28 = icmp eq v26, v133 ; v133 = 1-;; @003e trapnz v28, user21+;; @003e trapnz v28, user22;; @003e jump block3;;;; block3:@@ -255,7 +255,7 @@;; block0(v0: i64, v1: i64):;; @0047 v2 = iconst.i32 0;; @0047 v4 = call fn0(v0, v2) ; v2 = 0-;; @0049 trapz v4, user15+;; @0049 trapz v4, user16;; @0049 v5 = iconst.i32 0;; @0049 v6 = iconst.i32 0;; @0049 v8 = call fn1(v0, v4, v5, v6) ; v5 = 0, v6 = 0@@ -274,10 +274,10 @@;; v110 = uextend.i128 v109 ; v109 = 64;; @004b v16 = ushr.i128 v13, v110;; @004b v17 = ireduce.i64 v16-;; @004b trapz v15, user15+;; @004b trapz v15, user16;; @004b v18 = load.i64 notrap aligned v15+72;; @004b v19 = icmp eq v18, v17-;; @004b trapz v19, user22+;; @004b trapz v19, user23;; v108 = iconst.i64 1;; @004b v20 = iadd v18, v108 ; v108 = 1;; @004b store notrap aligned v20, v15+72@@ -384,7 +384,7 @@;; @004b jump block5;;;; block6 cold:-;; @004b trap user11+;; @004b trap user12;;;; block5:;; @004b br_table v70, block6, []diff --git a/tests/disas/table-get-fixed-size.wat b/tests/disas/table-get-fixed-size.watindex fb858954c4..10e24956d0 100644--- a/tests/disas/table-get-fixed-size.wat+++ b/tests/disas/table-get-fixed-size.wat@@ -37,7 +37,7 @@;; @0054 v9 = iadd v7, v8;; @0054 v10 = iconst.i64 0;; @0054 v11 = select_spectre_guard v5, v10, v9 ; v10 = 0-;; @0054 v12 = load.i32 user5 aligned table v11+;; @0054 v12 = load.i32 user6 aligned table v11;; v60 = iconst.i32 1;; @0054 v13 = band v12, v60 ; v60 = 1;; v59 = iconst.i32 0@@ -51,35 +51,35 @@;; @0054 v57 = load.i64 notrap aligned readonly can_move v0+8;; @0054 v18 = load.i64 notrap aligned readonly can_move v57+32;; @0054 v19 = iadd v18, v17-;; @0054 v20 = load.i32 notrap aligned v19+;; @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 v0+32-;; @0054 v25 = load.i32 notrap aligned v24+;; @0054 v25 = load.i32 user2 v24;; @0054 v26 = uextend.i64 v12;; @0054 v55 = load.i64 notrap aligned readonly can_move v0+8;; @0054 v27 = load.i64 notrap aligned readonly can_move v55+32;; @0054 v28 = iadd v27, v26;; @0054 v29 = iconst.i64 16;; @0054 v30 = iadd v28, v29 ; v29 = 16-;; @0054 store notrap aligned v25, v30+;; @0054 store user2 v25, v30;; @0054 v31 = iconst.i32 2;; @0054 v32 = bor.i32 v20, v31 ; v31 = 2;; @0054 v33 = uextend.i64 v12;; @0054 v53 = load.i64 notrap aligned readonly can_move v0+8;; @0054 v34 = load.i64 notrap aligned readonly can_move v53+32;; @0054 v35 = iadd v34, v33-;; @0054 store notrap aligned v32, v35+;; @0054 store user2 v32, v35;; @0054 v36 = uextend.i64 v12;; @0054 v51 = load.i64 notrap aligned readonly can_move v0+8;; @0054 v37 = load.i64 notrap aligned readonly can_move v51+32;; @0054 v38 = iadd v37, v36;; @0054 v39 = iconst.i64 8;; @0054 v40 = iadd v38, v39 ; v39 = 8-;; @0054 v41 = load.i64 notrap aligned v40+;; @0054 v41 = load.i64 user2 v40;; v50 = iconst.i64 1;; @0054 v42 = iadd v41, v50 ; v50 = 1;; @0054 v43 = uextend.i64 v12@@ -88,8 +88,8 @@;; @0054 v45 = iadd v44, v43;; @0054 v46 = iconst.i64 8;; @0054 v47 = iadd v45, v46 ; v46 = 8-;; @0054 store notrap aligned v42, v47-;; @0054 store.i32 notrap aligned v12, v24+;; @0054 store user2 v42, v47+;; @0054 store.i32 user2 v12, v24;; @0054 jump block4;;;; block4:@@ -120,7 +120,7 @@;; @005b v9 = iadd v7, v8;; @005b v10 = iconst.i64 0;; @005b v11 = select_spectre_guard v5, v10, v9 ; v10 = 0-;; @005b v12 = load.i32 user5 aligned table v11+;; @005b v12 = load.i32 user6 aligned table v11;; v60 = iconst.i32 1;; @005b v13 = band v12, v60 ; v60 = 1;; v59 = iconst.i32 0@@ -134,35 +134,35 @@;; @005b v57 = load.i64 notrap aligned readonly can_move v0+8;; @005b v18 = load.i64 notrap aligned readonly can_move v57+32;; @005b v19 = iadd v18, v17-;; @005b v20 = load.i32 notrap aligned v19+;; @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 v0+32-;; @005b v25 = load.i32 notrap aligned v24+;; @005b v25 = load.i32 user2 v24;; @005b v26 = uextend.i64 v12;; @005b v55 = load.i64 notrap aligned readonly can_move v0+8;; @005b v27 = load.i64 notrap aligned readonly can_move v55+32;; @005b v28 = iadd v27, v26;; @005b v29 = iconst.i64 16;; @005b v30 = iadd v28, v29 ; v29 = 16-;; @005b store notrap aligned v25, v30+;; @005b store user2 v25, v30;; @005b v31 = iconst.i32 2;; @005b v32 = bor.i32 v20, v31 ; v31 = 2;; @005b v33 = uextend.i64 v12;; @005b v53 = load.i64 notrap aligned readonly can_move v0+8;; @005b v34 = load.i64 notrap aligned readonly can_move v53+32;; @005b v35 = iadd v34, v33-;; @005b store notrap aligned v32, v35+;; @005b store user2 v32, v35;; @005b v36 = uextend.i64 v12;; @005b v51 = load.i64 notrap aligned readonly can_move v0+8;; @005b v37 = load.i64 notrap aligned readonly can_move v51+32;; @005b v38 = iadd v37, v36;; @005b v39 = iconst.i64 8;; @005b v40 = iadd v38, v39 ; v39 = 8-;; @005b v41 = load.i64 notrap aligned v40+;; @005b v41 = load.i64 user2 v40;; v50 = iconst.i64 1;; @005b v42 = iadd v41, v50 ; v50 = 1;; @005b v43 = uextend.i64 v12@@ -171,8 +171,8 @@;; @005b v45 = iadd v44, v43;; @005b v46 = iconst.i64 8;; @005b v47 = iadd v45, v46 ; v46 = 8-;; @005b store notrap aligned v42, v47-;; @005b store.i32 notrap aligned v12, v24+;; @005b store user2 v42, v47+;; @005b store.i32 user2 v12, v24;; @005b jump block4;;;; block4:diff --git a/tests/disas/table-get.wat b/tests/disas/table-get.watindex 8b807242be..9d798e3712 100644--- a/tests/disas/table-get.wat+++ b/tests/disas/table-get.wat@@ -38,7 +38,7 @@;; @0053 v10 = iadd v8, v9;; @0053 v11 = iconst.i64 0;; @0053 v12 = select_spectre_guard v6, v11, v10 ; v11 = 0-;; @0053 v13 = load.i32 user5 aligned table v12+;; @0053 v13 = load.i32 user6 aligned table v12;; v61 = iconst.i32 1;; @0053 v14 = band v13, v61 ; v61 = 1;; v60 = iconst.i32 0@@ -52,35 +52,35 @@;; @0053 v58 = load.i64 notrap aligned readonly can_move v0+8;; @0053 v19 = load.i64 notrap aligned readonly can_move v58+32;; @0053 v20 = iadd v19, v18-;; @0053 v21 = load.i32 notrap aligned v20+;; @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 v0+32-;; @0053 v26 = load.i32 notrap aligned v25+;; @0053 v26 = load.i32 user2 v25;; @0053 v27 = uextend.i64 v13;; @0053 v56 = load.i64 notrap aligned readonly can_move v0+8;; @0053 v28 = load.i64 notrap aligned readonly can_move v56+32;; @0053 v29 = iadd v28, v27;; @0053 v30 = iconst.i64 16;; @0053 v31 = iadd v29, v30 ; v30 = 16-;; @0053 store notrap aligned v26, v31+;; @0053 store user2 v26, v31;; @0053 v32 = iconst.i32 2;; @0053 v33 = bor.i32 v21, v32 ; v32 = 2;; @0053 v34 = uextend.i64 v13;; @0053 v54 = load.i64 notrap aligned readonly can_move v0+8;; @0053 v35 = load.i64 notrap aligned readonly can_move v54+32;; @0053 v36 = iadd v35, v34-;; @0053 store notrap aligned v33, v36+;; @0053 store user2 v33, v36;; @0053 v37 = uextend.i64 v13;; @0053 v52 = load.i64 notrap aligned readonly can_move v0+8;; @0053 v38 = load.i64 notrap aligned readonly can_move v52+32;; @0053 v39 = iadd v38, v37;; @0053 v40 = iconst.i64 8;; @0053 v41 = iadd v39, v40 ; v40 = 8-;; @0053 v42 = load.i64 notrap aligned v41+;; @0053 v42 = load.i64 user2 v41;; v51 = iconst.i64 1;; @0053 v43 = iadd v42, v51 ; v51 = 1;; @0053 v44 = uextend.i64 v13@@ -89,8 +89,8 @@;; @0053 v46 = iadd v45, v44;; @0053 v47 = iconst.i64 8;; @0053 v48 = iadd v46, v47 ; v47 = 8-;; @0053 store notrap aligned v43, v48-;; @0053 store.i32 notrap aligned v13, v25+;; @0053 store user2 v43, v48+;; @0053 store.i32 user2 v13, v25;; @0053 jump block4;;;; block4:@@ -123,7 +123,7 @@;; @005a v10 = iadd v8, v9;; @005a v11 = iconst.i64 0;; @005a v12 = select_spectre_guard v6, v11, v10 ; v11 = 0-;; @005a v13 = load.i32 user5 aligned table v12+;; @005a v13 = load.i32 user6 aligned table v12;; v61 = iconst.i32 1;; @005a v14 = band v13, v61 ; v61 = 1;; v60 = iconst.i32 0@@ -137,35 +137,35 @@;; @005a v58 = load.i64 notrap aligned readonly can_move v0+8;; @005a v19 = load.i64 notrap aligned readonly can_move v58+32;; @005a v20 = iadd v19, v18-;; @005a v21 = load.i32 notrap aligned v20+;; @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 v0+32-;; @005a v26 = load.i32 notrap aligned v25+;; @005a v26 = load.i32 user2 v25;; @005a v27 = uextend.i64 v13;; @005a v56 = load.i64 notrap aligned readonly can_move v0+8;; @005a v28 = load.i64 notrap aligned readonly can_move v56+32;; @005a v29 = iadd v28, v27;; @005a v30 = iconst.i64 16;; @005a v31 = iadd v29, v30 ; v30 = 16-;; @005a store notrap aligned v26, v31+;; @005a store user2 v26, v31;; @005a v32 = iconst.i32 2;; @005a v33 = bor.i32 v21, v32 ; v32 = 2;; @005a v34 = uextend.i64 v13;; @005a v54 = load.i64 notrap aligned readonly can_move v0+8;; @005a v35 = load.i64 notrap aligned readonly can_move v54+32;; @005a v36 = iadd v35, v34-;; @005a store notrap aligned v33, v36+;; @005a store user2 v33, v36;; @005a v37 = uextend.i64 v13;; @005a v52 = load.i64 notrap aligned readonly can_move v0+8;; @005a v38 = load.i64 notrap aligned readonly can_move v52+32;; @005a v39 = iadd v38, v37;; @005a v40 = iconst.i64 8;; @005a v41 = iadd v39, v40 ; v40 = 8-;; @005a v42 = load.i64 notrap aligned v41+;; @005a v42 = load.i64 user2 v41;; v51 = iconst.i64 1;; @005a v43 = iadd v42, v51 ; v51 = 1;; @005a v44 = uextend.i64 v13@@ -174,8 +174,8 @@;; @005a v46 = iadd v45, v44;; @005a v47 = iconst.i64 8;; @005a v48 = iadd v46, v47 ; v47 = 8-;; @005a store notrap aligned v43, v48-;; @005a store.i32 notrap aligned v13, v25+;; @005a store user2 v43, v48+;; @005a store.i32 user2 v13, v25;; @005a jump block4;;;; block4:diff --git a/tests/disas/table-set-fixed-size.wat b/tests/disas/table-set-fixed-size.watindex 2123283c5f..15af7f10f6 100644--- a/tests/disas/table-set-fixed-size.wat+++ b/tests/disas/table-set-fixed-size.wat@@ -40,7 +40,7 @@;; @0056 v9 = iadd v7, v8;; @0056 v10 = iconst.i64 0;; @0056 v11 = select_spectre_guard v5, v10, v9 ; v10 = 0-;; @0056 v12 = load.i32 user5 aligned table v11+;; @0056 v12 = load.i32 user6 aligned table v11;; v61 = iconst.i32 1;; @0056 v13 = band v2, v61 ; v61 = 1;; v60 = iconst.i32 0@@ -56,7 +56,7 @@;; @0056 v19 = iadd v18, v17;; @0056 v20 = iconst.i64 8;; @0056 v21 = iadd v19, v20 ; v20 = 8-;; @0056 v22 = load.i64 notrap aligned v21+;; @0056 v22 = load.i64 user2 v21;; v57 = iconst.i64 1;; @0056 v23 = iadd v22, v57 ; v57 = 1;; @0056 v24 = uextend.i64 v2@@ -65,11 +65,11 @@;; @0056 v26 = iadd v25, v24;; @0056 v27 = iconst.i64 8;; @0056 v28 = iadd v26, v27 ; v27 = 8-;; @0056 store notrap aligned v23, v28+;; @0056 store user2 v23, v28;; @0056 jump block3;;;; block3:-;; @0056 store.i32 user5 aligned table v2, v11+;; @0056 store.i32 user6 aligned table v2, v11;; v54 = iconst.i32 1;; @0056 v29 = band.i32 v12, v54 ; v54 = 1;; v53 = iconst.i32 0@@ -85,7 +85,7 @@;; @0056 v35 = iadd v34, v33;; @0056 v36 = iconst.i64 8;; @0056 v37 = iadd v35, v36 ; v36 = 8-;; @0056 v38 = load.i64 notrap aligned v37+;; @0056 v38 = load.i64 user2 v37;; v50 = iconst.i64 -1;; @0056 v39 = iadd v38, v50 ; v50 = -1;; v49 = iconst.i64 0@@ -103,7 +103,7 @@;; @0056 v44 = iadd v43, v42;; @0056 v45 = iconst.i64 8;; @0056 v46 = iadd v44, v45 ; v45 = 8-;; @0056 store.i64 notrap aligned v39, v46+;; @0056 store.i64 user2 v39, v46;; @0056 jump block7;;;; block7:@@ -136,7 +136,7 @@;; @005f v9 = iadd v7, v8;; @005f v10 = iconst.i64 0;; @005f v11 = select_spectre_guard v5, v10, v9 ; v10 = 0-;; @005f v12 = load.i32 user5 aligned table v11+;; @005f v12 = load.i32 user6 aligned table v11;; v61 = iconst.i32 1;; @005f v13 = band v3, v61 ; v61 = 1;; v60 = iconst.i32 0@@ -152,7 +152,7 @@;; @005f v19 = iadd v18, v17;; @005f v20 = iconst.i64 8;; @005f v21 = iadd v19, v20 ; v20 = 8-;; @005f v22 = load.i64 notrap aligned v21+;; @005f v22 = load.i64 user2 v21;; v57 = iconst.i64 1;; @005f v23 = iadd v22, v57 ; v57 = 1;; @005f v24 = uextend.i64 v3@@ -161,11 +161,11 @@;; @005f v26 = iadd v25, v24;; @005f v27 = iconst.i64 8;; @005f v28 = iadd v26, v27 ; v27 = 8-;; @005f store notrap aligned v23, v28+;; @005f store user2 v23, v28;; @005f jump block3;;;; block3:-;; @005f store.i32 user5 aligned table v3, v11+;; @005f store.i32 user6 aligned table v3, v11;; v54 = iconst.i32 1;; @005f v29 = band.i32 v12, v54 ; v54 = 1;; v53 = iconst.i32 0@@ -181,7 +181,7 @@;; @005f v35 = iadd v34, v33;; @005f v36 = iconst.i64 8;; @005f v37 = iadd v35, v36 ; v36 = 8-;; @005f v38 = load.i64 notrap aligned v37+;; @005f v38 = load.i64 user2 v37;; v50 = iconst.i64 -1;; @005f v39 = iadd v38, v50 ; v50 = -1;; v49 = iconst.i64 0@@ -199,7 +199,7 @@;; @005f v44 = iadd v43, v42;; @005f v45 = iconst.i64 8;; @005f v46 = iadd v44, v45 ; v45 = 8-;; @005f store.i64 notrap aligned v39, v46+;; @005f store.i64 user2 v39, v46;; @005f jump block7;;;; block7:diff --git a/tests/disas/table-set.wat b/tests/disas/table-set.watindex fd50e78534..9b2b4b4a70 100644--- a/tests/disas/table-set.wat+++ b/tests/disas/table-set.wat@@ -42,7 +42,7 @@;; @0055 v10 = iadd v8, v9;; @0055 v11 = iconst.i64 0;; @0055 v12 = select_spectre_guard v6, v11, v10 ; v11 = 0-;; @0055 v13 = load.i32 user5 aligned table v12+;; @0055 v13 = load.i32 user6 aligned table v12;; v62 = iconst.i32 1;; @0055 v14 = band v2, v62 ; v62 = 1;; v61 = iconst.i32 0@@ -58,7 +58,7 @@;; @0055 v20 = iadd v19, v18;; @0055 v21 = iconst.i64 8;; @0055 v22 = iadd v20, v21 ; v21 = 8-;; @0055 v23 = load.i64 notrap aligned v22+;; @0055 v23 = load.i64 user2 v22;; v58 = iconst.i64 1;; @0055 v24 = iadd v23, v58 ; v58 = 1;; @0055 v25 = uextend.i64 v2@@ -67,11 +67,11 @@;; @0055 v27 = iadd v26, v25;; @0055 v28 = iconst.i64 8;; @0055 v29 = iadd v27, v28 ; v28 = 8-;; @0055 store notrap aligned v24, v29+;; @0055 store user2 v24, v29;; @0055 jump block3;;;; block3:-;; @0055 store.i32 user5 aligned table v2, v12+;; @0055 store.i32 user6 aligned table v2, v12;; v55 = iconst.i32 1;; @0055 v30 = band.i32 v13, v55 ; v55 = 1;; v54 = iconst.i32 0@@ -87,7 +87,7 @@;; @0055 v36 = iadd v35, v34;; @0055 v37 = iconst.i64 8;; @0055 v38 = iadd v36, v37 ; v37 = 8-;; @0055 v39 = load.i64 notrap aligned v38+;; @0055 v39 = load.i64 user2 v38;; v51 = iconst.i64 -1;; @0055 v40 = iadd v39, v51 ; v51 = -1;; v50 = iconst.i64 0@@ -105,7 +105,7 @@;; @0055 v45 = iadd v44, v43;; @0055 v46 = iconst.i64 8;; @0055 v47 = iadd v45, v46 ; v46 = 8-;; @0055 store.i64 notrap aligned v40, v47+;; @0055 store.i64 user2 v40, v47;; @0055 jump block7;;;; block7:@@ -140,7 +140,7 @@;; @005e v10 = iadd v8, v9;; @005e v11 = iconst.i64 0;; @005e v12 = select_spectre_guard v6, v11, v10 ; v11 = 0-;; @005e v13 = load.i32 user5 aligned table v12+;; @005e v13 = load.i32 user6 aligned table v12;; v62 = iconst.i32 1;; @005e v14 = band v3, v62 ; v62 = 1;; v61 = iconst.i32 0@@ -156,7 +156,7 @@;; @005e v20 = iadd v19, v18;; @005e v21 = iconst.i64 8;; @005e v22 = iadd v20, v21 ; v21 = 8-;; @005e v23 = load.i64 notrap aligned v22+;; @005e v23 = load.i64 user2 v22;; v58 = iconst.i64 1;; @005e v24 = iadd v23, v58 ; v58 = 1;; @005e v25 = uextend.i64 v3@@ -165,11 +165,11 @@;; @005e v27 = iadd v26, v25;; @005e v28 = iconst.i64 8;; @005e v29 = iadd v27, v28 ; v28 = 8-;; @005e store notrap aligned v24, v29+;; @005e store user2 v24, v29;; @005e jump block3;;;; block3:-;; @005e store.i32 user5 aligned table v3, v12+;; @005e store.i32 user6 aligned table v3, v12;; v55 = iconst.i32 1;; @005e v30 = band.i32 v13, v55 ; v55 = 1;; v54 = iconst.i32 0@@ -185,7 +185,7 @@;; @005e v36 = iadd v35, v34;; @005e v37 = iconst.i64 8;; @005e v38 = iadd v36, v37 ; v37 = 8-;; @005e v39 = load.i64 notrap aligned v38+;; @005e v39 = load.i64 user2 v38;; v51 = iconst.i64 -1;; @005e v40 = iadd v39, v51 ; v51 = -1;; v50 = iconst.i64 0@@ -203,7 +203,7 @@;; @005e v45 = iadd v44, v43;; @005e v46 = iconst.i64 8;; @005e v47 = iadd v45, v46 ; v46 = 8-;; @005e store.i64 notrap aligned v40, v47+;; @005e store.i64 user2 v40, v47;; @005e jump block7;;;; block7:diff --git a/tests/disas/typed-funcrefs-eager-init.wat b/tests/disas/typed-funcrefs-eager-init.watindex 9afe8cf195..bd688a24cf 100644--- a/tests/disas/typed-funcrefs-eager-init.wat+++ b/tests/disas/typed-funcrefs-eager-init.wat@@ -139,14 +139,14 @@;; @0048 v12 = load.i64 notrap aligned readonly can_move v0+48;; v47 = iconst.i64 8;; @0048 v14 = iadd v12, v47 ; v47 = 8-;; @0048 v17 = load.i64 user5 aligned table v14-;; @004a v18 = load.i64 user15 aligned readonly v17+8+;; @0048 v17 = load.i64 user6 aligned table v14+;; @004a v18 = load.i64 user16 aligned readonly v17+8;; @004a v19 = load.i64 notrap aligned readonly v17+24;; @004a v20 = call_indirect sig0, v18(v19, v0, v2, v3, v4, v5);; v54 = iconst.i64 16;; @005b v28 = iadd v12, v54 ; v54 = 16-;; @005b v31 = load.i64 user5 aligned table v28-;; @005d v32 = load.i64 user15 aligned readonly v31+8+;; @005b v31 = load.i64 user6 aligned table v28+;; @005d v32 = load.i64 user16 aligned readonly v31+8;; @005d v33 = load.i64 notrap aligned readonly v31+24;; @005d v34 = call_indirect sig0, v32(v33, v0, v2, v3, v4, v5);; @0066 jump block1@@ -169,14 +169,14 @@;; @0075 v12 = load.i64 notrap aligned readonly can_move v0+48;; v47 = iconst.i64 8;; @0075 v14 = iadd v12, v47 ; v47 = 8-;; @0075 v17 = load.i64 user5 aligned table v14-;; @0075 v18 = load.i64 user6 aligned readonly v17+8+;; @0075 v17 = load.i64 user6 aligned table v14+;; @0075 v18 = load.i64 user7 aligned readonly v17+8;; @0075 v19 = load.i64 notrap aligned readonly v17+24;; @0075 v20 = call_indirect sig0, v18(v19, v0, v2, v3, v4, v5);; v54 = iconst.i64 16;; @0087 v28 = iadd v12, v54 ; v54 = 16-;; @0087 v31 = load.i64 user5 aligned table v28-;; @0087 v32 = load.i64 user6 aligned readonly v31+8+;; @0087 v31 = load.i64 user6 aligned table v28+;; @0087 v32 = load.i64 user7 aligned readonly v31+8;; @0087 v33 = load.i64 notrap aligned readonly v31+24;; @0087 v34 = call_indirect sig0, v32(v33, v0, v2, v3, v4, v5);; @0091 jump block1@@ -196,11 +196,11 @@;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32, v5: i32):;; @009e v9 = load.i64 notrap aligned table v0+64-;; @00a0 v10 = load.i64 user15 aligned readonly v9+8+;; @00a0 v10 = load.i64 user16 aligned readonly v9+8;; @00a0 v11 = load.i64 notrap aligned readonly v9+24;; @00a0 v12 = call_indirect sig0, v10(v11, v0, v2, v3, v4, v5);; @00af v15 = load.i64 notrap aligned table v0+80-;; @00b1 v16 = load.i64 user15 aligned readonly v15+8+;; @00b1 v16 = load.i64 user16 aligned readonly v15+8;; @00b1 v17 = load.i64 notrap aligned readonly v15+24;; @00b1 v18 = call_indirect sig0, v16(v17, v0, v2, v3, v4, v5);; @00ba jump block1diff --git a/tests/disas/typed-funcrefs.wat b/tests/disas/typed-funcrefs.watindex da8c43224d..0adf87debc 100644--- a/tests/disas/typed-funcrefs.wat+++ b/tests/disas/typed-funcrefs.wat@@ -141,7 +141,7 @@;; @0048 v12 = load.i64 notrap aligned readonly can_move v0+48;; v67 = iconst.i64 8;; @0048 v14 = iadd v12, v67 ; v67 = 8-;; @0048 v17 = load.i64 user5 aligned table v14+;; @0048 v17 = load.i64 user6 aligned table v14;; v57 = iconst.i64 -2;; @0048 v18 = band v17, v57 ; v57 = -2;; @0048 brif v17, block3(v18), block2@@ -153,12 +153,12 @@;; @0048 jump block3(v23);;;; block3(v19: i64):-;; @004a v24 = load.i64 user15 aligned readonly v19+8+;; @004a v24 = load.i64 user16 aligned readonly v19+8;; @004a v25 = load.i64 notrap aligned readonly v19+24;; @004a v26 = call_indirect sig1, v24(v25, v0, v2, v3, v4, v5);; v74 = iconst.i64 16;; @005b v39 = iadd.i64 v12, v74 ; v74 = 16-;; @005b v42 = load.i64 user5 aligned table v39+;; @005b v42 = load.i64 user6 aligned table v39;; v75 = iconst.i64 -2;; v76 = band v42, v75 ; v75 = -2;; @005b brif v42, block5(v76), block4@@ -170,7 +170,7 @@;; @005b jump block5(v48);;;; block5(v44: i64):-;; @005d v49 = load.i64 user15 aligned readonly v44+8+;; @005d v49 = load.i64 user16 aligned readonly v44+8;; @005d v50 = load.i64 notrap aligned readonly v44+24;; @005d v51 = call_indirect sig1, v49(v50, v0, v2, v3, v4, v5);; @0066 jump block1@@ -195,7 +195,7 @@;; @0075 v12 = load.i64 notrap aligned readonly can_move v0+48;; v67 = iconst.i64 8;; @0075 v14 = iadd v12, v67 ; v67 = 8-;; @0075 v17 = load.i64 user5 aligned table v14+;; @0075 v17 = load.i64 user6 aligned table v14;; v57 = iconst.i64 -2;; @0075 v18 = band v17, v57 ; v57 = -2;; @0075 brif v17, block3(v18), block2@@ -207,12 +207,12 @@;; @0075 jump block3(v23);;;; block3(v19: i64):-;; @0075 v24 = load.i64 user6 aligned readonly v19+8+;; @0075 v24 = load.i64 user7 aligned readonly v19+8;; @0075 v25 = load.i64 notrap aligned readonly v19+24;; @0075 v26 = call_indirect sig0, v24(v25, v0, v2, v3, v4, v5);; v74 = iconst.i64 16;; @0087 v39 = iadd.i64 v12, v74 ; v74 = 16-;; @0087 v42 = load.i64 user5 aligned table v39+;; @0087 v42 = load.i64 user6 aligned table v39;; v75 = iconst.i64 -2;; v76 = band v42, v75 ; v75 = -2;; @0087 brif v42, block5(v76), block4@@ -224,7 +224,7 @@;; @0087 jump block5(v48);;;; block5(v44: i64):-;; @0087 v49 = load.i64 user6 aligned readonly v44+8+;; @0087 v49 = load.i64 user7 aligned readonly v44+8;; @0087 v50 = load.i64 notrap aligned readonly v44+24;; @0087 v51 = call_indirect sig0, v49(v50, v0, v2, v3, v4, v5);; @0091 jump block1@@ -244,11 +244,11 @@;;;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32, v5: i32):;; @009e v9 = load.i64 notrap aligned table v0+64-;; @00a0 v10 = load.i64 user15 aligned readonly v9+8+;; @00a0 v10 = load.i64 user16 aligned readonly v9+8;; @00a0 v11 = load.i64 notrap aligned readonly v9+24;; @00a0 v12 = call_indirect sig0, v10(v11, v0, v2, v3, v4, v5);; @00af v15 = load.i64 notrap aligned table v0+80-;; @00b1 v16 = load.i64 user15 aligned readonly v15+8+;; @00b1 v16 = load.i64 user16 aligned readonly v15+8;; @00b1 v17 = load.i64 notrap aligned readonly v15+24;; @00b1 v18 = call_indirect sig0, v16(v17, v0, v2, v3, v4, v5);; @00ba jump block1diff --git a/tests/disas/unreachable_code.wat b/tests/disas/unreachable_code.watindex fe6e365c72..01a609efac 100644--- a/tests/disas/unreachable_code.wat+++ b/tests/disas/unreachable_code.wat@@ -85,7 +85,7 @@;; stack_limit = gv2;;;; block0(v0: i64, v1: i64):-;; @0043 trap user11+;; @0043 trap user12;; };;;; function u0:1(i64 vmctx, i64) -> i32 tail {@@ -98,7 +98,7 @@;; @004c jump block2;;;; block2:-;; @004e trap user11+;; @004e trap user12;; };;;; function u0:2(i64 vmctx, i64) -> i32 tail {@@ -115,7 +115,7 @@;; @006a jump block9;;;; block9:-;; @0074 trap user11+;; @0074 trap user12;;;; block13:;; @0087 jump block7@@ -130,7 +130,7 @@;; @008b jump block3;;;; block3:-;; @008c trap user11+;; @008c trap user12;; };;;; function u0:3(i64 vmctx, i64) tail {diff --git a/tests/disas/x64-simple-load.wat b/tests/disas/x64-simple-load.watindex fdea5f1789..6e4cdb812a 100644--- a/tests/disas/x64-simple-load.wat+++ b/tests/disas/x64-simple-load.wat@@ -17,10 +17,10 @@;; ╰─╼ addrmap: 0x21;; movl %edx, %edi;; movzbq (%rsi, %rdi), %rax-;; ╰─╼ trap: MemoryOutOfBounds+;; ╰─╼ trap: Normal(MemoryOutOfBounds);; movzbq 4(%rsi, %rdi), %rcx;; ├─╼ addrmap: 0x26-;; ╰─╼ trap: MemoryOutOfBounds+;; ╰─╼ trap: Normal(MemoryOutOfBounds);; movq %rbp, %rsp;; ╰─╼ addrmap: 0x29;; popq %rbp