insn_get_prefixes(9)
π NAME π
insn_get_prefixes β literally scans x86 instruction prefix bytes, bestie β¨
This one lives in the Kernel API Manual, and it's giving βtiny but importantβ energy π
β¨ SYNOPSIS β¨
int insn_get_prefixes (struct insn *insn );
π ARGUMENTS π
insnβ thestruct insnthat's holding your instruction, no cap π«Ά
π¦ DESCRIPTION π¦
Okay so here's the vibe: this function populates the insn->prefixes bitmap, and it updates insn->next_byte so it points to the first opcode π₯
And listen β it has no effect if insn->prefixes.got is already set. Like, it's already been handled, so it's not doing the whole thing again π
πΈ RETURN πΈ
0β on success β¨< 0β on error π
π SEE ALSO π
Kernel file ./tools/arch/x86/lib/insn.c:
insn_init(9)insn_get_opcode(9)insn_get_modrm(9)insn_rip_relative(9)insn_get_sib(9)insn_get_displacement(9)insn_get_immediate(9)insn_get_length(9)insn_decode(9)
And that's the whole page, bestie π«Ά it comes from ./tools/arch/x86/lib, dated October 2026, in the Kernel API Manual β iconic, periodt πππ¦
π¦ 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