Skip to content

Commit

Permalink
Rollup merge of #99595 - nikic:thumbv6m-atomics, r=nagisa
Browse files Browse the repository at this point in the history
Mark atomics as unsupported on thumbv6m

The thumbv6m target does not support atomics. Historically, LLVM
had a bug where atomic load/stores for this target were emitted
as plain load/stores rather than as libatomic calls. This was
fixed in https://reviews.llvm.org/D120026, which will be part of
LLVM 15. As we require that "atomic support" does not use libatomic,
we need to indicate that this target does not have native atomics.
  • Loading branch information
GuillaumeGomez authored Jul 23, 2022
2 parents 3648dd5 + 7514610 commit 90c6cde
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ pub fn target() -> Target {
// The ARMv6-M architecture doesn't support unaligned loads/stores so we disable them
// with +strict-align.
features: "+strict-align".into(),
// There are no atomic CAS instructions available in the instruction set of the ARMv6-M
// There are no atomic instructions available in the instruction set of the ARMv6-M
// architecture
max_atomic_width: Some(0),
atomic_cas: false,
..super::thumb_base::opts()
},
Expand Down

0 comments on commit 90c6cde

Please sign in to comment.