lwu
Load word unsigned
- Extension
- RV32I/RV64I base integer
- XLEN
- RV64 only
- Assembly (riscv-unified-db)
lwu xd, imm(xs1)- Length
- 32-bit
Encoding
| 3120 | 1915 | 1412 | 117 | 62 | 10 | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| imm[11:0] | rs1 | 110 | rd | 00000 | 11 | ||||||||||||||||||||||||||
Match 0x00006003, mask 0x0000707f. Source: lwu rd rs1 imm12 14..12=6 6..2=0x00 1..0=3 in riscv-opcodes/extensions/rv64_i.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| imm[11:0] | 31:20 | imm12 |
| rs1 | 19:15 | rs1 |
| rd | 11:7 | rd |
Description
Load 64 bits of data into register xd from an
address formed by adding xs1 to a signed offset.
Zero extend the result.
Description from riscv-unified-db, reformatted.
Operation
XReg virtual_address = X[xs1] + $signed(imm); X[xd] = read_memory(32, virtual_address, $encoding);
Pseudocode in riscv-unified-db’s IDL, quoted unchanged.