diff --git a/mach/proto/mcg/treebuilder.c b/mach/proto/mcg/treebuilder.c index 828a99747..4060b206f 100644 --- a/mach/proto/mcg/treebuilder.c +++ b/mach/proto/mcg/treebuilder.c @@ -75,7 +75,7 @@ static struct ir* appendir(struct ir* ir) int i; assert(current_bb != NULL); - array_append(¤t_bb->irs, ir); + array_appendu(¤t_bb->irs, ir); ir_print('0', ir); return ir; @@ -196,6 +196,7 @@ static void insn_simple(int opcode) case op_cii: simple_convert(IR_CII1); break; case op_ciu: simple_convert(IR_CIU1); break; + case op_cui: simple_convert(IR_CUI1); break; case op_cmp: push( @@ -406,6 +407,9 @@ static void insn_ivalue(int opcode, arith value) case op_sru: simple_alu2(opcode, value, IR_LSR); break; case op_ngi: simple_alu1(opcode, value, IR_NEG); break; + case op_adu: simple_alu2(opcode, value, IR_ADD); break; + case op_sbu: simple_alu2(opcode, value, IR_SUB); break; + case op_and: simple_alu2(opcode, value, IR_AND); break; case op_ior: simple_alu2(opcode, value, IR_OR); break; case op_xor: simple_alu2(opcode, value, IR_EOR); break; @@ -712,6 +716,16 @@ static void insn_lvalue(int opcode, const char* label, arith offset) ); break; + case op_zre: + appendir( + new_ir2( + IR_STORE, EM_wordsize, + address_of_external(label, offset), + new_wordir(0) + ) + ); + break; + case op_cal: assert(offset == 0); materialise_stack();