nooc

nooc programming language compiler
git clone git://git.nihaljere.xyz/nooc
Log | Files | Refs | LICENSE

commit 4bb3dc44855c91b7330a50bf855f3bb4930ee309
parent b374c57b127d44eb594a2c2d74b9b4fd7bb9b9d2
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Mon, 10 Jan 2022 15:27:17 -0600

ir: fix some *INS macros

Diffstat:
Mir.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ir.c b/ir.c @@ -202,11 +202,11 @@ genexpr(struct iproc *out, size_t expri) // allocate memory even if we don't need to store the return value out_index = NEWTMP; STARTINS(IR_ASSIGN, out_index); - STARTINS(IR_SIZE, 8); // don't hardcode size - STARTINS(IR_ALLOC, 1); // don't hardcode size + PUTINS(IR_SIZE, 8); // don't hardcode size + PUTINS(IR_ALLOC, 1); // don't hardcode size } params[expr->d.call.params.len] = out_index; - PUTINS(IR_CALL, proc); + STARTINS(IR_CALL, proc); for (size_t i = expr->d.call.params.len; i <= expr->d.call.params.len; i--) { PUTINS(IR_CALLARG, params[i]); } @@ -337,7 +337,7 @@ genproc(struct iproc *out, struct proc *proc) decl->index = what; STARTINS(IR_ASSIGN, what); PUTINS(IR_SIZE, type->size); - STARTINS(IR_IN, i); + PUTINS(IR_IN, i); } for (size_t j = 0; j < proc->out.len; j++, i++) { @@ -347,7 +347,7 @@ genproc(struct iproc *out, struct proc *proc) decl->index = what; STARTINS(IR_ASSIGN, what); PUTINS(IR_SIZE, 8); - STARTINS(IR_IN, i); + PUTINS(IR_IN, i); } genblock(out, &proc->block);