diff --git a/hello b/hello index 4825f68..a4b5094 100755 Binary files a/hello and b/hello differ diff --git a/src/codegen.zig b/src/codegen.zig index 38eafdd..e71517e 100644 --- a/src/codegen.zig +++ b/src/codegen.zig @@ -449,8 +449,11 @@ pub const Codegen = struct { std.debug.warn("SET PARAM LLVM ALLOCA {} to {}\n", param_node.name.lexeme, alloca); param.llvm_alloca = alloca; - // TODO store register into stack param - // llvm.LLVMBuildStore(builder, null, assign_expr); + _ = llvm.LLVMBuildStore( + builder, + llvm.LLVMGetParam(func, @intCast(c_uint, idx)), + alloca, + ); } self.ctx.setScope(fn_sym.scope);