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

Method emit_syscall

LiveRecomp/live_generator.cpp:1912–1920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1910}
1911
1912void N64Recomp::LiveGenerator::emit_syscall(uint32_t instr_vram) const {
1913 // Load rdram and ctx into R0 and R1.
1914 sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_R0, 0, Registers::rdram, 0, SLJIT_IMM, rdram_offset);
1915 sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R1, 0, Registers::ctx, 0);
1916 // Load the vram into R2.
1917 sljit_emit_op1(compiler, SLJIT_MOV32, SLJIT_R2, 0, SLJIT_IMM, instr_vram);
1918 // Call syscall_handler.
1919 sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS3V(P, P, 32), SLJIT_IMM, sljit_sw(inputs.syscall_handler));
1920}
1921
1922void N64Recomp::LiveGenerator::emit_do_break(uint32_t instr_vram) const {
1923 // Load the vram into R0.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected