jr_func(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 a struct pt_regs * and that's all we're getting, iykyk.
  • ir β€” the Instruction, as a u32. 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 of SIGILL.
  • 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:


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