Commit Graph

8 Commits

Author SHA1 Message Date
Andrei Safronov
6a57c4d5d5 newlib: fix clang atomics
Correction of the SYNC_LOCK_* macros in stdatomic
2021-11-02 16:24:18 +01:00
Scott Mabin
710c1f2fad remove __clang ifdef around atomic emulation
* CI errors led me to believe these were needed, but as it turns out the
load/store intrinsics are required even when idf is built by gcc when
linking to a clang based project.
* remove ... postfix inside `SYNC_LOCK_TEST_AND_SET` expansion
2021-11-02 16:24:18 +01:00
Scott Mabin
b01c197505 newlib: provide missing atomic libcalls
Provide emulated atomic load & store libcalls for u8, u16 & u32 integer
types. This is required when building with Clang as llvm does not lower
these operations to native load / stores, where as gcc does.

Provide `sync_lock_test_and_set` atomic implementations for all
supported integer types.

Closes https://github.com/espressif/esp-idf/issues/7591.
Closes https://github.com/espressif/esp-idf/issues/7592.
2021-11-02 16:24:18 +01:00
Andrei Safronov
de5e0fa3bd newlib,clang: implement __sync_* atomics for clang/llvm toolchain. 2021-11-02 16:24:18 +01:00
Ivan Grokhotkov
d4f2e03e4a newlib: stdatomic: emulate 64-bit atomics on 32-bit SMP SoCs
Closes https://github.com/espressif/esp-idf/issues/3163
2021-11-02 16:24:18 +01:00
Ivan Grokhotkov
be520f975a newlib: stdatomic: fix prototypes, don't disable compiler warnings 2021-11-02 16:24:18 +01:00
Sachin Parekh
2250da111e stdatomic: Implemented legacy __sync APIs and __atomic_exchange_n
These APIs are used when the architecture doesn't have atomic
instruction support

Closes https://github.com/espressif/esp-idf/issues/6463
2021-11-02 16:24:18 +01:00
Renz Bagaporo
5f2fabb2b1 arch: move stdatomic 2021-11-02 16:24:18 +01:00