| 444 | } |
| 445 | |
| 446 | void N64Recomp::CGenerator::emit_branch_condition(const ConditionalBranchOp& op, const InstructionContext& ctx) const { |
| 447 | // Thread local variables to prevent allocations when possible. |
| 448 | // TODO these thread locals probably don't actually help right now, so figure out a better way to prevent allocations. |
| 449 | thread_local std::string expr_string{}; |
| 450 | get_binary_expr_string(op.comparison, op.operands, ctx, "", expr_string); |
| 451 | fmt::print(output_file, "if ({}) {{\n", expr_string); |
| 452 | } |
| 453 | |
| 454 | void N64Recomp::CGenerator::emit_branch_close() const { |
| 455 | fmt::print(output_file, "}}\n"); |
no outgoing calls
no test coverage detected