jr_func(9)
π jr_func π
okay so bestie, welcome to the jr_func(9) page β that's section 9 of the Kernel API Manual, aka the kernel-functions zone, aka where the MIPS emulation girlies live π¦
β¨ NAME β¨
jr_func β literally emulates a JR instruction. that's the whole vibe. no cap π
πΈ SYNOPSIS πΈ
int jr_func (struct pt_regs *regs , u32 ir );
π§ ARGUMENTS π§
regsβ bestieβ¦ the docs say -- undescribed -- π like they really just left her hanging. she's astruct pt_regs *and that's all we're getting, iykyk.irβ the Instruction, as au32. the actual instruction, the moment, the main character π
π DESCRIPTION π
so what does it return? glad you asked, because it's giving very choose-your-own-adventure π here's the whole roster:
SIGILLβ if JR was in the delay slot π like ma'am, that's illegal, that's the whole point ofSIGILL.SIGEMTβ if we can't compute the EPC. we tried, we literally tried πSIGSEGVβ if we can't access the userland instruction. access denied bestie, memory said no π0β success! slay! iconic! periodt β¨π
π₯ SEE ALSO π₯
first up, the kernel file herself: ./arch/mips/kernel/mips-r2-to-r6-emul.c β yes that's the file, yes you should look at it π«Ά
and the whole emulation friend group, all of them, no one left out:
mipsr6_emul(9)movf_func(9)movt_func(9)movz_func(9)movn_func(9)mfhi_func(9)mthi_func(9)mflo_func(9)mtlo_func(9)mult_func(9)multu_func(9)div_func(9)divu_func(9)dmult_func(9)dmultu_func(9)ddiv_func(9)ddivu_func(9)madd_func(9)maddu_func(9)msub_func(9)msubu_func(9)mul_func(9)clz_func(9)clo_func(9)dclz_func(9)dclo_func(9)mipsr2_decoder(9)
okay that's the page!! huge thank you to ./arch/mips/kernel for the source, and to October 2026 for the date β mwah, love you, bye bestie ππβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms