Skip to content

Commit c164f05

Browse files
authored
Clarify that misa.S and misa.U are optionally writable (#1845)
This has long been the intent, but the spec didn't make this especially clear. The proposed resolution is to clarify that these bits are writable, which is maximally inclusive of both classes of implementations: those that choose to hardwire the bits and those that choose to make them writable.
1 parent 1ef1d27 commit c164f05

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/machine.adoc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,22 +187,25 @@ The design of the RV128I base ISA is not yet complete, and while much of
187187
the remainder of this specification is expected to apply to RV128, this
188188
version of the document focuses only on RV32 and RV64.
189189

190-
The "U" and "S" bits will be set if there is support for user and
191-
supervisor modes respectively.
192-
193190
The "X" bit will be set if there are any non-standard extensions.
194191

195192
When the "B" bit is 1, the implementation supports the instructions provided by the
196193
Zba, Zbb, and Zbs extensions. When the "B" bit is 0, it indicates that the
197-
implementation may not support one or more of the Zba, Zbb, or Zbs extensions.
194+
implementation might not support one or more of the Zba, Zbb, or Zbs extensions.
198195

199196
When the "M" bit is 1, the implementation supports all multiply and
200197
division instructions defined by the M extension. When the "M" bit
201-
is 0, it indicates that the implementation may not support those
198+
is 0, it indicates that the implementation might not support those
202199
instructions. However if the Zmmul extension is supported then
203200
the multiply instructions it specifies are supported irrespective
204201
of the value of the "M" bit.
205202

203+
When the "S" bit is 1, the implementation supports supervisor mode.
204+
When the "S" bit is 0, the implementation might not support supervisor mode.
205+
206+
When the "U" bit is 1, the implementation supports user mode.
207+
When the "U" bit is 0, the implementation might not support user mode.
208+
206209
[NOTE]
207210
====
208211
The `misa` CSR exposes a rudimentary catalog of CPU features to
@@ -226,6 +229,8 @@ If an ISA feature _x_ depends on an ISA feature _y_, then attempting to
226229
enable feature _x_ but disable feature _y_ results in both features
227230
being disabled. For example, setting "F"=0 and "D"=1 results in both
228231
"F" and "D" being cleared.
232+
Similarly, setting "U"=0 and "S"=1" results in both "U" and "S" being
233+
cleared.
229234

230235
An implementation may impose additional constraints on the collective
231236
setting of two or more `misa` fields, in which case they function

0 commit comments

Comments
 (0)