MCPcopy Create free account
hub / github.com/N64Recomp/N64Recomp / process_binary_op

Method process_binary_op

src/cgenerator.cpp:565–573  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563}
564
565void 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
575void N64Recomp::CGenerator::process_unary_op(const UnaryOp& op, const InstructionContext& ctx) const {
576 // Thread local variables to prevent allocations when possible.

Callers 1

process_instructionFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected