Skip to content

Commit 6f36f1f

Browse files
authored
Rollup merge of #114497 - taiki-e:revert-riscv-atomic, r=Amanieu
Revert #98333 "Re-enable atomic loads and stores for all RISC-V targets" This reverts #98333. As said in #98333 (comment), `forced-atomics` target feature is also needed to enable atomic load/store on these targets (otherwise, libcalls are generated): https://godbolt.org/z/433qeG7vd However, `forced-atomics` target feature is currently broken (#114153), so AFAIK, there is currently no way to enable atomic load/store (via core::intrinsics) on these targets properly. r? `@Amanieu`
2 parents 42cdc7d + b47e4a4 commit 6f36f1f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn target() -> Target {
1111
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
1212
linker: Some("rust-lld".into()),
1313
cpu: "generic-rv32".into(),
14-
max_atomic_width: Some(32),
14+
max_atomic_width: Some(0),
1515
atomic_cas: false,
1616
panic_strategy: PanicStrategy::Abort,
1717
relocation_model: RelocModel::Static,

Diff for: compiler/rustc_target/src/spec/riscv32im_unknown_none_elf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn target() -> Target {
1111
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
1212
linker: Some("rust-lld".into()),
1313
cpu: "generic-rv32".into(),
14-
max_atomic_width: Some(32),
14+
max_atomic_width: Some(0),
1515
atomic_cas: false,
1616
features: "+m".into(),
1717
panic_strategy: PanicStrategy::Abort,

Diff for: compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn target() -> Target {
1111
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
1212
linker: Some("rust-lld".into()),
1313
cpu: "generic-rv32".into(),
14-
max_atomic_width: Some(32),
14+
max_atomic_width: Some(0),
1515
atomic_cas: false,
1616
features: "+m,+c".into(),
1717
panic_strategy: PanicStrategy::Abort,

0 commit comments

Comments
 (0)