aboutsummaryrefslogtreecommitdiff
path: root/lib/std/special/compiler_rt/atomics.zig
AgeCommit message (Collapse)Author
2022-05-06flatten lib/std/special and improve "pkg inside another" logicAndrew Kelley
stage2: change logic for detecting whether the main package is inside the std package. Previously it relied on realpath() which is not portable. This uses resolve() which is how imports already work. * stage2: fix cleanup bug when creating Module * flatten lib/std/special/* to lib/* - this was motivated by making main_pkg_is_inside_std false for compiler_rt & friends. * rename "mini libc" to "universal libc"
2022-04-15compiler_rt: atomics: clr -> clrbKoakuma
2022-04-15compiler_rt: atomics: Formatting change for flag definitionKoakuma
2022-04-15compiler_rt: atomics: Add Leon CAS instruction check for SPARC atomicsKoakuma
2022-04-15ompiler_rt: atomics: Split long lines and add comment on constantsKoakuma
2022-04-15compiler_rt: atomics: Add TAS lock support for SPARCKoakuma
Some SPARC CPUs (particularly old and/or embedded ones) only has atomic TAS instruction available (`ldstub`). This adds support for emitting that instruction in the spinlock.
2022-01-02compiler-rt: small refactor in atomicsAndrew Kelley
2022-01-02compiler-rt: simplify implementationsAndrew Kelley
This improves readability as well as compatibility with stage2. Most of compiler-rt is now enabled for stage2 with just a few functions disabled (until stage2 passes more behavior tests).
2021-11-18compiler_rt: disable spinlocks for atomic instrinsics for bpfKenta Iwasaki
The BPF target does not support mutable global variables. Mark the BPF target as a target that does not support atomic variables in order to avoid including the global spinlock table provided in compiler_rt.
2021-10-04migrate from `std.Target.current` to `@import("builtin").target`Andrew Kelley
closes #9388 closes #9321
2021-08-24remove redundant license headers from zig standard libraryAndrew Kelley
We already have a LICENSE file that covers the Zig Standard Library. We no longer need to remind everyone that the license is MIT in every single file. Previously this was introduced to clarify the situation for a fork of Zig that made Zig's LICENSE file harder to find, and replaced it with their own license that required annual payments to their company. However that fork now appears to be dead. So there is no need to reinforce the copyright notice in every single file.
2021-06-21fix code broken from previous commitJacob G-W
2021-06-14add ast-check flag to zig fmt, fix found bugsVeikka Tuominen
2021-04-15std: change `@import("builtin")` to `std.builtin`Andrew Kelley
2020-12-31Year++Frank Denis
2020-12-09compiler-rt: Avoid exposing atomic builtins when not supportedLemonBoy
Let's a void any kind of compilation/LLVM errors for niche targets such as AVR/MSP430 or ARM v6m. By not exporting any atomic builtin anymore the user is free to provide their own implementation (that disable the IRQs) or to provide the --single-threaded switch and forget about this.
2020-08-20add license header to all std lib filesAndrew Kelley
add SPDX license identifier copyright ownership is zig contributors
2020-04-06compiler-rt: Separate max size allowed for load/store and CASLemonBoy
The v6m ISA has no way to express a CAS loop natively without turning off the interrupts or using the kernel cmpxchg harness. On such a platform the user has to provide a few __sync_* builtins to satisfy the linker.
2020-04-05compiler_rt/atomics: be consistent with `const value`daurnimator
2020-04-05Tidy up compiler_rt/atomicsdaurnimator
2020-04-03compiler-rt: don't forget to export these functionsAndrew Kelley
2020-04-03compiler-rt: Add the __atomic family of builtinsLemonBoy
The implementation was checked against a few files using std::atomic and compiled using zig c++. Closes #4887