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

Method emit_function_call

LiveRecomp/live_generator.cpp:1430–1437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1428}
1429
1430void N64Recomp::LiveGenerator::emit_function_call(const Context&, size_t function_index) const {
1431 // Load rdram and ctx into R0 and R1.
1432 sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_R0, 0, Registers::rdram, 0, SLJIT_IMM, rdram_offset);
1433 sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R1, 0, Registers::ctx, 0);
1434 // Call the function and save the jump to set its label later on.
1435 sljit_jump* call_jump = sljit_emit_call(compiler, SLJIT_CALL, SLJIT_ARGS2V(P, P));
1436 context->inner_calls.emplace_back(InnerCall{ .target_func_index = function_index, .jump = call_jump });
1437}
1438
1439void N64Recomp::LiveGenerator::emit_named_function_call(const std::string& function_name) const {
1440 // The live recompiler can't call functions by name. This is only used for statics, so it's not an issue.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected