about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-13 14:29:49 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-13 14:29:49 +0000
commitcdadd5f4cd12a273290202bc17121195e7ee96bc (patch)
treeee4682236175673f5863e03540e6ca3ca3340a67
parent27e8329b2071e3be980c149c23bc15093681065d (diff)
downloadrust-cdadd5f4cd12a273290202bc17121195e7ee96bc.tar.gz
rust-cdadd5f4cd12a273290202bc17121195e7ee96bc.zip
Use correct size for stack slot in inline asm codegen
-rw-r--r--src/inline_asm.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inline_asm.rs b/src/inline_asm.rs
index f2b0ec977c6..310b226814d 100644
--- a/src/inline_asm.rs
+++ b/src/inline_asm.rs
@@ -871,7 +871,8 @@ fn call_inline_asm<'tcx>(
     inputs: Vec<(Size, Value)>,
     outputs: Vec<(Size, CPlace<'tcx>)>,
 ) {
-    let stack_slot = fx.create_stack_slot(u32::try_from(slot_size.bytes()).unwrap(), 16);
+    let stack_slot =
+        fx.create_stack_slot(u32::try_from(slot_size.bytes().next_multiple_of(16)).unwrap(), 16);
 
     let inline_asm_func = fx
         .module