aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2020-12-15 17:44:12 -0800
committerAndrew Waterman <andrew@sifive.com>2020-12-15 17:44:12 -0800
commitd2becbcc6ef6daaccaa8d5ef396a45a8a1cdb822 (patch)
treef531e8c484e45e5da3fd65230aad0d8441b68780
parent5208cda340893722cda4ebf3552e36f025f38b0f (diff)
downloadriscv-isa-manual-d2becbcc6ef6daaccaa8d5ef396a45a8a1cdb822.zip
riscv-isa-manual-d2becbcc6ef6daaccaa8d5ef396a45a8a1cdb822.tar.gz
riscv-isa-manual-d2becbcc6ef6daaccaa8d5ef396a45a8a1cdb822.tar.bz2
Improve non-normative text re: multiple PAUSEs
-rw-r--r--src/zihintpause.tex9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/zihintpause.tex b/src/zihintpause.tex
index 5f0a2be..456e2c5 100644
--- a/src/zihintpause.tex
+++ b/src/zihintpause.tex
@@ -23,9 +23,12 @@ polling for.
The duration of a PAUSE instruction's effect may vary significantly within and
among implementations.
In typical implementations this duration should be much less than the time to perform a context switch, probably more on the rough order of an on-chip cache miss latency or a cacheless access to main memory.
-Portable software should not use more than one PAUSE instruction before
-re-evaluating loop conditions, else performance might substantially degrade on
-other implementations, or even on some executions on the same implementation.
+
+A series of PAUSE instructions can be used to create a cumulative delay loosely
+proportional to the number of PAUSE instructions.
+In spin-wait loops in portable code, however, only one PAUSE instruction should
+be used before re-evaluating loop conditions, else the hart might stall longer
+than optimal on some implementations, degrading system performance.
\end{commentary}
PAUSE is encoded as a FENCE instruction with {\em pred}=W, {\em succ}=0,