Skip to content

Commit 4aad021

Browse files
committed
Revert "AR: Clarify triggers and multiple state changes"
Accidentally pushed to master instead of a feature branch. This reverts commit 79e33fb.
1 parent 79e33fb commit 4aad021

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

Sdtrig.tex

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -319,24 +319,6 @@ \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-
340322
\section{Trigger Registers}
341323

342324
These registers are CSRs, accessible using the RISC-V {\tt csr} opcodes and

xml/hwbp_registers.xml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -754,11 +754,21 @@
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, as
758-
described in Section \ref{sec:multistate}.
759-
757+
explicitly allows for instructions to be partially executed.
760758
\Rxepc or \RcsrDpc (depending on \FcsrMcontrolSixAction) must be set
761759
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.
762772
</value>
763773

764774
<value v="2" name="after">

0 commit comments

Comments
 (0)