From fd7a7ba1e6f2ceb5009c02bdc89812df5378f75c Mon Sep 17 00:00:00 2001 From: Folkert Date: Fri, 15 Sep 2023 13:15:37 +0200 Subject: [PATCH] temporary fix for llvm wasm argument passing --- crates/compiler/roc_target/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/compiler/roc_target/src/lib.rs b/crates/compiler/roc_target/src/lib.rs index e348db892c..a7ee0db6d9 100644 --- a/crates/compiler/roc_target/src/lib.rs +++ b/crates/compiler/roc_target/src/lib.rs @@ -73,7 +73,10 @@ impl TargetInfo { // This is a reasonable default for most architectures. We want to pass large values by // reference because it's more efficient than copying them around on the stack, and puts // less pressure on CPU registers. - self.ptr_size() * 4 + + // TODO: change this back to `self.ptr_size() * 4`. We make some assumptions about how + // return valus are passed somewhere that make that not quite work for the llvm wasm backend. + 8 * 4 } pub const fn ptr_alignment_bytes(&self) -> usize {