| 563 | } |
| 564 | |
| 565 | void N64Recomp::CGenerator::process_binary_op(const BinaryOp& op, const InstructionContext& ctx) const { |
| 566 | // Thread local variables to prevent allocations when possible. |
| 567 | // TODO these thread locals probably don't actually help right now, so figure out a better way to prevent allocations. |
| 568 | thread_local std::string output{}; |
| 569 | thread_local std::string expression{}; |
| 570 | get_operand_string(op.output, UnaryOpType::None, ctx, output); |
| 571 | get_binary_expr_string(op.type, op.operands, ctx, output, expression); |
| 572 | fmt::print(output_file, "{} = {};\n", output, expression); |
| 573 | } |
| 574 | |
| 575 | void N64Recomp::CGenerator::process_unary_op(const UnaryOp& op, const InstructionContext& ctx) const { |
| 576 | // Thread local variables to prevent allocations when possible. |
no outgoing calls
no test coverage detected