Commit Graph

8 Commits

Author SHA1 Message Date
Andrei Safronov
cb6e5b0980 newlib: fix clang atomics
Correction of the SYNC_LOCK_* macros in stdatomic
2021-10-21 17:34:48 +01:00
Scott Mabin
d5e4fc8356 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-10-14 15:01:21 +01:00
Scott Mabin
d93b53b9e5 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-10-08 18:46:09 +08:00
Andrei Safronov
40daaa9d56 newlib,clang: implement __sync_* atomics for clang/llvm toolchain. 2021-07-15 20:36:40 +03:00
Ivan Grokhotkov
742102079a newlib: stdatomic: emulate 64-bit atomics on 32-bit SMP SoCs
Closes https://github.com/espressif/esp-idf/issues/3163
2021-05-10 18:13:36 +02:00
Ivan Grokhotkov
32fcd4f02a newlib: stdatomic: fix prototypes, don't disable compiler warnings 2021-05-10 18:13:35 +02:00
Sachin Parekh
b1eacc24f2 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-04-23 11:18:58 +05:30
Renz Bagaporo
b1027005df arch: move stdatomic 2021-02-26 18:40:00 +08:00