diff options
| author | Taiki Endo <te316e89@gmail.com> | 2023-09-23 20:44:03 +0900 |
|---|---|---|
| committer | Taiki Endo <te316e89@gmail.com> | 2023-09-23 21:17:22 +0900 |
| commit | ecefd4eb3f3bbd14d715586f8b6c5caae6779a6c (patch) | |
| tree | f345dc290f2ff348b02960aa8f73b92bec800e74 | |
| parent | 3050938abd423f9e37466cc4cd4129c9b8cc427c (diff) | |
| download | rust-ecefd4eb3f3bbd14d715586f8b6c5caae6779a6c.tar.gz rust-ecefd4eb3f3bbd14d715586f8b6c5caae6779a6c.zip | |
Set max_atomic_width for riscv32*-esp-espidf to 32
| -rw-r--r-- | compiler/rustc_target/src/spec/riscv32imac_esp_espidf.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/riscv32imc_esp_espidf.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_target/src/spec/riscv32imac_esp_espidf.rs b/compiler/rustc_target/src/spec/riscv32imac_esp_espidf.rs index 0795065409a..25f5c3bc2a6 100644 --- a/compiler/rustc_target/src/spec/riscv32imac_esp_espidf.rs +++ b/compiler/rustc_target/src/spec/riscv32imac_esp_espidf.rs @@ -17,7 +17,7 @@ pub fn target() -> Target { // As RiscV32IMAC architecture does natively support atomics, // automatically enable the support for the Rust STD library. - max_atomic_width: Some(64), + max_atomic_width: Some(32), atomic_cas: true, features: "+m,+a,+c".into(), diff --git a/compiler/rustc_target/src/spec/riscv32imc_esp_espidf.rs b/compiler/rustc_target/src/spec/riscv32imc_esp_espidf.rs index 25638a092b5..3aa9923ee4d 100644 --- a/compiler/rustc_target/src/spec/riscv32imc_esp_espidf.rs +++ b/compiler/rustc_target/src/spec/riscv32imc_esp_espidf.rs @@ -16,11 +16,11 @@ pub fn target() -> Target { cpu: "generic-rv32".into(), // While the RiscV32IMC architecture does not natively support atomics, ESP-IDF does support - // the __atomic* and __sync* GCC builtins, so setting `max_atomic_width` to `Some(64)` + // the __atomic* and __sync* GCC builtins, so setting `max_atomic_width` to `Some(32)` // and `atomic_cas` to `true` will cause the compiler to emit libcalls to these builtins. // // Support for atomics is necessary for the Rust STD library, which is supported by the ESP-IDF framework. - max_atomic_width: Some(64), + max_atomic_width: Some(32), atomic_cas: true, features: "+m,+c".into(), |
