Skip to content

Commit 1d1133e

Browse files
committed
Enable 32-bit atomics on thumbv6-none-eabi.
Will cause LLVM to emit calls to the __sync routines that were added to compiler-builtins in rust-lang/compiler-builtins#1050.
1 parent aaf0985 commit 1d1133e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

compiler/rustc_target/src/spec/targets/thumbv6_none_eabi.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ pub(crate) fn target() -> Target {
1919
llvm_floatabi: Some(FloatAbi::Soft),
2020
asm_args: cvs!["-mthumb-interwork", "-march=armv6", "-mlittle-endian",],
2121
features: "+soft-float,+strict-align,+v6k".into(),
22-
// atomics not available until ARMv6T2
23-
atomic_cas: false,
24-
max_atomic_width: Some(0),
22+
// CAS atomics are implemented in LLVM on this target using __sync* functions,
23+
// which were added to compiler-builtins in https://github.com/rust-lang/compiler-builtins/pull/1050
24+
atomic_cas: true,
2525
has_thumb_interworking: true,
26+
max_atomic_width: Some(32),
2627
..base::arm_none::opts()
2728
},
2829
}

0 commit comments

Comments
 (0)