Skip to content

Commit

Permalink
Update layout and fix broken citations
Browse files Browse the repository at this point in the history
  • Loading branch information
ved-rivos committed Apr 25, 2024
1 parent d306899 commit 0472750
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 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 @@ -119,6 +116,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 +196,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

0 comments on commit 0472750

Please sign in to comment.