1

I am reading about the x86 and x64 memory model. In the book Concurrent Programming On Windows, it is mentioned that these two architecture only allows load after store re-ordering (except for store buffer forwarding).

So my question is, in which category(load or store) do the instructions like INC and XADD fall into? If the read part and write part falls into load and store category separately, can the two parts happen independently (can they be spread in time so that other instructions can move to happen between the two)?

Thanuja Dilhan
  • 137
  • 2
  • 10
  • 2
    Yes, the load and store parts of memory-destination RMW instructions are separate operations on the same address. Only with the `lock` prefix will they be glued together into an atomic transaction. See the linked duplicate. – Peter Cordes Jul 04 '21 at 15:33

0 Answers0