sd.rl
Store Doubleword Release
- Extension
- Zalasr
- XLEN
- RV64 only
- Assembly (riscv-unified-db)
sd.rl xs2, (xs1)- Length
- 32-bit
Encoding
| 3127 | 26 | 25 | 2420 | 1915 | 1412 | 117 | 62 | 10 | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 00111 | aq | 1 | rs2 | rs1 | 011 | 00000 | 01011 | 11 | |||||||||||||||||||||||
Match 0x3a00302f, mask 0xfa007fff. Source: sd.rl rs1 rs2 aq 25=1 31..27=7 14..12=3 11..7=0 6..2=0x0B 1..0=3 in riscv-opcodes/extensions/rv64_zalasr.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| aq | 26 | aq |
| rs2 | 24:20 | rs2 |
| rs1 | 19:15 | rs1 |
Description
Store the lowest 64 bits of register xs2 to the address in xs1.
This instruction has release semantics, which means that no previous memory operations (in program order) from this hart can be observed to occur after this store completes. Release semantics provide ordering guarantees useful for synchronization, such as writing a lock variable to release it.
The address must be naturally aligned (8-byte aligned); if not, an address-misaligned or access-fault exception will be raised.
Description from riscv-unified-db, reformatted.
Operation
XReg virtual_address = X[xs1];
if (!is_naturally_aligned(64, virtual_address)) {
raise(ExceptionCode::StoreAmoAddressMisaligned, mode(), virtual_address);
}
write_memory_aligned(64, virtual_address, X[xs2], $encoding, 1'b0, 1'b1);Pseudocode in riscv-unified-db’s IDL, quoted unchanged.