[herd] Fix UDF CMODX type and introduce relaxation for non-modifying writes#1809
[herd] Fix UDF CMODX type and introduce relaxation for non-modifying writes#1809diaolo01 wants to merge 1 commit intoherd:masterfrom
Conversation
|
@relokin While I was reviewing another PR I noticed a discrepancy between the Arm ARM and herd on the requirements for UDF. Given the comment in herd which I updated as part of this PR, is it safe to assume that this was a recent change in the Arm ARM? Does it match your expectation for the behaviour for UDF? |
|
@artkhyzha can you please have a look at this? |
|
Yes, the CMODX rules were updated for the issue M.a (P.S. correction: it was M.b). The list of instructions with restricted behaviour got extended with UDF. This patch seems to implement that. Additionally, the update added a note:
This note is not being implemented as a part of this PR, as far as I can see. |
|
Thanks @artkhyzha. I have added the test associated with the relaxation of the CMODX behaviour on the two writes. The result is that what used to return Now returns: |
As part of the Arm ARM M.a release, the more restricted behaviour associated with CMODX has been extended to UDF. Also, the architecture clarifies that for CMODX purposes, a write E2 is not considered to modify instruction location L when it writes the same value as the latest write E1 to L in coherence order.
| (*** Additional synchronisation requirements for CMODX ***) | ||
| let CMODX-conflicts = same-loc & ( | ||
|
|
||
| let CMODX-conflicts = same-loc & different-values ( |
There was a problem hiding this comment.
Not important at the current stage (and I don't think this is a mandatory change for this PR), but "different-values" being a function may cause challenges for miaou7. I wonder if it needs to be a function? A bit surprised it's not a relation.
P.S. Not very important, because we are not currently transliterating these requirements with miaou7.
| @@ -0,0 +1 @@ | |||
| A018 Allowed | |||
There was a problem hiding this comment.
Again, not sure this is an issue with the PR, just to raise awareness. I suppose "kinds" do not capture presence or absence of hints in the output, so this verdict is not sensitive to changes to cat.
In chapter
B2.2.5 Concurrent modification and execution of instructions (CMODX)UDF is defined as an instruction for which the behaviour is more restricted.Therefore, UDF has been placed to have the appropriate behaviour and the comment associated with this paragraph has been updated.
Furthermore, this PR implements the relaxation such that for CMODX purposes, a write E2 is not considered to modify instruction location L when it writes the same value as the latest write E1 to L in coherence order.