diff --git a/mach/proto/mcg/parse_em.c b/mach/proto/mcg/parse_em.c index 12ea25589..167910ad4 100644 --- a/mach/proto/mcg/parse_em.c +++ b/mach/proto/mcg/parse_em.c @@ -158,6 +158,12 @@ static void queue_insn_ilabel(int opcode, int label) case op_zle: case op_zgt: case op_zge: + case op_beq: + case op_bne: + case op_blt: + case op_ble: + case op_bgt: + case op_bge: { struct basicblock* bb = bb_get(NULL); queue_insn_block(em.em_opcode, left, bb); diff --git a/mach/proto/mcg/treebuilder.c b/mach/proto/mcg/treebuilder.c index c99bb7edd..5e9ee1233 100644 --- a/mach/proto/mcg/treebuilder.c +++ b/mach/proto/mcg/treebuilder.c @@ -270,6 +270,14 @@ static void insn_bvalue(int opcode, struct basicblock* leftbb, struct basicblock case op_zge: compare0_branch2(opcode, rightbb, leftbb, IR_CJUMPLT); break; case op_zgt: compare0_branch2(opcode, rightbb, leftbb, IR_CJUMPLE); break; + case op_beq: simple_branch2(opcode, EM_wordsize, leftbb, rightbb, IR_CJUMPEQ); break; + case op_blt: simple_branch2(opcode, EM_wordsize, leftbb, rightbb, IR_CJUMPLT); break; + case op_ble: simple_branch2(opcode, EM_wordsize, leftbb, rightbb, IR_CJUMPLE); break; + + case op_bne: simple_branch2(opcode, EM_wordsize, rightbb, leftbb, IR_CJUMPEQ); break; + case op_bge: simple_branch2(opcode, EM_wordsize, rightbb, leftbb, IR_CJUMPLT); break; + case op_bgt: simple_branch2(opcode, EM_wordsize, rightbb, leftbb, IR_CJUMPLE); break; + case op_bra: { materialise_stack();