diff --git a/cranelift/codegen/src/machinst/abi_impl.rs b/cranelift/codegen/src/machinst/abi_impl.rs index 5636b83f82..e1ccc56e95 100644 --- a/cranelift/codegen/src/machinst/abi_impl.rs +++ b/cranelift/codegen/src/machinst/abi_impl.rs @@ -1298,7 +1298,7 @@ impl ABICallee for ABICalleeImpl { } // Save clobbered registers. - let (_, clobber_insts) = M::gen_clobber_save( + let (clobber_size, clobber_insts) = M::gen_clobber_save( self.call_conv, &self.flags, &self.clobbered, @@ -1317,7 +1317,7 @@ impl ABICallee for ABICalleeImpl { // [crate::machinst::abi_impl](this module) for more details // on stackframe layout and nominal SP maintenance. - self.total_frame_size = Some(total_stacksize); + self.total_frame_size = Some(total_stacksize + clobber_size as u32); insts }