la
Load address
Loads the address of label into t1.
Used in
- .data, .text and directivesRISC-V assembly
- Going 64-bitRISC-V assembly
- Memory regions and executable filesRISC-V assembly
- if, else and jump tablesRISC-V assembly
- LoopsRISC-V assembly
- Arrays and stringsRISC-V assembly
- Floating point and the F and D extensionsRISC-V assembly
- ecallRISC-V assembly
- The bitmap display and the keyboard registersRISC-V assembly
- When an instruction cannot be carried outRISC-V assembly
Forms
Operands
t1- Any integer register,
x0tox31, or its named alias, such aszero,t0ort6. label- A named address in the program, such as the start of a loop or a variable in
.data.
# la writes 0x10010000 to t0 (marker is at data address 0x10010000).
.data
marker: .word 17
.text
la t0, marker