[PATCH] D136525: [M68k] Add codegen pattern for atomic load / store

Sheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 04:56:13 PDT 2022


0x59616e added a comment.

In D136525#3880337 <https://reviews.llvm.org/D136525#3880337>, @efriedma wrote:

> Are multi-processor m68k computers a thing?  I can't find any reference to such a thing existing, but the manual indicates that the processor was designed to allow it.  If it does exist, m68k probably needs to use sequences similar to x86.  (x86 didn't have any barrier instruction for a long time, but a "lock" instruction has the right semantics.)

**Take my word with a pinch of salt**

We may have to use the compare-and-swap instruction to reach that (or with the aid of glibc). But is it necessary on such an old architecture that may not have all the modern technologies such as out-of-order execution and store/write buffer --- which are the reasons the atomic instruction or memory barrier exists for ?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136525/new/

https://reviews.llvm.org/D136525



More information about the llvm-commits mailing list