Commit fb644cda authored by qinsoon's avatar qinsoon

[wip] fix a bug on branch2 on a value

parent 28b7d94e
......@@ -292,7 +292,11 @@ impl <'a> InstructionSelection {
// emit: cmp cond_reg 1
self.backend.emit_cmp_imm_r(1, &cond_reg);
// emit: je #branch_dest
self.backend.emit_je(branch_target);
if branch_if_true {
self.backend.emit_je(branch_target);
} else {
self.backend.emit_jne(branch_target);
}
} else {
unimplemented!();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment