RISC-V la Pseudo-Instruction Details
Assembler pseudo-instructionLoad-address pseudo-instruction that places a symbol address in a register. The official assembly manual defines different expansions for .option nopic versus pic: typically AUIPC+ADDI for non-PIC and GOT-indirect loading for PIC.
What This Pseudo Instruction Is Saving You From Writing
A single source form covers local and global/PIC addresses. The assembler selects the lla or lga-style form from the current options, so the programmer does not manually decide whether GOT indirection is needed.
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 la a real RISC-V instruction?
la 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 la?
la loads an address, not the memory value at that address; use lw/ld/flw and related loads to fetch the value