File tree Expand file tree Collapse file tree 2 files changed +21
-13
lines changed Expand file tree Collapse file tree 2 files changed +21
-13
lines changed Original file line number Diff line number Diff line change @@ -319,6 +319,24 @@ \subsection{Cache Operations}
319319 \end {steps }
320320\end {commentary }
321321
322+ \section {Multiple State Change Instructions } \label {sec:multistate }
323+
324+ An instruction that performs multiple architectural state changes (e.g.,
325+ register updates and/or memory accesses) might cause a trigger to fire at an
326+ intermediate point in its execution. As a result, architectural state changes up
327+ to that point might have been performed, while subsequent state changes,
328+ starting from the event that activated the trigger, might not have been. The
329+ definition of such an instruction will specify the order in which architectural
330+ state changes take place. Alternatively, it may state that partial execution is
331+ not allowed, implying that a mid-execution trigger must prevent any
332+ architectural state changes from occurring.
333+
334+ Debuggers won't be aware if an instruction has been partially executed. When
335+ they resume execution, they will execute the same instruction once more.
336+ Therefore, it's crucial that partially executing the instruction and then
337+ executing it again leaves the hart in a state closely resembling the state it
338+ would have been in if the instruction had only been executed once.
339+
322340\section {Trigger Registers }
323341
324342These registers are CSRs, accessible using the RISC-V {\tt csr} opcodes and
Original file line number Diff line number Diff line change 754754 <value v =" 1" name =" before" >
755755 The trigger fired before the instruction that matched it was
756756 retired, but after all preceding instructions are retired. This
757- explicitly allows for instructions to be partially executed.
757+ explicitly allows for instructions to be partially executed, as
758+ described in Section \ref{sec:multistate}.
759+
758760 \Rxepc or \RcsrDpc (depending on \FcsrMcontrolSixAction) must be set
759761 to the virtual address of the instruction that matched.
760-
761- An instruction that caused a trigger to fire might be executed
762- partially. In that case not all memory accesses may have been
763- performed, and some registers may not have been updated. Executing
764- that instruction again must have the same result as fully executing
765- it the first time would have, except for any effects due to
766- non-idempotent memory. Implementations should avoid partial
767- instruction execution, but it might be unavoidable for instructions
768- that perform a large number of operations.
769-
770- For vector instructions, the vstart mechanism can be used to handle
771- partial execution without duplicating memory accesses.
772762 </value >
773763
774764 <value v =" 2" name =" after" >
You can’t perform that action at this time.
0 commit comments