Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update layout and fix broken citations #1365

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/zacas.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
== "Zacas" Extension for Atomic Compare-and-Swap (CAS) Instructions, Version 1.0.0

=== Introduction

Compare-and-Swap (CAS) provides an easy and typically faster way to perform
thread synchronization operations when supported as a hardware instruction. CAS
is typically used by lock-free and wait-free algorithms. This extension proposes
Expand All @@ -20,12 +18,11 @@ quadword compare and swap (of both the pointer and the counter). The double and
quadword CAS instructions support implementation of algorithms for ABA problem
avoidance.

The Zacas extension depends upon the Zaamo extension cite:[unpriv].
The Zacas extension depends upon the Zaamo extension.

[[chapter2]]
=== Word/Doubleword/Quadword CAS (AMOCAS.W/D/Q)
=== Word/Doubleword/Quadword CAS (AMOCAS.W/D/Q) Instructions

[wavedrom, , ]
[wavedrom, , svg]
....
{reg: [
{bits: 7, name: 'opcode', attr:'AMO'},
Expand Down Expand Up @@ -67,6 +64,9 @@ pair is `x0`, then both halves of the pair read as zero. When the first
register of a destination register pair is `x0`, then the entire register
result is discarded and neither destination register is written.
The operation performed by `AMOCAS.D` for RV32 is as follows:

<<<

[listing]
temp0 = mem[X(rs1)+0]
temp1 = mem[X(rs1)+4]
Expand Down Expand Up @@ -119,6 +119,9 @@ is `x0`, then both halves of the pair read as zero. When the first register of a
destination register pair is `x0`, then the entire register result is discarded
and neither destination register is written. The operation performed by
`AMOCAS.Q` is as follows:

<<<

[listing]
temp0 = mem[X(rs1)+0]
temp1 = mem[X(rs1)+8]
Expand Down Expand Up @@ -196,8 +199,6 @@ not have release semantics, regardless of `rl`.

An `AMOCAS.W/D/Q` instruction always requires write permissions.

<<<

[NOTE]
====
The following example code sequence illustrates the use of `AMOCAS.Q` to
Expand Down Expand Up @@ -241,6 +242,8 @@ move_tail: # Tail was not pointing to the last node

====

<<<

=== Additional AMO PMAs

There are four levels of PMA support defined for AMOs in the A extension. Zacas
Expand Down