Skip to content

Commit 9ddcbcb

Browse files
authored
AR: Define mcontrol* triggers and multiple accesses (#883)
mcontrol: Behavior is undefined because it's deprecated. mcontrol6: If a trigger reports hit=before then some memory accesses may have been performed. If it reports immediately after, then all accesses have already been performed.
1 parent 9590e02 commit 9ddcbcb

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

xml/hwbp_registers.xml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,10 @@
385385
though the load will not update its destination register. Debuggers
386386
should consider this when setting such breakpoints on, for example,
387387
memory-mapped I/O addresses.
388+
389+
If an instruction matches this trigger and the instruction performs
390+
multiple memory accesses, it is \unspecified which memory accesses
391+
have completed before the trigger fires.
388392
</value>
389393

390394
<value v="1" name="after">
@@ -748,15 +752,23 @@
748752
</value>
749753

750754
<value v="1" name="before">
751-
The trigger fired just before the instruction that triggered it was
752-
retired, but after all preceding instructions are retired.
755+
The trigger fired before the instruction that matched it was
756+
retired, but after all preceding instructions are retired. This
757+
explicitly allows for instructions to be partially executed.
753758
\Rxepc or \RcsrDpc (depending on \FcsrMcontrolSixAction) must be set
754759
to the virtual address of the instruction that matched.
755760

756-
If a load operation matched and \FcsrMcontrolSixSelect=1 then a
757-
memory access has been performed (including any side effects of
758-
performing such an access) even though the load has not updated its
759-
destination register.
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.
760772
</value>
761773

762774
<value v="2" name="after">
@@ -773,6 +785,9 @@
773785
\Rxepc or \RcsrDpc (depending on \FcsrMcontrolSixAction) must be set
774786
to the virtual address of the next instruction that must be executed
775787
to preserve the program flow.
788+
789+
If the instruction performed multiple memory accesses, all of them
790+
have been completed.
776791
</value>
777792
</field>
778793
<field name="select" bits="21" access="WARL" reset="0">

0 commit comments

Comments
 (0)