@@ -59,7 +59,7 @@ static const Node* gen_fn(Context* ctx, const Type* element_type, bool push) {
5959 if (!push ) // for pop, we decrease the stack size first
6060 stack_size = gen_primop_ce (bb , sub_op , 2 , (const Node * []) { stack_size , element_size });
6161
62- const Node * addr = gen_lea (bb , stack , stack_size , nodes (a , 1 , ( const Node * []) { uint32_literal ( a , 0 ) } ));
62+ const Node * addr = gen_lea (bb , ctx -> stack , int32_literal (a , 0 ), singleton ( stack_size ));
6363 assert (get_unqualified_type (addr -> type )-> tag == PtrType_TAG );
6464 AddressSpace addr_space = get_unqualified_type (addr -> type )-> payload .ptr_type .address_space ;
6565
@@ -118,7 +118,7 @@ static const Node* process_let(Context* ctx, const Node* node) {
118118 BodyBuilder * bb = begin_body (a );
119119 const Node * stack_pointer = ctx -> stack_pointer ;
120120 const Node * stack_size = gen_load (bb , stack_pointer );
121- const Node * stack_base_ptr = gen_lea (bb , ctx -> stack , stack_size , empty ( a ));
121+ const Node * stack_base_ptr = gen_lea (bb , ctx -> stack , int32_literal ( a , 0 ), singleton ( stack_size ));
122122 if (ctx -> config -> printf_trace .stack_size ) {
123123 if (oprim_op -> op == get_stack_base_op )
124124 bind_instruction (bb , prim_op (a , (PrimOp ) {.op = debug_printf_op , .operands = mk_nodes (a , string_lit (a , (StringLiteral ) {.string = "trace: stack_size=%d\n" }), stack_size )}));
0 commit comments