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

Function outputs_to_zero

LiveRecomp/live_generator.cpp:386–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384}
385
386bool outputs_to_zero(N64Recomp::Operand output, const N64Recomp::InstructionContext& ctx) {
387 if (output == N64Recomp::Operand::Rd && ctx.rd == 0) {
388 return true;
389 }
390 if (output == N64Recomp::Operand::Rt && ctx.rt == 0) {
391 return true;
392 }
393 if (output == N64Recomp::Operand::Rs && ctx.rs == 0) {
394 return true;
395 }
396 return false;
397}
398
399void N64Recomp::LiveGenerator::process_binary_op(const BinaryOp& op, const InstructionContext& ctx) const {
400 // Skip instructions that output to $zero

Callers 2

process_binary_opMethod · 0.85
process_unary_opMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected