fence.tso
Memory ordering fence, total store ordering
- Extension
- RV32I/RV64I base integer
- XLEN
- RV32 and RV64
- Assembly (riscv-unified-db)
fence.tso- Length
- 32-bit
Encoding
listed in riscv-opcodes as a pseudo-op of fence
| 3128 | 2724 | 2320 | 1915 | 1412 | 117 | 62 | 10 | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1000 | 0011 | 0011 | rs1 | 000 | rd | 00011 | 11 | ||||||||||||||||||||||||
Match 0x8330000f, mask 0xfff0707f. Source: $pseudo_op rv_i::fence fence.tso 31..28=8 27..24=3 23..20=3 rs1 14..12=0 rd 6..2=0x03 1..0=3 in riscv-opcodes/extensions/rv_i.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| rs1 | 19:15 | rs1 |
| rd | 11:7 | rd |
Description
Orders memory operations.
fence.tso orders all load operations
in its predecessor set before all memory operations in its successor set, and all store operations
in its predecessor set before all store operations in its successor set. This leaves non-AMO store
operations in the 'fence.tso's predecessor set unordered with non-AMO loads in its successor set.
The xs1 and xd fields are unused and ignored.
In modes other than M-mode, fence.tso is further affected by menvcfg.FIOM,
senvcfg.FIOM(when H is implemented: , and/or henvcfg.FIOM).
Description from riscv-unified-db, reformatted.
Operation
fence_tso();
Pseudocode in riscv-unified-db’s IDL, quoted unchanged.