Repository: bytecodealliance/wasmtime
Pull request #8949 (2024-07-12 23:22:36)

wasmtime: Remove GET_WASM_TRAP indirection
In the past, the wasmtime-runtime crate couldn't directly call `get_wasm_trap` because the registry of loaded modules was in the wasmtime crate, so it called through a global function pointer registered with `init_traps` instead.

Since the two crates were merged in #8501, we no longer need this indirection.

While I'm here, I've also split the former `get_wasm_trap` function into two parts: `lookup_code` finds a loaded module that had been previously registered with `register_code`, and the `lookup_trap_code` step is now done by a helper on `CodeMemory`. This makes the module registry more broadly useful.

I also simplified the code lookup step in two ways:
- I removed a redundant check from the code lookup. `BTreeMap::range` will only return entries where `end >= pc`, so the `end < pc` condition is always false.
- I used checked_sub instead of writing both the comparison and subtraction explicitly.


Patch:
diff --git a/cranelift/codegen/src/isa/x64/inst.isle b/cranelift/codegen/src/isa/x64/inst.isle
index 00ab2c16c..bae6e211c 100644
--- a/cranelift/codegen/src/isa/x64/inst.isle
+++ b/cranelift/codegen/src/isa/x64/inst.isle
@@ -1239,6 +1239,22 @@
             Vfnmadd132sd
             Vfnmadd132ps
             Vfnmadd132pd
+            Vfmsub213ss
+            Vfmsub213sd
+            Vfmsub213ps
+            Vfmsub213pd
+            Vfmsub132ss
+            Vfmsub132sd
+            Vfmsub132ps
+            Vfmsub132pd
+            Vfnmsub213ss
+            Vfnmsub213sd
+            Vfnmsub213ps
+            Vfnmsub213pd
+            Vfnmsub132ss
+            Vfnmsub132sd
+            Vfnmsub132ps
+            Vfnmsub132pd
             Vcmpps
             Vcmppd
             Vpsrlw
@@ -4371,6 +4387,38 @@
 (rule (x64_vfnmadd132 $F32X4 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfnmadd132ps) a b c))
 (rule (x64_vfnmadd132 $F64X2 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfnmadd132pd) a b c))
 
+;; Helper for creating `vfmsub213*` instructions
+(decl x64_vfmsub213 (Type Xmm Xmm XmmMem) Xmm)
+(rule (x64_vfmsub213 $F32 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfmsub213ss) a b c))
+(rule (x64_vfmsub213 $F64 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfmsub213sd) a b c))
+(rule (x64_vfmsub213 $F32X4 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfmsub213ps) a b c))
+(rule (x64_vfmsub213 $F64X2 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfmsub213pd) a b c))
+
+;; Helper for creating `vfmsub132*` instructions
+(decl x64_vfmsub132 (Type Xmm Xmm XmmMem) Xmm)
+(rule (x64_vfmsub132 $F32 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfmsub132ss) a b c))
+(rule (x64_vfmsub132 $F64 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfmsub132sd) a b c))
+(rule (x64_vfmsub132 $F32X4 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfmsub132ps) a b c))
+(rule (x64_vfmsub132 $F64X2 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfmsub132pd) a b c))
+
+;; Helper for creating `vfnmsub213*` instructions
+(decl x64_vfnmsub213 (Type Xmm Xmm XmmMem) Xmm)
+(rule (x64_vfnmsub213 $F32 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfnmsub213ss) a b c))
+(rule (x64_vfnmsub213 $F64 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfnmsub213sd) a b c))
+(rule (x64_vfnmsub213 $F32X4 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfnmsub213ps) a b c))
+(rule (x64_vfnmsub213 $F64X2 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfnmsub213pd) a b c))
+
+;; Helper for creating `vfnmsub132*` instructions
+(decl x64_vfnmsub132 (Type Xmm Xmm XmmMem) Xmm)
+(rule (x64_vfnmsub132 $F32 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfnmsub132ss) a b c))
+(rule (x64_vfnmsub132 $F64 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfnmsub132sd) a b c))
+(rule (x64_vfnmsub132 $F32X4 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfnmsub132ps) a b c))
+(rule (x64_vfnmsub132 $F64X2 a b c) (xmm_rmr_vex3 (AvxOpcode.Vfnmsub132pd) a b c))
+
+;; Note, the `vfmsub231` and `vfnmsub231*` instructions are omitted, because
+;; instruction selection happens before register allocation and therefore there
+;; is no benefit to a a third permutation
+
 ;; Helper for creating `sqrtss` instructions.
 ;;
 ;; NB: the square-root operation technically only has one operand but this
diff --git a/cranelift/codegen/src/isa/x64/inst/args.rs b/cranelift/codegen/src/isa/x64/inst/args.rs
index ecc84b16b..02f45ee64 100644
--- a/cranelift/codegen/src/isa/x64/inst/args.rs
+++ b/cranelift/codegen/src/isa/x64/inst/args.rs
@@ -1565,7 +1565,23 @@ impl AvxOpcode {
             | AvxOpcode::Vfnmadd132ss
             | AvxOpcode::Vfnmadd132sd
             | AvxOpcode::Vfnmadd132ps
-            | AvxOpcode::Vfnmadd132pd => smallvec![InstructionSet::FMA],
+            | AvxOpcode::Vfnmadd132pd
+            | AvxOpcode::Vfmsub213ss
+            | AvxOpcode::Vfmsub213sd
+            | AvxOpcode::Vfmsub213ps
+            | AvxOpcode::Vfmsub213pd
+            | AvxOpcode::Vfmsub132ss
+            | AvxOpcode::Vfmsub132sd
+            | AvxOpcode::Vfmsub132ps
+            | AvxOpcode::Vfmsub132pd
+            | AvxOpcode::Vfnmsub213ss
+            | AvxOpcode::Vfnmsub213sd
+            | AvxOpcode::Vfnmsub213ps
+            | AvxOpcode::Vfnmsub213pd
+            | AvxOpcode::Vfnmsub132ss
+            | AvxOpcode::Vfnmsub132sd
+            | AvxOpcode::Vfnmsub132ps
+            | AvxOpcode::Vfnmsub132pd => smallvec![InstructionSet::FMA],
             AvxOpcode::Vminps
             | AvxOpcode::Vminpd
             | AvxOpcode::Vmaxps
diff --git a/cranelift/codegen/src/isa/x64/inst/emit.rs b/cranelift/codegen/src/isa/x64/inst/emit.rs
index 3e0d44059..dd5dfc002 100644
--- a/cranelift/codegen/src/isa/x64/inst/emit.rs
+++ b/cranelift/codegen/src/isa/x64/inst/emit.rs
@@ -2580,6 +2580,22 @@ pub(crate) fn emit(
                 AvxOpcode::Vfmadd213pd => (true, OpcodeMap::_0F38, 0xA8),
                 AvxOpcode::Vfnmadd132pd => (true, OpcodeMap::_0F38, 0x9C),
                 AvxOpcode::Vfnmadd213pd => (true, OpcodeMap::_0F38, 0xAC),
+                AvxOpcode::Vfmsub132ss => (false, OpcodeMap::_0F38, 0x9B),
+                AvxOpcode::Vfmsub213ss => (false, OpcodeMap::_0F38, 0xAB),
+                AvxOpcode::Vfnmsub132ss => (false, OpcodeMap::_0F38, 0x9F),
+                AvxOpcode::Vfnmsub213ss => (false, OpcodeMap::_0F38, 0xAF),
+                AvxOpcode::Vfmsub132sd => (true, OpcodeMap::_0F38, 0x9B),
+                AvxOpcode::Vfmsub213sd => (true, OpcodeMap::_0F38, 0xAB),
+                AvxOpcode::Vfnmsub132sd => (true, OpcodeMap::_0F38, 0x9F),
+                AvxOpcode::Vfnmsub213sd => (true, OpcodeMap::_0F38, 0xAF),
+                AvxOpcode::Vfmsub132ps => (false, OpcodeMap::_0F38, 0x9A),
+                AvxOpcode::Vfmsub213ps => (false, OpcodeMap::_0F38, 0xAA),
+                AvxOpcode::Vfnmsub132ps => (false, OpcodeMap::_0F38, 0x9E),
+                AvxOpcode::Vfnmsub213ps => (false, OpcodeMap::_0F38, 0xAE),
+                AvxOpcode::Vfmsub132pd => (true, OpcodeMap::_0F38, 0x9A),
+                AvxOpcode::Vfmsub213pd => (true, OpcodeMap::_0F38, 0xAA),
+                AvxOpcode::Vfnmsub132pd => (true, OpcodeMap::_0F38, 0x9E),
+                AvxOpcode::Vfnmsub213pd => (true, OpcodeMap::_0F38, 0xAE),
                 AvxOpcode::Vblendvps => (false, OpcodeMap::_0F3A, 0x4A),
                 AvxOpcode::Vblendvpd => (false, OpcodeMap::_0F3A, 0x4B),
                 AvxOpcode::Vpblendvb => (false, OpcodeMap::_0F3A, 0x4C),
diff --git a/cranelift/codegen/src/isa/x64/lower.isle b/cranelift/codegen/src/isa/x64/lower.isle
index 773a44d36..b814f9d23 100644
--- a/cranelift/codegen/src/isa/x64/lower.isle
+++ b/cranelift/codegen/src/isa/x64/lower.isle
@@ -2860,6 +2860,38 @@
 (rule 3 (fnmadd ty (fneg x) y z) (fmadd ty x y z))
 (rule 4 (fnmadd ty x (fneg y) z) (fmadd ty x y z))
 
+
+(rule 2 (lower (has_type ty (fma x y (fneg z))))
+      (if-let $true (use_fma))
+      (fmsub ty x y z))
+
+;; fmsub and fnmsub
+(decl fmsub (Type Value Value Value) Xmm)
+(decl fnmsub (Type Value Value Value) Xmm)
+
+;; Base case, will sink a load of `z` automatically.
+(rule (fmsub ty x y z) (x64_vfmsub213 ty x y z))
+
+;; Allow sinking loads with one of the two values being multiplied in addition
+;; to the value being subtracted. Note that both x and y can be sunk here due to
+;; multiplication being commutative.
+(rule 1 (fmsub ty (sinkable_load x) y z) (x64_vfmsub132 ty y z x))
+(rule 2 (fmsub ty x (sinkable_load y) z) (x64_vfmsub132 ty x z y))
+
+;; If one of the values being multiplied is negated then use a `vfnmsub*`
+;; instruction instead
+(rule 3 (fmsub ty (fneg x) y z) (fnmsub ty x y z))
+(rule 4 (fmsub ty x (fneg y) z) (fnmsub ty x y z))
+
+(rule (fnmsub ty x y z) (x64_vfnmsub213 ty x y z))
+(rule 1 (fnmsub ty (sinkable_load x) y z) (x64_vfnmsub132 ty y z x))
+(rule 2 (fnmsub ty x (sinkable_load y) z) (x64_vfnmsub132 ty x z y))
+
+;; Like `fmsub` if one argument is negated switch which one is being codegen'd
+(rule 3 (fnmsub ty (fneg x) y z) (fmsub ty x y z))
+(rule 4 (fnmsub ty x (fneg y) z) (fmsub ty x y z))
+
+
 ;; Rules for `load*` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ;; In order to load a value from memory to a GPR register, we may need to extend
diff --git a/crates/cranelift/src/compiler.rs b/crates/cranelift/src/compiler.rs
index c720cf18e..3e048b664 100644
--- a/crates/cranelift/src/compiler.rs
+++ b/crates/cranelift/src/compiler.rs
@@ -528,7 +528,7 @@ impl wasmtime_environ::Compiler for Compiler {
 
         // Now it's time to delegate to the actual builtin. Builtins are stored
         // in an array in all `VMContext`s. First load the base pointer of the
-        // array and then load the entry of the array that correspons to this
+        // array and then load the entry of the array that corresponds to this
         // builtin.
         let mem_flags = ir::MemFlags::trusted().with_readonly();
         let array_addr = builder.ins().load(
diff --git a/crates/environ/Cargo.toml b/crates/environ/Cargo.toml
index 26f2da8bb..c42690f8d 100644
--- a/crates/environ/Cargo.toml
+++ b/crates/environ/Cargo.toml
@@ -2,7 +2,7 @@
 name = "wasmtime-environ"
 version.workspace = true
 authors.workspace = true
-description = "Standalone environment support for WebAsssembly code in Cranelift"
+description = "Standalone environment support for WebAssembly code in Cranelift"
 license = "Apache-2.0 WITH LLVM-exception"
 repository = "https://github.com/bytecodealliance/wasmtime"
 documentation = "https://docs.rs/wasmtime-environ/"
diff --git a/crates/environ/src/compile/mod.rs b/crates/environ/src/compile/mod.rs
index 05151c8f1..b764e5f04 100644
--- a/crates/environ/src/compile/mod.rs
+++ b/crates/environ/src/compile/mod.rs
@@ -346,7 +346,7 @@ pub trait Compiler: Send + Sync {
     /// Get a flag indicating whether branch protection is enabled.
     fn is_branch_protection_enabled(&self) -> bool;
 
-    /// Returns a suitable compiler usable for component-related compliations.
+    /// Returns a suitable compiler usable for component-related compilations.
     ///
     /// Note that the `ComponentCompiler` trait can also be implemented for
     /// `Self` in which case this function would simply return `self`.
diff --git a/crates/environ/src/component/dfg.rs b/crates/environ/src/component/dfg.rs
index f308aeaf3..9804de86a 100644
--- a/crates/environ/src/component/dfg.rs
+++ b/crates/environ/src/component/dfg.rs
@@ -87,7 +87,7 @@ pub struct ComponentDfg {
     ///
     /// This map is not filled in on the initial creation of a `ComponentDfg`.
     /// Instead these modules are filled in by the `inline::adapt` phase where
-    /// adapter modules are identifed and filled in here.
+    /// adapter modules are identified and filled in here.
     ///
     /// The payload here is the static module index representing the core wasm
     /// adapter module that was generated as well as the arguments to the
diff --git a/crates/environ/src/fact/trampoline.rs b/crates/environ/src/fact/trampoline.rs
index 424bc6172..7414ed724 100644
--- a/crates/environ/src/fact/trampoline.rs
+++ b/crates/environ/src/fact/trampoline.rs
@@ -164,7 +164,7 @@ pub(super) fn compile_helper(module: &mut Module<'_>, result: FunctionId, helper
                 .unwrap();
             Destination::Stack(&dst_flat, &helper.dst.opts)
         }
-        // This is the same as a memroy-based source but note that the address
+        // This is the same as a memory-based source but note that the address
         // of the destination is passed as the final parameter to the function.
         HelperLocation::Memory => {
             nlocals += 1;
diff --git a/crates/environ/src/gc.rs b/crates/environ/src/gc.rs
index c2b933d34..c28bfcff8 100644
--- a/crates/environ/src/gc.rs
+++ b/crates/environ/src/gc.rs
@@ -33,7 +33,7 @@ pub const NON_NULL_NON_I31_MASK: u64 = !I31_DISCRIMINANT;
 /// We say "abstract-ish" type because in addition to the abstract heap types
 /// (other than `i31`) we also have variants for `externref`s that have been
 /// converted into an `anyref` via `extern.convert_any` and `externref`s that
-/// have been convered into an `anyref` via `any.convert_extern`. Note that in
+/// have been converted into an `anyref` via `any.convert_extern`. Note that in
 /// the latter case, because `any.convert_extern $foo` produces a value that is
 /// not an instance of `eqref`, `VMGcKind::AnyOfExternRef & VMGcKind::EqRef !=
 /// VMGcKind::EqRef`.
diff --git a/crates/environ/src/module_artifacts.rs b/crates/environ/src/module_artifacts.rs
index 7b04420bd..8610029e6 100644
--- a/crates/environ/src/module_artifacts.rs
+++ b/crates/environ/src/module_artifacts.rs
@@ -15,7 +15,7 @@ pub struct CompiledFunctionInfo {
     /// The [`WasmFunctionInfo`] for this function.
     pub wasm_func_info: WasmFunctionInfo,
     /// The [`FunctionLoc`] indicating the location of this function in the text
-    /// section of the compition artifact.
+    /// section of the competition artifact.
     pub wasm_func_loc: FunctionLoc,
     /// A trampoline for array callers (e.g. `Func::new`) calling into this function (if needed).
     pub array_to_wasm_trampoline: Option<FunctionLoc>,
diff --git a/crates/environ/src/vmoffsets.rs b/crates/environ/src/vmoffsets.rs
index 852c76d09..0868629cd 100644
--- a/crates/environ/src/vmoffsets.rs
+++ b/crates/environ/src/vmoffsets.rs
@@ -173,7 +173,7 @@ pub trait PtrSize {
         self.vmruntime_limits_last_wasm_exit_fp() + self.size()
     }
 
-    /// Return the offset of the `last_enty_sp` field of `VMRuntimeLimits`.
+    /// Return the offset of the `last_wasm_entry_sp` field of `VMRuntimeLimits`.
     fn vmruntime_limits_last_wasm_entry_sp(&self) -> u8 {
         self.vmruntime_limits_last_wasm_exit_pc() + self.size()
     }
diff --git a/crates/slab/src/lib.rs b/crates/slab/src/lib.rs
index 784e144af..822973cee 100644
--- a/crates/slab/src/lib.rs
+++ b/crates/slab/src/lib.rs
@@ -55,13 +55,13 @@
 //! * Value `A` is allocated into the slab, yielding id `i`.
 //!
 //! * `A` is deallocated, and so `i`'s associated entry is added to the slab's
-//! free list.
+//!   free list.
 //!
 //! * Value `B` is allocated into the slab, reusing `i`'s associated entry,
-//! yielding id `i`.
+//!   yielding id `i`.
 //!
 //! * The "original" id `i` is used to access the arena, expecting the
-//! deallocated value `A`, but getting the new value `B`.
+//!   deallocated value `A`, but getting the new value `B`.
 //!
 //! That is, it does not detect and prevent against the memory-safe version of
 //! use-after-free bugs.
diff --git a/crates/wasi-common/witx/preview0/typenames.witx b/crates/wasi-common/witx/preview0/typenames.witx
index f4ba78802..c32137433 100644
--- a/crates/wasi-common/witx/preview0/typenames.witx
+++ b/crates/wasi-common/witx/preview0/typenames.witx
@@ -521,7 +521,7 @@
     (field $userdata $userdata)
     ;;; If non-zero, an error that occurred while processing the subscription request.
     (field $error $errno)
-    ;;; The type of event that occured
+    ;;; The type of event that occurred
     (field $type $eventtype)
     ;;; The contents of the event, if it is an `eventtype::fd_read` or
     ;;; `eventtype::fd_write`. `eventtype::clock` events ignore this field.
diff --git a/crates/wasi-common/witx/preview1/typenames.witx b/crates/wasi-common/witx/preview1/typenames.witx
index 893e5b288..e87239127 100644
--- a/crates/wasi-common/witx/preview1/typenames.witx
+++ b/crates/wasi-common/witx/preview1/typenames.witx
@@ -525,7 +525,7 @@
     (field $userdata $userdata)
     ;;; If non-zero, an error that occurred while processing the subscription request.
     (field $error $errno)
-    ;;; The type of event that occured
+    ;;; The type of event that occurred
     (field $type $eventtype)
     ;;; The contents of the event, if it is an `eventtype::fd_read` or
     ;;; `eventtype::fd_write`. `eventtype::clock` events ignore this field.
diff --git a/crates/wasi-nn/examples/classification-example-winml/src/main.rs b/crates/wasi-nn/examples/classification-example-winml/src/main.rs
index 277b73caa..a435fb5f5 100644
--- a/crates/wasi-nn/examples/classification-example-winml/src/main.rs
+++ b/crates/wasi-nn/examples/classification-example-winml/src/main.rs
@@ -41,7 +41,7 @@ pub fn main() {
     let mut output_buffer = vec![0f32; 1000];
     context.get_output(0, &mut output_buffer[..]).unwrap();
 
-    // Postprocessing. Calculating the softmax probablility scores.
+    // Postprocessing. Calculating the softmax probability scores.
     let result = postprocess(output_buffer);
 
     // Load labels for classification
diff --git a/crates/wasi/src/poll.rs b/crates/wasi/src/poll.rs
index 6e2923f34..8bb51ce28 100644
--- a/crates/wasi/src/poll.rs
+++ b/crates/wasi/src/poll.rs
@@ -81,7 +81,7 @@ pub trait Subscribe: Send + 'static {
     async fn ready(&mut self);
 }
 
-/// Creates a `pollable` resource which is susbcribed to the provided
+/// Creates a `pollable` resource which is subscribed to the provided
 /// `resource`.
 ///
 /// If `resource` is an owned resource then it will be deleted when the returned
diff --git a/crates/wasi/witx/preview0/typenames.witx b/crates/wasi/witx/preview0/typenames.witx
index f4ba78802..c32137433 100644
--- a/crates/wasi/witx/preview0/typenames.witx
+++ b/crates/wasi/witx/preview0/typenames.witx
@@ -521,7 +521,7 @@
     (field $userdata $userdata)
     ;;; If non-zero, an error that occurred while processing the subscription request.
     (field $error $errno)
-    ;;; The type of event that occured
+    ;;; The type of event that occurred
     (field $type $eventtype)
     ;;; The contents of the event, if it is an `eventtype::fd_read` or
     ;;; `eventtype::fd_write`. `eventtype::clock` events ignore this field.
diff --git a/crates/wasi/witx/preview1/typenames.witx b/crates/wasi/witx/preview1/typenames.witx
index 893e5b288..e87239127 100644
--- a/crates/wasi/witx/preview1/typenames.witx
+++ b/crates/wasi/witx/preview1/typenames.witx
@@ -525,7 +525,7 @@
     (field $userdata $userdata)
     ;;; If non-zero, an error that occurred while processing the subscription request.
     (field $error $errno)
-    ;;; The type of event that occured
+    ;;; The type of event that occurred
     (field $type $eventtype)
     ;;; The contents of the event, if it is an `eventtype::fd_read` or
     ;;; `eventtype::fd_write`. `eventtype::clock` events ignore this field.
diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs
index 841f56448..ecb14717f 100644
--- a/crates/wasmtime/src/config.rs
+++ b/crates/wasmtime/src/config.rs
@@ -1534,7 +1534,7 @@ impl Config {
         self
     }
 
-    /// Configure the version information used in serialized and deserialzied [`crate::Module`]s.
+    /// Configure the version information used in serialized and deserialized [`crate::Module`]s.
     /// This effects the behavior of [`crate::Module::serialize()`], as well as
     /// [`crate::Module::deserialize()`] and related functions.
     ///
@@ -2100,7 +2100,7 @@ impl fmt::Debug for Config {
 
         // Not every flag in WasmFeatures can be enabled as part of creating
         // a Config. This impl gives a complete picture of all WasmFeatures
-        // enabled, and doesn't require maintence by hand (which has become out
+        // enabled, and doesn't require maintenance by hand (which has become out
         // of date in the past), at the cost of possible confusion for why
         // a flag in this set doesn't have a Config setter.
         use bitflags::Flags;
diff --git a/crates/wasmtime/src/engine.rs b/crates/wasmtime/src/engine.rs
index 648d1c270..77b35bfd3 100644
--- a/crates/wasmtime/src/engine.rs
+++ b/crates/wasmtime/src/engine.rs
@@ -93,10 +93,7 @@ impl Engine {
             // configured. This is the per-program initialization required for
             // handling traps, such as configuring signals, vectored exception
             // handlers, etc.
-            crate::runtime::vm::init_traps(
-                crate::module::get_wasm_trap,
-                config.macos_use_mach_ports,
-            );
+            crate::runtime::vm::init_traps(config.macos_use_mach_ports);
             #[cfg(feature = "debug-builtins")]
             crate::runtime::vm::debug_builtins::ensure_exported();
         }
diff --git a/crates/wasmtime/src/runtime/code.rs b/crates/wasmtime/src/runtime/code.rs
index 2f453f01c..5030d2962 100644
--- a/crates/wasmtime/src/runtime/code.rs
+++ b/crates/wasmtime/src/runtime/code.rs
@@ -37,7 +37,7 @@ pub struct CodeObject {
 
 impl CodeObject {
     pub fn new(mmap: Arc<CodeMemory>, signatures: TypeCollection, types: Types) -> CodeObject {
-        // The corresopnding unregister for this is below in `Drop for
+        // The corresponding unregister for this is below in `Drop for
         // CodeObject`.
         crate::module::register_code(&mmap);
 
diff --git a/crates/wasmtime/src/runtime/code_memory.rs b/crates/wasmtime/src/runtime/code_memory.rs
index d85e1ff79..7a683d477 100644
--- a/crates/wasmtime/src/runtime/code_memory.rs
+++ b/crates/wasmtime/src/runtime/code_memory.rs
@@ -7,7 +7,7 @@ use core::ops::Range;
 use object::endian::NativeEndian;
 use object::read::{elf::ElfFile64, Object, ObjectSection};
 use object::ObjectSymbol;
-use wasmtime_environ::obj;
+use wasmtime_environ::{lookup_trap_code, obj, Trap};
 use wasmtime_jit_icache_coherence as icache_coherence;
 
 /// Management of executable memory within a `MmapVec`
@@ -317,6 +317,12 @@ impl CodeMemory {
         *self.unwind_registration = Some(registration);
         Ok(())
     }
+
+    /// 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> {
+        lookup_trap_code(self.trap_data(), text_offset)
+    }
 }
 
 /// Returns the range of `inner` within `outer`, such that `outer[range]` is the
diff --git a/crates/wasmtime/src/runtime/component/component.rs b/crates/wasmtime/src/runtime/component/component.rs
index 00cdb9e47..7dd4eca08 100644
--- a/crates/wasmtime/src/runtime/component/component.rs
+++ b/crates/wasmtime/src/runtime/component/component.rs
@@ -243,7 +243,7 @@ impl Component {
     /// An important point to note here is that the precise type of imports and
     /// exports of a component change when it is instantiated with respect to
     /// resources. For example a [`Component`] represents an un-instantiated
-    /// component meaning that its imported resources are represeted as abstract
+    /// component meaning that its imported resources are represented as abstract
     /// resource types. These abstract types are not equal to any other
     /// component's types.
     ///
diff --git a/crates/wasmtime/src/runtime/component/func/typed.rs b/crates/wasmtime/src/runtime/component/func/typed.rs
index e312a986a..890385f5b 100644
--- a/crates/wasmtime/src/runtime/component/func/typed.rs
+++ b/crates/wasmtime/src/runtime/component/func/typed.rs
@@ -152,7 +152,7 @@ where
     /// # Panics
     ///
     /// Panics if this is called on a function in an asynchronous store. This
-    /// only works with functions defined within a synchonous store. Also
+    /// only works with functions defined within a synchronous store. Also
     /// panics if `store` does not own this function.
     pub fn call(&self, store: impl AsContextMut, params: Params) -> Result<Return> {
         assert!(
diff --git a/crates/wasmtime/src/runtime/gc/enabled/rooting.rs b/crates/wasmtime/src/runtime/gc/enabled/rooting.rs
index 7f218df6d..fcbeaf2a8 100644
--- a/crates/wasmtime/src/runtime/gc/enabled/rooting.rs
+++ b/crates/wasmtime/src/runtime/gc/enabled/rooting.rs
@@ -730,7 +730,7 @@ impl<T: GcRef> Rooted<T> {
     /// Create a new `Rooted<T>` from a `GcRootIndex`.
     ///
     /// Note that `Rooted::from_gc_root_index(my_rooted.index)` is not
-    /// necessarily an identity funciton, as it allows changing the `T` type
+    /// necessarily an identity function, as it allows changing the `T` type
     /// parameter.
     ///
     /// The given index should be a LIFO index of a GC reference pointing to an
diff --git a/crates/wasmtime/src/runtime/module.rs b/crates/wasmtime/src/runtime/module.rs
index 1d778d3bb..128355ad0 100644
--- a/crates/wasmtime/src/runtime/module.rs
+++ b/crates/wasmtime/src/runtime/module.rs
@@ -24,7 +24,7 @@ use wasmtime_environ::{
 mod registry;
 
 pub use registry::{
-    get_wasm_trap, register_code, unregister_code, ModuleRegistry, RegisteredModuleId,
+    lookup_code, register_code, unregister_code, ModuleRegistry, RegisteredModuleId,
 };
 
 /// A compiled WebAssembly module, ready to be instantiated.
diff --git a/crates/wasmtime/src/runtime/module/registry.rs b/crates/wasmtime/src/runtime/module/registry.rs
index e83717602..8c7293e66 100644
--- a/crates/wasmtime/src/runtime/module/registry.rs
+++ b/crates/wasmtime/src/runtime/module/registry.rs
@@ -6,7 +6,7 @@ use crate::component::Component;
 use crate::prelude::*;
 use crate::runtime::vm::VMWasmCallFunction;
 use crate::sync::{OnceLock, RwLock};
-use crate::{code_memory::CodeMemory, FrameInfo, Module, Trap};
+use crate::{code_memory::CodeMemory, FrameInfo, Module};
 use alloc::collections::btree_map::{BTreeMap, Entry};
 use alloc::sync::Arc;
 use core::ptr::NonNull;
@@ -254,23 +254,13 @@ fn global_code() -> &'static RwLock<GlobalRegistry> {
 
 type GlobalRegistry = BTreeMap<usize, (usize, Arc<CodeMemory>)>;
 
-/// Returns whether the `pc`, according to globally registered information,
-/// is a wasm trap or not.
-pub fn get_wasm_trap(pc: usize) -> Option<Trap> {
-    let (code, text_offset) = {
-        let all_modules = global_code().read();
-
-        let (end, (start, module)) = match all_modules.range(pc..).next() {
-            Some(info) => info,
-            None => return None,
-        };
-        if pc < *start || *end < pc {
-            return None;
-        }
-        (module.clone(), pc - *start)
-    };
-
-    wasmtime_environ::lookup_trap_code(code.trap_data(), text_offset)
+/// Find which registered region of code contains the given program counter, and
+/// what offset that PC is within that module's code.
+pub fn lookup_code(pc: usize) -> Option<(Arc<CodeMemory>, usize)> {
+    let all_modules = global_code().read();
+    let (_end, (start, module)) = all_modules.range(pc..).next()?;
+    let text_offset = pc.checked_sub(*start)?;
+    Some((module.clone(), text_offset))
 }
 
 /// Registers a new region of code.
diff --git a/crates/wasmtime/src/runtime/vm/sys/custom/traphandlers.rs b/crates/wasmtime/src/runtime/vm/sys/custom/traphandlers.rs
index 493faac1a..c5964491e 100644
--- a/crates/wasmtime/src/runtime/vm/sys/custom/traphandlers.rs
+++ b/crates/wasmtime/src/runtime/vm/sys/custom/traphandlers.rs
@@ -20,10 +20,8 @@ pub unsafe fn wasmtime_setjmp(
     capi::wasmtime_setjmp(jmp_buf, callback, payload, callee.cast())
 }
 
-pub fn platform_init(_macos_use_mach_ports: bool) {
-    unsafe {
-        capi::wasmtime_init_traps(handle_trap);
-    }
+pub unsafe fn platform_init(_macos_use_mach_ports: bool) {
+    capi::wasmtime_init_traps(handle_trap);
 }
 
 extern "C" fn handle_trap(ip: usize, fp: usize, has_faulting_addr: bool, faulting_addr: usize) {
diff --git a/crates/wasmtime/src/runtime/vm/sys/miri/traphandlers.rs b/crates/wasmtime/src/runtime/vm/sys/miri/traphandlers.rs
index 00e22fc55..912542ae0 100644
--- a/crates/wasmtime/src/runtime/vm/sys/miri/traphandlers.rs
+++ b/crates/wasmtime/src/runtime/vm/sys/miri/traphandlers.rs
@@ -37,7 +37,7 @@ pub fn wasmtime_longjmp(_jmp_buf: *const u8) -> ! {
 #[allow(missing_docs)]
 pub type SignalHandler<'a> = dyn Fn() + Send + Sync + 'a;
 
-pub fn platform_init(_macos_use_mach_ports: bool) {}
+pub unsafe fn platform_init(_macos_use_mach_ports: bool) {}
 
 pub fn lazy_per_thread_init() {}
 
diff --git a/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs b/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs
index 113f5b722..83a4b948d 100644
--- a/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs
+++ b/crates/wasmtime/src/runtime/vm/sys/unix/machports.rs
@@ -33,6 +33,7 @@
 
 #![allow(non_snake_case, clippy::cast_sign_loss)]
 
+use crate::runtime::module::lookup_code;
 use crate::runtime::vm::sys::traphandlers::wasmtime_longjmp;
 use crate::runtime::vm::traphandlers::tls;
 use mach2::exc::*;
@@ -325,9 +326,12 @@ unsafe fn handle_exception(request: &mut ExceptionRequest) -> bool {
     // pointer value and if `MAP` changes happen after we read our entry that's
     // ok since they won't invalidate our entry.
     let (pc, fp) = get_pc_and_fp(&thread_state);
-    let trap = match crate::runtime::vm::traphandlers::GET_WASM_TRAP(pc as usize) {
-        Some(trap) => trap,
-        None => return false,
+    let Some((code, text_offset)) = lookup_code(pc as usize) else {
+        return false;
+    };
+
+    let Some(trap) = code.lookup_trap_code(text_offset) else {
+        return false;
     };
 
     // We have determined that this is a wasm trap and we need to actually
diff --git a/crates/wasmtime/src/runtime/vm/traphandlers.rs b/crates/wasmtime/src/runtime/vm/traphandlers.rs
index 1c0d8186d..365354e42 100644
--- a/crates/wasmtime/src/runtime/vm/traphandlers.rs
+++ b/crates/wasmtime/src/runtime/vm/traphandlers.rs
@@ -11,6 +11,7 @@ mod coredump;
 mod coredump;
 
 use crate::prelude::*;
+use crate::runtime::module::lookup_code;
 use crate::runtime::vm::sys::traphandlers;
 use crate::runtime::vm::{Instance, VMContext, VMRuntimeLimits};
 use crate::sync::OnceLock;
@@ -24,22 +25,10 @@ pub use self::tls::{tls_eager_initialize, AsyncWasmCallState, PreviousAsyncWasmC
 
 pub use traphandlers::SignalHandler;
 
-/// Globally-set callback to determine whether a program counter is actually a
-/// wasm trap.
-///
-/// This is initialized during `init_traps` below. The definition lives within
-/// `wasmtime` currently.
-pub(crate) static mut GET_WASM_TRAP: fn(usize) -> Option<wasmtime_environ::Trap> = |_| None;
-
 /// This function is required to be called before any WebAssembly is entered.
 /// This will configure global state such as signal handlers to prepare the
 /// process to receive wasm traps.
 ///
-/// The `get_wasm_trap` argument is used when a trap happens to determine if a
-/// program counter is the pc of an actual wasm trap or not. This is then used
-/// to disambiguate faults that happen due to wasm and faults that happen due to
-/// bugs in Rust or elsewhere.
-///
 /// # Panics
 ///
 /// This function will panic on macOS if it is called twice or more times with
@@ -47,14 +36,10 @@ pub(crate) static mut GET_WASM_TRAP: fn(usize) -> Option<wasmtime_environ::Trap>
 ///
 /// This function will also panic if the `std` feature is disabled and it's
 /// called concurrently.
-pub fn init_traps(
-    get_wasm_trap: fn(usize) -> Option<wasmtime_environ::Trap>,
-    macos_use_mach_ports: bool,
-) {
+pub fn init_traps(macos_use_mach_ports: bool) {
     static INIT: OnceLock<()> = OnceLock::new();
 
     INIT.get_or_init(|| unsafe {
-        GET_WASM_TRAP = get_wasm_trap;
         traphandlers::platform_init(macos_use_mach_ports);
     });
 
@@ -460,9 +445,12 @@ impl CallThreadState {
         }
 
         // If this fault wasn't in wasm code, then it's not our problem
-        let trap = match unsafe { GET_WASM_TRAP(pc as usize) } {
-            Some(trap) => trap,
-            None => return TrapTest::NotWasm,
+        let Some((code, text_offset)) = lookup_code(pc as usize) else {
+            return TrapTest::NotWasm;
+        };
+
+        let Some(trap) = code.lookup_trap_code(text_offset) else {
+            return TrapTest::NotWasm;
         };
 
         // If all that passed then this is indeed a wasm trap, so return the
diff --git a/crates/wiggle/macro/src/lib.rs b/crates/wiggle/macro/src/lib.rs
index 474b71d6e..35eed787d 100644
--- a/crates/wiggle/macro/src/lib.rs
+++ b/crates/wiggle/macro/src/lib.rs
@@ -27,8 +27,8 @@ use syn::parse_macro_input;
 ///       and return `Result<($return_types),$error_type>`
 ///
 ///     * When the `wiggle` crate is built with the `wasmtime_integration`
-///     feature, each module contains an `add_to_linker` function to add it to
-///     a `wasmtime::Linker`.
+///       feature, each module contains an `add_to_linker` function to add it to
+///       a `wasmtime::Linker`.
 ///
 /// Arguments are provided using Rust struct value syntax.
 ///
@@ -96,7 +96,7 @@ use syn::parse_macro_input;
 /// /// is an asynchronous method. Therefore, we use the `async_trait` proc macro
 /// /// to define this trait, so that `double_int_return_float` can be an `async fn`.
 /// /// `wiggle::async_trait` is defined as `#[async_trait::async_trait(?Send)]` -
-/// /// in wiggle, async methods do not have the Send constaint.
+/// /// in wiggle, async methods do not have the Send constraint.
 /// impl example::Example for YourCtxType {
 ///     /// The arrays module has two methods, shown here.
 ///     /// Note that the `GuestPtr` type comes from `wiggle`,
diff --git a/crates/wiggle/src/lib.rs b/crates/wiggle/src/lib.rs
index 6e1a6a993..bbbcceb22 100644
--- a/crates/wiggle/src/lib.rs
+++ b/crates/wiggle/src/lib.rs
@@ -90,7 +90,7 @@ impl<'a> GuestMemory<'a> {
     /// Acquires a slice or owned copy of the memory pointed to by `ptr`.
     ///
     /// This method will attempt to borrow `ptr` directly from linear memory. If
-    /// memory is shared and cannot be borrowed directy then an owned copy is
+    /// memory is shared and cannot be borrowed directly then an owned copy is
     /// returned instead.
     ///
     /// # Errors
diff --git a/crates/wit-bindgen/src/lib.rs b/crates/wit-bindgen/src/lib.rs
index b8bf2bdda..c9c3318aa 100644
--- a/crates/wit-bindgen/src/lib.rs
+++ b/crates/wit-bindgen/src/lib.rs
@@ -442,7 +442,7 @@ impl Wasmtime {
                     // If this interface is remapped then that means that it was
                     // provided via the `with` key in the bindgen configuration.
                     // That means that bindings generation is skipped here. To
-                    // accomodate future bindgens depending on this bindgen
+                    // accommodate future bindgens depending on this bindgen
                     // though we still generate a module which reexports the
                     // original module. This helps maintain the same output
                     // structure regardless of whether `with` is used.
@@ -734,7 +734,7 @@ pub fn new(
             self.src,
             "
             /// Auto-generated bindings for a pre-instantiated version of a
-            /// copmonent which implements the world `{world_name}`.
+            /// component which implements the world `{world_name}`.
             ///
             /// This structure is created through [`{camel}Pre::new`] which
             /// takes a [`InstancePre`]({wt}::component::InstancePre) that
@@ -791,7 +791,7 @@ pub fn new(
                 /// Creates a new copy of `{camel}Pre` bindings which can then
                 /// be used to instantiate into a particular store.
                 ///
-                /// This method may fail if the compoennt behind `instance_pre`
+                /// This method may fail if the component behind `instance_pre`
                 /// does not have the required exports.
                 pub fn new(
                     instance_pre: {wt}::component::InstancePre<_T>,
diff --git a/winch/codegen/src/abi/mod.rs b/winch/codegen/src/abi/mod.rs
index 7473c76f4..b5f46ee63 100644
--- a/winch/codegen/src/abi/mod.rs
+++ b/winch/codegen/src/abi/mod.rs
@@ -309,7 +309,7 @@ impl RetArea {
         }
     }
 
-    /// Returns true if the return area is uninitiliazed.
+    /// Returns true if the return area is uninitialized.
     pub fn is_uninit(&self) -> bool {
         match self {
             Self::Uninit => true,
diff --git a/winch/codegen/src/codegen/control.rs b/winch/codegen/src/codegen/control.rs
index d7b7e87a9..a23acfacd 100644
--- a/winch/codegen/src/codegen/control.rs
+++ b/winch/codegen/src/codegen/control.rs
@@ -176,7 +176,7 @@ pub(crate) struct StackState {
     /// The base stack pointer offset.
     /// This offset is set when entering the block, after saving any live
     /// registers and locals.
-    /// It is calcuated by subtracting the size, in bytes, of any block params
+    /// It is calculated by subtracting the size, in bytes, of any block params
     /// to the current stack pointer offset.
     pub base_offset: SPOffset,
     /// The target stack pointer offset.
diff --git a/winch/codegen/src/frame/mod.rs b/winch/codegen/src/frame/mod.rs
index 603f120ed..1ebdace8d 100644
--- a/winch/codegen/src/frame/mod.rs
+++ b/winch/codegen/src/frame/mod.rs
@@ -122,7 +122,7 @@ impl Frame {
                     )),
                     defined_locals_end,
                 ),
-                // If the resuls operand is a register, we give this register
+                // If the results operand is a register, we give this register
                 // the same treatment as all the other argument registers and
                 // spill it, therefore, we need to increase the locals size by
                 // one slot.
diff --git a/winch/codegen/src/isa/x64/asm.rs b/winch/codegen/src/isa/x64/asm.rs
index 5d2e3cc18..85a994c6f 100644
--- a/winch/codegen/src/isa/x64/asm.rs
+++ b/winch/codegen/src/isa/x64/asm.rs
@@ -1276,7 +1276,7 @@ impl Assembler {
         // emitting to binary.
         //
         // See [wasmtime::engine::Engine::check_compatible_with_shared_flag] and
-        // [wasmtime_cranelift::obj::ModuleTextBuilder::apend_func]
+        // [wasmtime_cranelift::obj::ModuleTextBuilder::append_func]
         self.emit(Inst::LoadExtName {
             dst: Writable::from_reg(dst.into()),
             name: Box::new(dest),
diff --git a/winch/codegen/src/masm.rs b/winch/codegen/src/masm.rs
index ffcc37c91..2139a0ce0 100644
--- a/winch/codegen/src/masm.rs
+++ b/winch/codegen/src/masm.rs
@@ -536,7 +536,7 @@ pub(crate) trait MacroAssembler {
     fn store_ptr(&mut self, src: Reg, dst: Self::Address);
 
     /// Perform a WebAssembly store.
-    /// A WebAssebly store introduces several additional invariants compared to
+    /// A WebAssembly store introduces several additional invariants compared to
     /// [Self::store], more precisely, it can implicitly trap, in certain
     /// circumstances, even if explicit bounds checks are elided, in that sense,
     /// we consider this type of load as untrusted. It can also differ with
@@ -549,7 +549,7 @@ pub(crate) trait MacroAssembler {
     fn load(&mut self, src: Self::Address, dst: Reg, size: OperandSize);
 
     /// Perform a WebAssembly load.
-    /// A WebAssebly load introduces several additional invariants compared to
+    /// A WebAssembly load introduces several additional invariants compared to
     /// [Self::load], more precisely, it can implicitly trap, in certain
     /// circumstances, even if explicit bounds checks are elided, in that sense,
     /// we consider this type of load as untrusted. It can also differ with


Test patch:
diff --git a/cranelift/filetests/filetests/isa/x64/fmsub-inst.clif b/cranelift/filetests/filetests/isa/x64/fmsub-inst.clif
new file mode 100644
index 000000000..a327bf3b8
--- /dev/null
+++ b/cranelift/filetests/filetests/isa/x64/fmsub-inst.clif
@@ -0,0 +1,686 @@
+test compile precise-output
+target x86_64 has_avx=true has_fma=true
+
+function %vfmsub213ss(f32, f32, f32) -> f32 {
+block0(v0: f32, v1: f32, v2: f32):
+    v3 = fneg v2
+    v4 = fma v0, v1, v3
+    return v4
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfmsub213ss %xmm0, %xmm1, %xmm2, %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfmsub213ss %xmm2, %xmm1, %xmm0
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfmsub213sd(f64, f64, i64) -> f64 {
+block0(v0: f64, v1: f64, v2: i64):
+    v3 = load.f64 v2
+    v4 = fneg v3
+    v5 = fma v0, v1, v4
+    return v5
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfmsub213sd %xmm0, %xmm1, 0(%rdi), %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfmsub213sd (%rdi), %xmm1, %xmm0 ; trap: heap_oob
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfmsub213ps(f32x4, f32x4, f32x4) -> f32x4 {
+block0(v0: f32x4, v1: f32x4, v2: f32x4):
+    v3 = fneg v2
+    v4 = fma v0, v1, v3
+    return v4
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfmsub213ps %xmm0, %xmm1, %xmm2, %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfmsub213ps %xmm2, %xmm1, %xmm0
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfmsub213pd(f64x2, f64x2, f64x2) -> f64x2 {
+block0(v0: f64x2, v1: f64x2, v2: f64x2):
+    v3 = fneg v2
+    v4 = fma v0, v1, v3
+    return v4
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfmsub213pd %xmm0, %xmm1, %xmm2, %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfmsub213pd %xmm2, %xmm1, %xmm0
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfmsub132ss(f32, i64, f32) -> f32 {
+block0(v0: f32, v1: i64, v2: f32):
+    v3 = load.f32 v1
+    v4 = fneg v2
+    v5 = fma v0, v3, v4
+    return v5
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfmsub132ss %xmm0, %xmm1, 0(%rdi), %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfmsub132ss (%rdi), %xmm1, %xmm0 ; trap: heap_oob
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfmsub132sd(i64, f64, f64) -> f64 {
+block0(v0: i64, v1: f64, v2: f64):
+    v3 = load.f64 v0
+    v4 = fneg v2
+    v5 = fma v3, v1, v4
+    return v5
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfmsub132sd %xmm0, %xmm1, 0(%rdi), %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfmsub132sd (%rdi), %xmm1, %xmm0 ; trap: heap_oob
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfmsub132ps(f32x4, i64, f32x4) -> f32x4 {
+block0(v0: f32x4, v1: i64, v2: f32x4):
+    v3 = load.f32x4 v1
+    v4 = fneg v2
+    v5 = fma v0, v3, v4
+    return v5
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfmsub132ps %xmm0, %xmm1, 0(%rdi), %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfmsub132ps (%rdi), %xmm1, %xmm0 ; trap: heap_oob
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfmsub132pd(i64, f64x2, f64x2) -> f64x2 {
+block0(v0: i64, v1: f64x2, v2: f64x2):
+    v3 = load.f64x2 v0
+    v4 = fneg v2
+    v5 = fma v3, v1, v4
+    return v5
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfmsub132pd %xmm0, %xmm1, 0(%rdi), %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfmsub132pd (%rdi), %xmm1, %xmm0 ; trap: heap_oob
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfnmsub213ss(f32, f32, f32) -> f32 {
+block0(v0: f32, v1: f32, v2: f32):
+    v3 = fneg v0
+    v4 = fneg v2
+    v5 = fma v3, v1, v4
+    return v5
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfnmsub213ss %xmm0, %xmm1, %xmm2, %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfnmsub213ss %xmm2, %xmm1, %xmm0
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfnmsub213sd(f64, f64, f64) -> f64 {
+block0(v0: f64, v1: f64, v2: f64):
+    v3 = fneg v1
+    v4 = fneg v2
+    v5 = fma v0, v3, v4
+    return v5
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfnmsub213sd %xmm0, %xmm1, %xmm2, %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfnmsub213sd %xmm2, %xmm1, %xmm0
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfnmsub213ps(f32x4, f32x4, i64) -> f32x4 {
+block0(v0: f32x4, v1: f32x4, v2: i64):
+    v3 = fneg v0
+    v4 = load.f32x4 v2
+    v5 = fneg v4
+    v6 = fma v3, v1, v5
+    return v6
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfnmsub213ps %xmm0, %xmm1, 0(%rdi), %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfnmsub213ps (%rdi), %xmm1, %xmm0 ; trap: heap_oob
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfnmsub213pd(f64x2, f64x2, i64) -> f64x2 {
+block0(v0: f64x2, v1: f64x2, v2: i64):
+    v3 = fneg v1
+    v4 = load.f64x2 v2
+    v5 = fneg v4
+    v6 = fma v0, v3, v5
+    return v6
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfnmsub213pd %xmm0, %xmm1, 0(%rdi), %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfnmsub213pd (%rdi), %xmm1, %xmm0 ; trap: heap_oob
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfnmsub132ss(f32, i64, f32) -> f32 {
+block0(v0: f32, v1: i64, v2: f32):
+    v3 = fneg v0
+    v4 = load.f32 v1
+    v5 = fneg v2
+    v6 = fma v3, v4, v5
+    return v6
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfnmsub132ss %xmm0, %xmm1, 0(%rdi), %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfnmsub132ss (%rdi), %xmm1, %xmm0 ; trap: heap_oob
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfnmsub132sd(i64, f64, f64) -> f64 {
+block0(v0: i64, v1: f64, v2: f64):
+    v3 = fneg v1
+    v4 = load.f64 v0
+    v5 = fneg v2
+    v6 = fma v4, v3, v5
+    return v6
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfnmsub132sd %xmm0, %xmm1, 0(%rdi), %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfnmsub132sd (%rdi), %xmm1, %xmm0 ; trap: heap_oob
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfnmsub132ps(i64, f32x4, f32x4) -> f32x4 {
+block0(v0: i64, v1: f32x4, v2: f32x4):
+    v3 = load.f32x4 v0
+    v4 = fneg v3
+    v5 = fneg v2
+    v6 = fma v4, v1, v5
+    return v6
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfnmsub132ps %xmm0, %xmm1, 0(%rdi), %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfnmsub132ps (%rdi), %xmm1, %xmm0 ; trap: heap_oob
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %vfnmsub132pd(f64x2, i64, f64x2) -> f64x2 {
+block0(v0: f64x2, v1: i64, v2: f64x2):
+    v3 = load.f64x2 v1
+    v4 = fneg v3
+    v5 = fneg v2
+    v6 = fma v0, v4, v5
+    return v6
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+; block0:
+;   vfnmsub132pd %xmm0, %xmm1, 0(%rdi), %xmm0
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+; block1: ; offset 0x4
+;   vfnmsub132pd (%rdi), %xmm1, %xmm0 ; trap: heap_oob
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+;; The following tests are here to ensure, that the runtests for fnmsub actually
+;; generate code that sinks the loads. If they don't, then the runtests
+;; don't actually test the correct lowering
+
+function %fnmsub_f64(f64, f64, f64) -> f64 {
+    ss0 = explicit_slot 16
+block0(v0: f64, v1: f64, v2: f64):
+    v3 = stack_addr.i64 ss0
+    store.f64 v2, v3
+    v4 = load.f64 v3
+    v5 = fneg v0
+    v6 = fneg v4
+    v7 = fma v5, v1, v6
+    return v7
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+;   subq    %rsp, $16, %rsp
+; block0:
+;   lea     rsp(0 + virtual offset), %r8
+;   vmovsd  %xmm2, 0(%r8)
+;   vfnmsub213sd %xmm0, %xmm1, 0(%r8), %xmm0
+;   addq    %rsp, $16, %rsp
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+;   subq $0x10, %rsp
+; block1: ; offset 0x8
+;   leaq (%rsp), %r8
+;   vmovsd %xmm2, (%r8) ; trap: heap_oob
+;   vfnmsub213sd (%r8), %xmm1, %xmm0 ; trap: heap_oob
+;   addq $0x10, %rsp
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %fmsub_f64(f64, f64, f64) -> f64 {
+    ss0 = explicit_slot 16
+block0(v0: f64, v1: f64, v2: f64):
+    v3 = stack_addr.i64 ss0
+    store.f64 v2, v3
+    v4 = load.f64 v3
+    v5 = fneg v4
+    v6 = fma v0, v1, v5
+    return v6
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+;   subq    %rsp, $16, %rsp
+; block0:
+;   lea     rsp(0 + virtual offset), %r8
+;   vmovsd  %xmm2, 0(%r8)
+;   vfmsub213sd %xmm0, %xmm1, 0(%r8), %xmm0
+;   addq    %rsp, $16, %rsp
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+;   subq $0x10, %rsp
+; block1: ; offset 0x8
+;   leaq (%rsp), %r8
+;   vmovsd %xmm2, (%r8) ; trap: heap_oob
+;   vfmsub213sd (%r8), %xmm1, %xmm0 ; trap: heap_oob
+;   addq $0x10, %rsp
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %fmsub_f32(f32, f32, f32) -> f32 {
+    ss0 = explicit_slot 4
+block0(v0: f32, v1: f32, v2: f32):
+    v3 = stack_addr.i64 ss0
+    store.f32 v1, v3
+    v4 = load.f32 v3
+    v5 = fneg v2
+    v6 = fma v0, v4, v5
+    return v6
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+;   subq    %rsp, $16, %rsp
+; block0:
+;   lea     rsp(0 + virtual offset), %r8
+;   vmovss  %xmm1, 0(%r8)
+;   vfmsub132ss %xmm0, %xmm2, 0(%r8), %xmm0
+;   addq    %rsp, $16, %rsp
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+;   subq $0x10, %rsp
+; block1: ; offset 0x8
+;   leaq (%rsp), %r8
+;   vmovss %xmm1, (%r8) ; trap: heap_oob
+;   vfmsub132ss (%r8), %xmm2, %xmm0 ; trap: heap_oob
+;   addq $0x10, %rsp
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+;; load first, then negate
+function %fmnsub_f32(f32, f32, f32) -> f32 {
+    ss0 = explicit_slot 4
+block0(v0: f32, v1: f32, v2: f32):
+    v3 = stack_addr.i64 ss0
+    store.f32 v1, v3
+    v4 = load.f32 v3
+    v5 = fneg v4
+    v6 = fneg v2
+    v7 = fma v0, v5, v6
+    return v7
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+;   subq    %rsp, $16, %rsp
+; block0:
+;   lea     rsp(0 + virtual offset), %r8
+;   vmovss  %xmm1, 0(%r8)
+;   vfnmsub132ss %xmm0, %xmm2, 0(%r8), %xmm0
+;   addq    %rsp, $16, %rsp
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+;   subq $0x10, %rsp
+; block1: ; offset 0x8
+;   leaq (%rsp), %r8
+;   vmovss %xmm1, (%r8) ; trap: heap_oob
+;   vfnmsub132ss (%r8), %xmm2, %xmm0 ; trap: heap_oob
+;   addq $0x10, %rsp
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+;; negate first, then load
+;; FIXME (see issue #8953): there is a missed optimization here due to the order
+;; of load and negation. This should really generate a vfmnsub instruction 
+;; removing the need to negate the argument explicitly
+function %fmnsub_f32(f32, f32, f32) -> f32 {
+    ss0 = explicit_slot 4
+block0(v0: f32, v1: f32, v2: f32):
+    v3 = stack_addr.i64 ss0
+    v4 = fneg v1
+    store.f32 v4, v3
+    v5 = load.f32 v3
+    v6 = fneg v2
+    v7 = fma v0, v5, v6
+    return v7
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+;   subq    %rsp, $16, %rsp
+; block0:
+;   lea     rsp(0 + virtual offset), %r11
+;   movl    $-2147483648, %r9d
+;   vmovd   %r9d, %xmm3
+;   vxorps  %xmm1, %xmm3, %xmm3
+;   vmovss  %xmm3, 0(%r11)
+;   vfmsub132ss %xmm0, %xmm2, 0(%r11), %xmm0
+;   addq    %rsp, $16, %rsp
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+;   subq $0x10, %rsp
+; block1: ; offset 0x8
+;   leaq (%rsp), %r11
+;   movl $0x80000000, %r9d
+;   vmovd %r9d, %xmm3
+;   vxorps %xmm3, %xmm1, %xmm3
+;   vmovss %xmm3, (%r11) ; trap: heap_oob
+;   vfmsub132ss (%r11), %xmm2, %xmm0 ; trap: heap_oob
+;   addq $0x10, %rsp
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
+function %fmsub_f32x4(f32x4, f32x4, f32x4) -> f32x4 {
+    ss0 = explicit_slot 16
+block0(v0: f32x4, v1: f32x4, v2: f32x4):
+    v3 = stack_addr.i64 ss0
+    store.f32x4 v0, v3
+    v4 = load.f32x4 v3
+    v5 = fneg v2
+    v6 = fma v4, v1, v5
+    return v6
+}
+
+; VCode:
+;   pushq   %rbp
+;   movq    %rsp, %rbp
+;   subq    %rsp, $16, %rsp
+; block0:
+;   lea     rsp(0 + virtual offset), %r8
+;   vmovups %xmm0, 0(%r8)
+;   movdqa  %xmm1, %xmm0
+;   vfmsub132ps %xmm0, %xmm2, 0(%r8), %xmm0
+;   addq    %rsp, $16, %rsp
+;   movq    %rbp, %rsp
+;   popq    %rbp
+;   ret
+;
+; Disassembled:
+; block0: ; offset 0x0
+;   pushq %rbp
+;   movq %rsp, %rbp
+;   subq $0x10, %rsp
+; block1: ; offset 0x8
+;   leaq (%rsp), %r8
+;   vmovups %xmm0, (%r8) ; trap: heap_oob
+;   movdqa %xmm1, %xmm0
+;   vfmsub132ps (%r8), %xmm2, %xmm0 ; trap: heap_oob
+;   addq $0x10, %rsp
+;   movq %rbp, %rsp
+;   popq %rbp
+;   retq
+
diff --git a/cranelift/filetests/filetests/runtests/x64/fmsub.clif b/cranelift/filetests/filetests/runtests/x64/fmsub.clif
new file mode 100644
index 000000000..412954e19
--- /dev/null
+++ b/cranelift/filetests/filetests/runtests/x64/fmsub.clif
@@ -0,0 +1,91 @@
+test interpret
+test run
+target x86_64 has_avx has_fma
+
+;; testing load sinkind on fmsub and fmnsub instructions
+function %fmsub_f32(f32, f32, f32) -> f32 {
+    ss0 = explicit_slot 4
+block0(v0: f32, v1: f32, v2: f32):
+    v3 = stack_addr.i64 ss0
+    store.f32 v1, v3
+    v4 = load.f32 v3
+    v5 = fneg v2
+    v6 = fma v0, v4, v5
+    return v6
+}
+; run: %fmsub_f32(0x83.0, 0x2.68091p6, 0x9.88721p1) == 0x1.3af060p14
+; run: %fmsub_f32(-0x83.0, 0x2.68091p6, 0x9.88721p1) == -0x1.3b88e6p14
+; run: %fmsub_f32(-0x83.0, 0x2.68091p6, -0x9.88721p1) == -0x1.3af060p14
+
+
+function %fmnsub_f32(f32, f32, f32) -> f32 {
+    ss0 = explicit_slot 4
+block0(v0: f32, v1: f32, v2: f32):
+    v3 = stack_addr.i64 ss0
+    v4 = fneg v1
+    store.f32 v4, v3
+    v5 = load.f32 v3
+    v6 = fneg v2
+    v7 = fma v0, v5, v6
+    return v7
+}
+; run: %fmnsub_f32(0x83.0, -0x2.68091p6, 0x9.88721p1) == 0x1.3af060p14
+; run: %fmnsub_f32(-0x83.0, -0x2.68091p6, 0x9.88721p1) == -0x1.3b88e6p14
+; run: %fmnsub_f32(-0x83.0, -0x2.68091p6, -0x9.88721p1) == -0x1.3af060p14
+
+;; load first, then negate
+function %fmnsub_f32_load_first(f32, f32, f32) -> f32 {
+    ss0 = explicit_slot 4
+block0(v0: f32, v1: f32, v2: f32):
+    v3 = stack_addr.i64 ss0
+    store.f32 v1, v3
+    v4 = load.f32 v3
+    v5 = fneg v4
+    v6 = fneg v2
+    v7 = fma v0, v5, v6
+    return v7
+}
+; run: %fmnsub_f32_load_first(0x83.0, -0x2.68091p6, 0x9.88721p1) == 0x1.3af060p14
+; run: %fmnsub_f32_load_first(-0x83.0, -0x2.68091p6, 0x9.88721p1) == -0x1.3b88e6p14
+; run: %fmnsub_f32_load_first(-0x83.0, -0x2.68091p6, -0x9.88721p1) == -0x1.3af060p14
+
+function %fnmsub_f64(f64, f64, f64) -> f64 {
+    ss0 = explicit_slot 16
+block0(v0: f64, v1: f64, v2: f64):
+    v3 = stack_addr.i64 ss0
+    store.f64 v2, v3
+    v4 = load.f64 v3
+    v5 = fneg v0
+    v6 = fneg v4
+    v7 = fma v5, v1, v6
+    return v7
+}
+; run: %fnmsub_f64(0x1.3b88ea148dd4ap14, 0x2.680916809121p6, 0x9.887218721837p1) == -0x1.7ba6ebee17417p21
+; run: %fnmsub_f64(-0x1.3b88ea148dd4ap14, 0x2.680916809121p6, 0x9.887218721837p1) == 0x1.7ba5badfd4333p21
+; run: %fnmsub_f64(-0x1.3b88ea148dd4ap14, 0x2.680916809121p6, -0x9.887218721837p1) == 0x1.7ba6ebee17417p21
+
+function %fmsub_f64(f64, f64, f64) -> f64 {
+    ss0 = explicit_slot 16
+block0(v0: f64, v1: f64, v2: f64):
+    v3 = stack_addr.i64 ss0
+    store.f64 v2, v3
+    v4 = load.f64 v3
+    v5 = fneg v4
+    v6 = fma v0, v1, v5
+    return v6
+}
+; run: %fmsub_f64(-0x1.3b88ea148dd4ap14, 0x2.680916809121p6, 0x9.887218721837p1) == -0x1.7ba6ebee17417p21
+; run: %fmsub_f64(0x1.3b88ea148dd4ap14, 0x2.680916809121p6, 0x9.887218721837p1) == 0x1.7ba5badfd4333p21
+; run: %fmsub_f64(0x1.3b88ea148dd4ap14, 0x2.680916809121p6, -0x9.887218721837p1) == 0x1.7ba6ebee17417p21
+
+function %fmsub_f32x4(f32x4, f32x4, f32x4) -> f32x4 {
+    ss0 = explicit_slot 16
+block0(v0: f32x4, v1: f32x4, v2: f32x4):
+    v3 = stack_addr.i64 ss0
+    store.f32x4 v0, v3
+    v4 = load.f32x4 v3
+    v5 = fneg v2
+    v6 = fma v4, v1, v5
+    return v6
+}
+; run: %fmsub_f32x4([0x9.0 0x83.0 0x1.99999ap-2 -0x1.4cccccp0], [0x9.0 0x2.68091p6 0x1.333334p-1 -0x1.666666p1], [-0x9.0 -0x9.88721p1 -0x1.400000p1 0x1.b33334p0]) == [0x1.680000p6 0x1.3b88e6p14 0x1.5eb852p1 0x1.f0a3d2p0]
diff --git a/crates/component-macro/tests/expanded/char.rs b/crates/component-macro/tests/expanded/char.rs
index f5bae77cf..a8b1a428d 100644
--- a/crates/component-macro/tests/expanded/char.rs
+++ b/crates/component-macro/tests/expanded/char.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/char_async.rs b/crates/component-macro/tests/expanded/char_async.rs
index 169eeb6e2..e565be5dc 100644
--- a/crates/component-macro/tests/expanded/char_async.rs
+++ b/crates/component-macro/tests/expanded/char_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/conventions.rs b/crates/component-macro/tests/expanded/conventions.rs
index 464ba2874..1857ae385 100644
--- a/crates/component-macro/tests/expanded/conventions.rs
+++ b/crates/component-macro/tests/expanded/conventions.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/conventions_async.rs b/crates/component-macro/tests/expanded/conventions_async.rs
index 3106702f8..872695740 100644
--- a/crates/component-macro/tests/expanded/conventions_async.rs
+++ b/crates/component-macro/tests/expanded/conventions_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/dead-code.rs b/crates/component-macro/tests/expanded/dead-code.rs
index 483d63899..c0fb29841 100644
--- a/crates/component-macro/tests/expanded/dead-code.rs
+++ b/crates/component-macro/tests/expanded/dead-code.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `imports`.
+/// component which implements the world `imports`.
 ///
 /// This structure is created through [`ImportsPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `ImportsPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/dead-code_async.rs b/crates/component-macro/tests/expanded/dead-code_async.rs
index de469d126..46110f3cd 100644
--- a/crates/component-macro/tests/expanded/dead-code_async.rs
+++ b/crates/component-macro/tests/expanded/dead-code_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `imports`.
+/// component which implements the world `imports`.
 ///
 /// This structure is created through [`ImportsPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `ImportsPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/direct-import.rs b/crates/component-macro/tests/expanded/direct-import.rs
index 5ffabde6a..baa6709a2 100644
--- a/crates/component-macro/tests/expanded/direct-import.rs
+++ b/crates/component-macro/tests/expanded/direct-import.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -49,7 +49,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/direct-import_async.rs b/crates/component-macro/tests/expanded/direct-import_async.rs
index 77abe5e4c..cae02be19 100644
--- a/crates/component-macro/tests/expanded/direct-import_async.rs
+++ b/crates/component-macro/tests/expanded/direct-import_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -51,7 +51,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/empty.rs b/crates/component-macro/tests/expanded/empty.rs
index 512c492bb..048156cd1 100644
--- a/crates/component-macro/tests/expanded/empty.rs
+++ b/crates/component-macro/tests/expanded/empty.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `empty`.
+/// component which implements the world `empty`.
 ///
 /// This structure is created through [`EmptyPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `EmptyPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/empty_async.rs b/crates/component-macro/tests/expanded/empty_async.rs
index cc26b32a4..1c4b3fc92 100644
--- a/crates/component-macro/tests/expanded/empty_async.rs
+++ b/crates/component-macro/tests/expanded/empty_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `empty`.
+/// component which implements the world `empty`.
 ///
 /// This structure is created through [`EmptyPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `EmptyPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/flags.rs b/crates/component-macro/tests/expanded/flags.rs
index 82d457849..75b842bdd 100644
--- a/crates/component-macro/tests/expanded/flags.rs
+++ b/crates/component-macro/tests/expanded/flags.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-flags`.
+/// component which implements the world `the-flags`.
 ///
 /// This structure is created through [`TheFlagsPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheFlagsPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/flags_async.rs b/crates/component-macro/tests/expanded/flags_async.rs
index b61c765c4..8a3ba252f 100644
--- a/crates/component-macro/tests/expanded/flags_async.rs
+++ b/crates/component-macro/tests/expanded/flags_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-flags`.
+/// component which implements the world `the-flags`.
 ///
 /// This structure is created through [`TheFlagsPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheFlagsPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/floats.rs b/crates/component-macro/tests/expanded/floats.rs
index 7f2439aa6..f3edd4174 100644
--- a/crates/component-macro/tests/expanded/floats.rs
+++ b/crates/component-macro/tests/expanded/floats.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/floats_async.rs b/crates/component-macro/tests/expanded/floats_async.rs
index 49e359b3b..84c9127d1 100644
--- a/crates/component-macro/tests/expanded/floats_async.rs
+++ b/crates/component-macro/tests/expanded/floats_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/function-new.rs b/crates/component-macro/tests/expanded/function-new.rs
index 4ac8dd163..a43b6bf26 100644
--- a/crates/component-macro/tests/expanded/function-new.rs
+++ b/crates/component-macro/tests/expanded/function-new.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/function-new_async.rs b/crates/component-macro/tests/expanded/function-new_async.rs
index ee824225f..a73d9e58b 100644
--- a/crates/component-macro/tests/expanded/function-new_async.rs
+++ b/crates/component-macro/tests/expanded/function-new_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/integers.rs b/crates/component-macro/tests/expanded/integers.rs
index fff62d87b..5c3f8b4c5 100644
--- a/crates/component-macro/tests/expanded/integers.rs
+++ b/crates/component-macro/tests/expanded/integers.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/integers_async.rs b/crates/component-macro/tests/expanded/integers_async.rs
index 00f512a34..3679c95b9 100644
--- a/crates/component-macro/tests/expanded/integers_async.rs
+++ b/crates/component-macro/tests/expanded/integers_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/lists.rs b/crates/component-macro/tests/expanded/lists.rs
index 50d810de2..ae79038a4 100644
--- a/crates/component-macro/tests/expanded/lists.rs
+++ b/crates/component-macro/tests/expanded/lists.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-lists`.
+/// component which implements the world `the-lists`.
 ///
 /// This structure is created through [`TheListsPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheListsPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/lists_async.rs b/crates/component-macro/tests/expanded/lists_async.rs
index 41a7595e6..aa250df5f 100644
--- a/crates/component-macro/tests/expanded/lists_async.rs
+++ b/crates/component-macro/tests/expanded/lists_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-lists`.
+/// component which implements the world `the-lists`.
 ///
 /// This structure is created through [`TheListsPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheListsPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/many-arguments.rs b/crates/component-macro/tests/expanded/many-arguments.rs
index faf5f98a1..ea02f665f 100644
--- a/crates/component-macro/tests/expanded/many-arguments.rs
+++ b/crates/component-macro/tests/expanded/many-arguments.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/many-arguments_async.rs b/crates/component-macro/tests/expanded/many-arguments_async.rs
index 24d971491..a69503d28 100644
--- a/crates/component-macro/tests/expanded/many-arguments_async.rs
+++ b/crates/component-macro/tests/expanded/many-arguments_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/multi-return.rs b/crates/component-macro/tests/expanded/multi-return.rs
index 1e01f9d27..b882e7404 100644
--- a/crates/component-macro/tests/expanded/multi-return.rs
+++ b/crates/component-macro/tests/expanded/multi-return.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/multi-return_async.rs b/crates/component-macro/tests/expanded/multi-return_async.rs
index 1d7d4e888..83fd418ba 100644
--- a/crates/component-macro/tests/expanded/multi-return_async.rs
+++ b/crates/component-macro/tests/expanded/multi-return_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/multiversion.rs b/crates/component-macro/tests/expanded/multiversion.rs
index f8e209a6a..0bb990448 100644
--- a/crates/component-macro/tests/expanded/multiversion.rs
+++ b/crates/component-macro/tests/expanded/multiversion.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -36,7 +36,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/multiversion_async.rs b/crates/component-macro/tests/expanded/multiversion_async.rs
index bd5b54746..a35a919d8 100644
--- a/crates/component-macro/tests/expanded/multiversion_async.rs
+++ b/crates/component-macro/tests/expanded/multiversion_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -36,7 +36,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/records.rs b/crates/component-macro/tests/expanded/records.rs
index 5c14c14c7..428f92221 100644
--- a/crates/component-macro/tests/expanded/records.rs
+++ b/crates/component-macro/tests/expanded/records.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/records_async.rs b/crates/component-macro/tests/expanded/records_async.rs
index 16a9151c8..f02a92c52 100644
--- a/crates/component-macro/tests/expanded/records_async.rs
+++ b/crates/component-macro/tests/expanded/records_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/rename.rs b/crates/component-macro/tests/expanded/rename.rs
index a6b804943..def16f934 100644
--- a/crates/component-macro/tests/expanded/rename.rs
+++ b/crates/component-macro/tests/expanded/rename.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `neptune`.
+/// component which implements the world `neptune`.
 ///
 /// This structure is created through [`NeptunePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `NeptunePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/rename_async.rs b/crates/component-macro/tests/expanded/rename_async.rs
index facb43d20..09a9efe5d 100644
--- a/crates/component-macro/tests/expanded/rename_async.rs
+++ b/crates/component-macro/tests/expanded/rename_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `neptune`.
+/// component which implements the world `neptune`.
 ///
 /// This structure is created through [`NeptunePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `NeptunePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/resources-export.rs b/crates/component-macro/tests/expanded/resources-export.rs
index 043aa5fa8..c83dc360c 100644
--- a/crates/component-macro/tests/expanded/resources-export.rs
+++ b/crates/component-macro/tests/expanded/resources-export.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `w`.
+/// component which implements the world `w`.
 ///
 /// This structure is created through [`WPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -42,7 +42,7 @@ const _: () = {
         /// Creates a new copy of `WPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/resources-export_async.rs b/crates/component-macro/tests/expanded/resources-export_async.rs
index 138962f34..45c7f3d10 100644
--- a/crates/component-macro/tests/expanded/resources-export_async.rs
+++ b/crates/component-macro/tests/expanded/resources-export_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `w`.
+/// component which implements the world `w`.
 ///
 /// This structure is created through [`WPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -42,7 +42,7 @@ const _: () = {
         /// Creates a new copy of `WPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/resources-import.rs b/crates/component-macro/tests/expanded/resources-import.rs
index 726c98182..69e24379a 100644
--- a/crates/component-macro/tests/expanded/resources-import.rs
+++ b/crates/component-macro/tests/expanded/resources-import.rs
@@ -26,7 +26,7 @@ impl<_T: HostWorldResource + ?Sized> HostWorldResource for &mut _T {
     }
 }
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -83,7 +83,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/resources-import_async.rs b/crates/component-macro/tests/expanded/resources-import_async.rs
index 80fe5d48f..ff815fa1c 100644
--- a/crates/component-macro/tests/expanded/resources-import_async.rs
+++ b/crates/component-macro/tests/expanded/resources-import_async.rs
@@ -28,7 +28,7 @@ impl<_T: HostWorldResource + ?Sized + Send> HostWorldResource for &mut _T {
     }
 }
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -87,7 +87,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/share-types.rs b/crates/component-macro/tests/expanded/share-types.rs
index bb96f9779..5818b3c48 100644
--- a/crates/component-macro/tests/expanded/share-types.rs
+++ b/crates/component-macro/tests/expanded/share-types.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `http-interface`.
+/// component which implements the world `http-interface`.
 ///
 /// This structure is created through [`HttpInterfacePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `HttpInterfacePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/share-types_async.rs b/crates/component-macro/tests/expanded/share-types_async.rs
index ce4e84280..b126ec596 100644
--- a/crates/component-macro/tests/expanded/share-types_async.rs
+++ b/crates/component-macro/tests/expanded/share-types_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `http-interface`.
+/// component which implements the world `http-interface`.
 ///
 /// This structure is created through [`HttpInterfacePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `HttpInterfacePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/simple-functions.rs b/crates/component-macro/tests/expanded/simple-functions.rs
index 48c638b89..a8ea93c6e 100644
--- a/crates/component-macro/tests/expanded/simple-functions.rs
+++ b/crates/component-macro/tests/expanded/simple-functions.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/simple-functions_async.rs b/crates/component-macro/tests/expanded/simple-functions_async.rs
index 0cdedfd2b..ae674433e 100644
--- a/crates/component-macro/tests/expanded/simple-functions_async.rs
+++ b/crates/component-macro/tests/expanded/simple-functions_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/simple-lists.rs b/crates/component-macro/tests/expanded/simple-lists.rs
index 8d9d9515b..26d93b444 100644
--- a/crates/component-macro/tests/expanded/simple-lists.rs
+++ b/crates/component-macro/tests/expanded/simple-lists.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `my-world`.
+/// component which implements the world `my-world`.
 ///
 /// This structure is created through [`MyWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `MyWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/simple-lists_async.rs b/crates/component-macro/tests/expanded/simple-lists_async.rs
index a71e897e6..7c44e359a 100644
--- a/crates/component-macro/tests/expanded/simple-lists_async.rs
+++ b/crates/component-macro/tests/expanded/simple-lists_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `my-world`.
+/// component which implements the world `my-world`.
 ///
 /// This structure is created through [`MyWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `MyWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/simple-wasi.rs b/crates/component-macro/tests/expanded/simple-wasi.rs
index cd13ac943..b35cd47d4 100644
--- a/crates/component-macro/tests/expanded/simple-wasi.rs
+++ b/crates/component-macro/tests/expanded/simple-wasi.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `wasi`.
+/// component which implements the world `wasi`.
 ///
 /// This structure is created through [`WasiPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `WasiPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/simple-wasi_async.rs b/crates/component-macro/tests/expanded/simple-wasi_async.rs
index 39b6f7f5d..0d8706e7f 100644
--- a/crates/component-macro/tests/expanded/simple-wasi_async.rs
+++ b/crates/component-macro/tests/expanded/simple-wasi_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `wasi`.
+/// component which implements the world `wasi`.
 ///
 /// This structure is created through [`WasiPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `WasiPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/small-anonymous.rs b/crates/component-macro/tests/expanded/small-anonymous.rs
index abd81339f..309b6b999 100644
--- a/crates/component-macro/tests/expanded/small-anonymous.rs
+++ b/crates/component-macro/tests/expanded/small-anonymous.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/small-anonymous_async.rs b/crates/component-macro/tests/expanded/small-anonymous_async.rs
index 753e5d663..2e4d950ed 100644
--- a/crates/component-macro/tests/expanded/small-anonymous_async.rs
+++ b/crates/component-macro/tests/expanded/small-anonymous_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/smoke-default.rs b/crates/component-macro/tests/expanded/smoke-default.rs
index a2db160bc..6d971d718 100644
--- a/crates/component-macro/tests/expanded/smoke-default.rs
+++ b/crates/component-macro/tests/expanded/smoke-default.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/smoke-default_async.rs b/crates/component-macro/tests/expanded/smoke-default_async.rs
index e1f8d2640..d37c7f36d 100644
--- a/crates/component-macro/tests/expanded/smoke-default_async.rs
+++ b/crates/component-macro/tests/expanded/smoke-default_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/smoke-export.rs b/crates/component-macro/tests/expanded/smoke-export.rs
index 0e292da5f..a32cdef51 100644
--- a/crates/component-macro/tests/expanded/smoke-export.rs
+++ b/crates/component-macro/tests/expanded/smoke-export.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/smoke-export_async.rs b/crates/component-macro/tests/expanded/smoke-export_async.rs
index b84ad0471..381e8e72a 100644
--- a/crates/component-macro/tests/expanded/smoke-export_async.rs
+++ b/crates/component-macro/tests/expanded/smoke-export_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/smoke.rs b/crates/component-macro/tests/expanded/smoke.rs
index f05cf9584..302cdfa0a 100644
--- a/crates/component-macro/tests/expanded/smoke.rs
+++ b/crates/component-macro/tests/expanded/smoke.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/smoke_async.rs b/crates/component-macro/tests/expanded/smoke_async.rs
index 5faac73d9..38ea2a90c 100644
--- a/crates/component-macro/tests/expanded/smoke_async.rs
+++ b/crates/component-macro/tests/expanded/smoke_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/strings.rs b/crates/component-macro/tests/expanded/strings.rs
index 3d69053d7..858ecc156 100644
--- a/crates/component-macro/tests/expanded/strings.rs
+++ b/crates/component-macro/tests/expanded/strings.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/strings_async.rs b/crates/component-macro/tests/expanded/strings_async.rs
index 41eef14bd..3450c3cf8 100644
--- a/crates/component-macro/tests/expanded/strings_async.rs
+++ b/crates/component-macro/tests/expanded/strings_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `the-world`.
+/// component which implements the world `the-world`.
 ///
 /// This structure is created through [`TheWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `TheWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/unversioned-foo.rs b/crates/component-macro/tests/expanded/unversioned-foo.rs
index ea3e2435d..33bb74af8 100644
--- a/crates/component-macro/tests/expanded/unversioned-foo.rs
+++ b/crates/component-macro/tests/expanded/unversioned-foo.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `nope`.
+/// component which implements the world `nope`.
 ///
 /// This structure is created through [`NopePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `NopePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/unversioned-foo_async.rs b/crates/component-macro/tests/expanded/unversioned-foo_async.rs
index 37b181e42..5e4bc7b9e 100644
--- a/crates/component-macro/tests/expanded/unversioned-foo_async.rs
+++ b/crates/component-macro/tests/expanded/unversioned-foo_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `nope`.
+/// component which implements the world `nope`.
 ///
 /// This structure is created through [`NopePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `NopePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/use-paths.rs b/crates/component-macro/tests/expanded/use-paths.rs
index 6991bd6a4..cda46ef26 100644
--- a/crates/component-macro/tests/expanded/use-paths.rs
+++ b/crates/component-macro/tests/expanded/use-paths.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `d`.
+/// component which implements the world `d`.
 ///
 /// This structure is created through [`DPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `DPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/use-paths_async.rs b/crates/component-macro/tests/expanded/use-paths_async.rs
index 6ca659760..470bd5720 100644
--- a/crates/component-macro/tests/expanded/use-paths_async.rs
+++ b/crates/component-macro/tests/expanded/use-paths_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `d`.
+/// component which implements the world `d`.
 ///
 /// This structure is created through [`DPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -29,7 +29,7 @@ const _: () = {
         /// Creates a new copy of `DPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/variants.rs b/crates/component-macro/tests/expanded/variants.rs
index b85acf569..6ef1217a7 100644
--- a/crates/component-macro/tests/expanded/variants.rs
+++ b/crates/component-macro/tests/expanded/variants.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `my-world`.
+/// component which implements the world `my-world`.
 ///
 /// This structure is created through [`MyWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `MyWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/variants_async.rs b/crates/component-macro/tests/expanded/variants_async.rs
index 1295127ea..a5b16f188 100644
--- a/crates/component-macro/tests/expanded/variants_async.rs
+++ b/crates/component-macro/tests/expanded/variants_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `my-world`.
+/// component which implements the world `my-world`.
 ///
 /// This structure is created through [`MyWorldPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `MyWorldPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/wat.rs b/crates/component-macro/tests/expanded/wat.rs
index f9bdb92e3..767ed4972 100644
--- a/crates/component-macro/tests/expanded/wat.rs
+++ b/crates/component-macro/tests/expanded/wat.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `example`.
+/// component which implements the world `example`.
 ///
 /// This structure is created through [`ExamplePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `ExamplePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/wat_async.rs b/crates/component-macro/tests/expanded/wat_async.rs
index 1c263394c..0fc5295cd 100644
--- a/crates/component-macro/tests/expanded/wat_async.rs
+++ b/crates/component-macro/tests/expanded/wat_async.rs
@@ -1,5 +1,5 @@
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `example`.
+/// component which implements the world `example`.
 ///
 /// This structure is created through [`ExamplePre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -33,7 +33,7 @@ const _: () = {
         /// Creates a new copy of `ExamplePre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/worlds-with-types.rs b/crates/component-macro/tests/expanded/worlds-with-types.rs
index cbe2972f6..151154374 100644
--- a/crates/component-macro/tests/expanded/worlds-with-types.rs
+++ b/crates/component-macro/tests/expanded/worlds-with-types.rs
@@ -24,7 +24,7 @@ const _: () = {
     assert!(1 == < R as wasmtime::component::ComponentType >::ALIGN32);
 };
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -58,7 +58,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/component-macro/tests/expanded/worlds-with-types_async.rs b/crates/component-macro/tests/expanded/worlds-with-types_async.rs
index 57cd78cae..e771f3395 100644
--- a/crates/component-macro/tests/expanded/worlds-with-types_async.rs
+++ b/crates/component-macro/tests/expanded/worlds-with-types_async.rs
@@ -24,7 +24,7 @@ const _: () = {
     assert!(1 == < R as wasmtime::component::ComponentType >::ALIGN32);
 };
 /// Auto-generated bindings for a pre-instantiated version of a
-/// copmonent which implements the world `foo`.
+/// component which implements the world `foo`.
 ///
 /// This structure is created through [`FooPre::new`] which
 /// takes a [`InstancePre`](wasmtime::component::InstancePre) that
@@ -58,7 +58,7 @@ const _: () = {
         /// Creates a new copy of `FooPre` bindings which can then
         /// be used to instantiate into a particular store.
         ///
-        /// This method may fail if the compoennt behind `instance_pre`
+        /// This method may fail if the component behind `instance_pre`
         /// does not have the required exports.
         pub fn new(
             instance_pre: wasmtime::component::InstancePre<_T>,
diff --git a/crates/test-programs/src/bin/preview1_poll_oneoff_files.rs b/crates/test-programs/src/bin/preview1_poll_oneoff_files.rs
index 57778f88b..21d81e2fa 100644
--- a/crates/test-programs/src/bin/preview1_poll_oneoff_files.rs
+++ b/crates/test-programs/src/bin/preview1_poll_oneoff_files.rs
@@ -13,7 +13,7 @@ unsafe fn poll_oneoff_impl(r#in: &[wasi::Subscription]) -> Result<Vec<wasi::Even
     Ok(out)
 }
 
-/// Repeatedly call `poll_oneoff` until all the subcriptions in `in` have
+/// Repeatedly call `poll_oneoff` until all the subscriptions in `in` have
 /// seen their events occur.
 unsafe fn poll_oneoff_with_retry(
     r#in: &[wasi::Subscription],
diff --git a/crates/wiggle/tests/typenames.witx b/crates/wiggle/tests/typenames.witx
index df60c5c34..5cb1c0a13 100644
--- a/crates/wiggle/tests/typenames.witx
+++ b/crates/wiggle/tests/typenames.witx
@@ -523,7 +523,7 @@
     (field $userdata $userdata)
     ;;; If non-zero, an error that occurred while processing the subscription request.
     (field $error $errno)
-    ;;; The type of event that occured
+    ;;; The type of event that occurred
     (field $type $eventtype)
     ;;; The contents of the event, if it is an `eventtype::fd_read` or
     ;;; `eventtype::fd_write`. `eventtype::clock` events ignore this field.