@@ -59,7 +59,7 @@ static const Node* gen_fn(Context* ctx, const Type* element_type, bool push) {
59
59
if (!push ) // for pop, we decrease the stack size first
60
60
stack_size = gen_primop_ce (bb , sub_op , 2 , (const Node * []) { stack_size , element_size });
61
61
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 ));
63
63
assert (get_unqualified_type (addr -> type )-> tag == PtrType_TAG );
64
64
AddressSpace addr_space = get_unqualified_type (addr -> type )-> payload .ptr_type .address_space ;
65
65
@@ -118,7 +118,7 @@ static const Node* process_let(Context* ctx, const Node* node) {
118
118
BodyBuilder * bb = begin_body (a );
119
119
const Node * stack_pointer = ctx -> stack_pointer ;
120
120
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 ));
122
122
if (ctx -> config -> printf_trace .stack_size ) {
123
123
if (oprim_op -> op == get_stack_base_op )
124
124
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