ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 894 microarchs · 15,770 chips · 105 sources
Arch:
Tier:

fence.tso

T1 riscv alu insn
Memory ordering fence, total store ordering
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRV32/RV64 I
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
Privilegeuser
ExtensionsI

Summary

Orders memory operations.

Syntax / Encoding

fence.tso | 100000110011xxxxx000xxxxx0001111 (mask=0xfff0707f match=0x8330000f)

Binary Encodings (1)

WidthFormatBit PatternMask / Match
32RV100000110011xxxxx000xxxxx00011110xfff0707f / 0x8330000f

Operands

NameDescription
xs1bits [19:15]
xdbits [11:7]

Reference Notes

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`<% if ext?(:H) %>, and/or `henvcfg.FIOM`<% end %>.