Skip to content

Commit

Permalink
Rollup merge of rust-lang#114497 - taiki-e:revert-riscv-atomic, r=Ama…
Browse files Browse the repository at this point in the history
…nieu

Revert rust-lang#98333 "Re-enable atomic loads and stores for all RISC-V targets"

This reverts rust-lang#98333.

As said in rust-lang#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 (rust-lang#114153), so AFAIK, there is currently no way to enable atomic load/store (via core::intrinsics) on these targets properly.

r? `@Amanieu`
  • Loading branch information
matthiaskrgr authored Aug 8, 2023
2 parents 42cdc7d + b47e4a4 commit 6f36f1f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub fn target() -> Target {
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
linker: Some("rust-lld".into()),
cpu: "generic-rv32".into(),
max_atomic_width: Some(32),
max_atomic_width: Some(0),
atomic_cas: false,
panic_strategy: PanicStrategy::Abort,
relocation_model: RelocModel::Static,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub fn target() -> Target {
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
linker: Some("rust-lld".into()),
cpu: "generic-rv32".into(),
max_atomic_width: Some(32),
max_atomic_width: Some(0),
atomic_cas: false,
features: "+m".into(),
panic_strategy: PanicStrategy::Abort,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub fn target() -> Target {
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
linker: Some("rust-lld".into()),
cpu: "generic-rv32".into(),
max_atomic_width: Some(32),
max_atomic_width: Some(0),
atomic_cas: false,
features: "+m,+c".into(),
panic_strategy: PanicStrategy::Abort,
Expand Down

0 comments on commit 6f36f1f

Please sign in to comment.