RISC-V j Pseudo-Instruction Details
Assembler pseudo-instructionUnconditional jump pseudo-instruction expands to jal x0, offset. Transfers control within ±1 MiB without saving a return address. Commonly used for goto, infinite loops, and switch-case jump tables.
What This Pseudo Instruction Is Saving You From Writing
More readable than jal x0, offset; explicitly conveys 'jump without returning.' Contrasts with call — j does not save ra, suitable for no-return control transfers.
Official Semantics Checklist
Toolchain And Linker Boundaries
How To Read The Expansion
What You May See In objdump / Disassembly
Official References And Reading Order
This page treats pseudo-instructions as assembler-level aliases or macros: first read what real instructions they expand to, then use the official ISA manual for the behavior of those real instructions. ABI, relocation, and linker-relaxation details follow the psABI document.
When To Think Of It First
Pitfalls / Common Confusions
FAQ
Is j a real RISC-V instruction?
j is an assembler pseudo-instruction or alias, not a separate hardware opcode. The “Typical Real Expansion” section lists the official expansion, and behavior is defined by the expanded ISA instructions.
What is the main trap when using j?
Range limited to ±1 MiB (JAL J-type immediate range); use a farther jump sequence for longer distances