diff options
author | Aaron Durbin <adurbin@rivosinc.com> | 2021-09-30 09:04:53 -0600 |
---|---|---|
committer | Aaron Durbin <adurbin@rivosinc.com> | 2021-09-30 09:04:53 -0600 |
commit | 8006631f74d6cf5b75c8cb86cc54e4f8db3954b7 (patch) | |
tree | c2158959a28cc038bf569a44728ba5b7917e4d3f | |
parent | e104c198c4532e54c441156f1c893cd1715387e1 (diff) | |
download | riscv-isa-manual-8006631f74d6cf5b75c8cb86cc54e4f8db3954b7.zip riscv-isa-manual-8006631f74d6cf5b75c8cb86cc54e4f8db3954b7.tar.gz riscv-isa-manual-8006631f74d6cf5b75c8cb86cc54e4f8db3954b7.tar.bz2 |
zihintpause: Annotate notes and correct instruction encoding
Chapter 4, Zihintpause, needs the notes annotated in the chapter to
align with latex chapter. Additionally, correct PAUSE instruction
encoding .
Signed-off-by: Aaron Durbin <adurbin@rivosinc.com>
-rw-r--r-- | src/images/wavedrom/zihintpause-hint.adoc | 4 | ||||
-rw-r--r-- | src/zihintpause.adoc | 16 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/images/wavedrom/zihintpause-hint.adoc b/src/images/wavedrom/zihintpause-hint.adoc index 86d966a..298e46d 100644 --- a/src/images/wavedrom/zihintpause-hint.adoc +++ b/src/images/wavedrom/zihintpause-hint.adoc @@ -7,11 +7,11 @@ {bits: 5, name: 'rd', attr: 0}, {bits: 3, name: 'func3', attr: 'PAUSE', type: 8}, {bits: 5, name: 'rs1', attr: 0}, - {bits: 1, name: 'SW', attr: 1}, + {bits: 1, name: 'SW', attr: 0}, {bits: 1, name: 'SR', attr: 0}, {bits: 1, name: 'SO', attr: 0}, {bits: 1, name: 'SI', attr: 0}, - {bits: 1, name: 'PW', attr: 0}, + {bits: 1, name: 'PW', attr: 1}, {bits: 1, name: 'PR', attr: 0}, {bits: 1, name: 'PO', attr: 0}, {bits: 1, name: 'PI', attr: 0}, diff --git a/src/zihintpause.adoc b/src/zihintpause.adoc index 9b30a61..49dad7e 100644 --- a/src/zihintpause.adoc +++ b/src/zihintpause.adoc @@ -8,6 +8,8 @@ state is changed. (((PAUSE, HINT))) (((HINT, PAUSE))) +[NOTE] +==== Software can use the PAUSE instruction to reduce energy consumption while executing spin-wait code sequences. Multithreaded cores might temporarily relinquish execution resources to other harts when PAUSE is @@ -35,10 +37,18 @@ 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. +==== PAUSE is encoded as a FENCE instruction with _pred_=W, _succ_=0, _fm_=0, _rd_=`x0`, and _rs1_=`x0`. +include::images/wavedrom/zihintpause-hint.adoc[] +[zihintpause-hint] +.Zihintpause fence instructions +image::image_placeholder.png[] + +[NOTE] +==== PAUSE is encoded as a hint within the FENCE opcode because some implementations are expected to deliberately stall the PAUSE instruction until outstanding memory transactions have completed. Because the @@ -46,11 +56,6 @@ successor set is null, however, PAUSE does not _mandate_ any particular memory ordering—hence, it truly is a HINT. (((PAUSE, encoding))) -include::images/wavedrom/zihintpause-hint.adoc[] -[zihintpause-hint] -.Zihintpause fence instructions -image::image_placeholder.png[] - Like other FENCE instructions, PAUSE cannot be used within LR/SC sequences without voiding the forward-progress guarantee. (((PAUSE, LR/RC sequences))) @@ -58,4 +63,5 @@ sequences without voiding the forward-progress guarantee. The choice of a predecessor set of W is arbitrary, since the successor set is null. Other HINTs similar to PAUSE might be encoded with other predecessor sets. +==== |