m-ou-se / rust-atomics-and-locks

Code examples, data structures, and links from my book, Rust Atomics and Locks.
Other
1.33k stars 120 forks source link

chapter7: 3 typos in ARM instructions in the text #54

Closed vni closed 2 months ago

vni commented 4 months ago

Type of error

Minor technical mistake

Location of the error

Chapter7. Use text search to locate them.

ldxar --> ldaxr (load acquire exclusive register) -- this one found twice stxlr -> stlxr (store release exclusive register)

Found in these paragraphs:

As this shows, ARM64 has special versions of its load and store instructions for acquire and release ordering. Unlike an ldr or ldxr instruction, an ldar or ldxar instruction will never be reordered with any later memory operation. Similarly, unlike an str or stxr instruction, an stlr or stxlr instruction will never be reordered with any earlier memory operation.

A fetch-and-modify operation using only Release or Acquire ordering instead of AcqRel uses only one of the stlxr and ldxar instructions, respectively, paired with a regular ldxr or stxr instruction.

Description of the error

These are actually typos in the assembly mnemonics for the arm arch.

vni commented 4 months ago

And thank you for the great and insightful book! It was a pleasure to read it!!! : )

m-ou-se commented 2 months ago

ldxar --> ldaxr (load acquire exclusive register) -- this one found twice stxlr -> stlxr (store release exclusive register)

Thanks! Fixed!

And thank you for the great and insightful book! It was a pleasure to read it!!! : )

Really happy to hear that!