Skip to content

Commit

Permalink
Better comment about why mov is enoug for atomic store/load
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb authored and epilys committed Jun 16, 2022
1 parent dd66009 commit a42d1ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/compiler-singlepass/src/machine_x64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3151,7 +3151,9 @@ impl Machine for MachineX86_64 {
},
);
}
// x86_64 have a strong memory model, aligned move is guarantied to be atomic, too or from memory
// x86_64 have a strong memory model, so coherency between all threads (core) is garantied
// and aligned move is guarantied to be atomic, too or from memory
// so store/load an atomic is a simple mov on x86_64
fn i32_atomic_save(
&mut self,
value: Location,
Expand Down

0 comments on commit a42d1ce

Please sign in to comment.