Skip to content

Commit cdadd5f

Browse files
committed
Use correct size for stack slot in inline asm codegen
1 parent 27e8329 commit cdadd5f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/inline_asm.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,8 @@ fn call_inline_asm<'tcx>(
871871
inputs: Vec<(Size, Value)>,
872872
outputs: Vec<(Size, CPlace<'tcx>)>,
873873
) {
874-
let stack_slot = fx.create_stack_slot(u32::try_from(slot_size.bytes()).unwrap(), 16);
874+
let stack_slot =
875+
fx.create_stack_slot(u32::try_from(slot_size.bytes().next_multiple_of(16)).unwrap(), 16);
875876

876877
let inline_asm_func = fx
877878
.module

0 commit comments

Comments
 (0)