Skip to content

Commit 7514610

Browse files
committed
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.
1 parent 96c2df8 commit 7514610

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ pub fn target() -> Target {
1414
// The ARMv6-M architecture doesn't support unaligned loads/stores so we disable them
1515
// with +strict-align.
1616
features: "+strict-align".into(),
17-
// There are no atomic CAS instructions available in the instruction set of the ARMv6-M
17+
// There are no atomic instructions available in the instruction set of the ARMv6-M
1818
// architecture
19+
max_atomic_width: Some(0),
1920
atomic_cas: false,
2021
..super::thumb_base::opts()
2122
},

0 commit comments

Comments
 (0)