File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77
88## [ Unreleased]
99
10+ ### Added
11+
12+ - Add ` asm::fence() ` , a wrapper for implementing a ` fence ` instruction
13+
1014## [ v0.10.1] - 2023-01-18
1115
1216### Fixed
Original file line number Diff line number Diff line change @@ -41,6 +41,20 @@ instruction!(
4141 /// Executing an `SFENCE.VMA` instruction guarantees that any stores in the instruction stream prior to the
4242 /// `SFENCE.VMA` are ordered before all implicit references subsequent to the `SFENCE.VMA`.
4343 , sfence_vma_all, "sfence.vma" ) ;
44+ instruction ! (
45+ /// `FENCE` instruction wrapper
46+ ///
47+ /// The FENCE instruction is used to order device I/O and memory accesses as viewed by other RISC-V
48+ /// harts and external devices or coprocessors. Any combination of device input (I), device output
49+ /// (O), memory reads (R), and memory writes (W) may be ordered with respect to any combination
50+ /// of the same. Informally, no other RISC-V hart or external device can observe any operation in the
51+ /// successor set following a FENCE before any operation in the predecessor set preceding the FENCE.
52+ /// Chapter 17 provides a precise description of the RISC-V memory consistency model.
53+ ///
54+ /// The FENCE instruction also orders memory reads and writes made by the hart as observed by
55+ /// memory reads and writes made by an external device. However, FENCE does not order observations
56+ /// of events made by an external device using any other signaling mechanism.
57+ , fence, "fence" ) ;
4458
4559/// `SFENCE.VMA` instruction wrapper
4660///
You can’t perform that action at this time.
0 commit comments