aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/atomics.zig
AgeCommit message (Collapse)Author
2025-07-30llvm: fix atomic widening of packed structsKendall Condon
Additionally, disable failing big-endian atomic test also improve test paramaters to catch this when condition is removed also some other cleanups
2025-07-22aarch64: add new from scratch self-hosted backendJacob Young
2025-06-28riscv64: skip failing testsBingwu Zhang
2025-06-16rename spirv backend nameAli Cheraghi
`stage2_spirv64` -> `stage2_spirv`
2025-06-05std.Target: Introduce Cpu convenience functions for feature tests.Alex Rønne Petersen
Before: * std.Target.arm.featureSetHas(target.cpu.features, .has_v7) * std.Target.x86.featureSetHasAny(target.cpu.features, .{ .sse, .avx, .cmov }) * std.Target.wasm.featureSetHasAll(target.cpu.features, .{ .atomics, .bulk_memory }) After: * target.cpu.has(.arm, .has_v7) * target.cpu.hasAny(.x86, &.{ .sse, .avx, .cmov }) * target.cpu.hasAll(.wasm, &.{ .atomics, .bulk_memory })
2025-02-24test: skip failing tests with spirv-vulkanAli Cheraghi
2024-11-04test: Disable 128-bit atomics behavior tests on aarch64_be.Alex Rønne Petersen
See: https://github.com/ziglang/zig/issues/21892
2024-10-04remove `@fence` (#21585)David Rubin
closes #11650
2024-09-12test: Re-enable a bunch of behavior tests with LLVM.Alex Rønne Petersen
Closes #10627. Closes #12013. Closes #18034.
2024-08-28std: update `std.builtin.Type` fields to follow naming conventionsmlugg
The compiler actually doesn't need any functional changes for this: Sema does reification based on the tag indices of `std.builtin.Type` already! So, no zig1.wasm update is necessary. This change is necessary to disallow name clashes between fields and decls on a type, which is a prerequisite of #9938.
2024-07-28std.Target.Cpu.Arch: Remove the `aarch64_32` tag.Alex Rønne Petersen
This is a misfeature that we inherited from LLVM: * https://reviews.llvm.org/D61259 * https://reviews.llvm.org/D61939 (`aarch64_32` and `arm64_32` are equivalent.) I truly have no idea why this triple passed review in LLVM. It is, to date, the *only* tag in the architecture component that is not, in fact, an architecture. In reality, it is just an ILP32 ABI for AArch64 (*not* AArch32). The triples that use `aarch64_32` look like `aarch64_32-apple-watchos`. Yes, that triple is exactly what you think; it has no ABI component. They really, seriously did this. Since only Apple could come up with silliness like this, it should come as no surprise that no one else uses `aarch64_32`. Later on, a GNU ILP32 ABI for AArch64 was developed, and support was added to LLVM: * https://reviews.llvm.org/D94143 * https://reviews.llvm.org/D104931 Here, sanity seems to have prevailed, and a triple using this ABI looks like `aarch64-linux-gnu_ilp32` as you would expect. As can be seen from the diffs in this commit, there was plenty of confusion throughout the Zig codebase about what exactly `aarch64_32` was. So let's just remove it. In its place, we'll use `aarch64-watchos-ilp32`, `aarch64-linux-gnuilp32`, and so on. We'll then translate these appropriately when talking to LLVM. Hence, this commit adds the `ilp32` ABI tag (we already have `gnuilp32`).
2024-07-26riscv: implement `@cmpxchg*` and remove fixesDavid Rubin
2024-07-26riscv: update tests and fix reuse bugDavid Rubin
2024-07-14riscv: implement `@fence`David Rubin
2024-07-14riscv: `@atomicRmw`David Rubin
Now we generate debug undefined constants when the user asks for them to dedup across the function decl. This takes 2 instructions instead of 7 in the RISC-V backend. TODO, we need to dedupe across function decl boundaries.
2024-07-12Zcu: allow atomic operations on packed structsJacob Young
Same validation rules as the backing integer would have.
2024-05-11riscv: add stage2_riscv to test matrix and bypass failing testsDavid Rubin
2024-03-11std.builtin: make atomic order fields lowercaseTristan Ross
2023-12-03x86_64: implement more atomic opsJacob Young
2023-09-19behavior: disable another test regressed by LLVM 17 for mipsJacob Young
Tracked by #16846
2023-09-19compiler_rt: fix fp sub being optimized to call itselfJacob Young
Closes #16844 Reduces #16846
2023-09-19disable behavior tests regressed by LLVM 17Andrew Kelley
See #16844 See #16845 See #16846 See #16848
2023-06-24all: migrate code to new cast builtin syntaxmlugg
Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change
2023-06-13all: replace `comptime try` with `try comptime`Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-05-31enable passing behavior testsLuuk de Gram
2023-05-20spirv: more passing testsRobin Voetter
2023-05-11setup spirv backend in behavior testsAli Chraghi
2023-05-01x86_64: fix large not and atomicrmwJacob Young
2023-04-26wasm: enable atomics behavior testsLuuk de Gram
2023-04-21cbe: implement 128-bit atomics supportJacob Young
* Disable 128-bit atomics for x86_64 generic (currently also baseline) because they require heavy abi agreement to correctly lower. ** This is a breaking change ** * Enable 128-bit atomics for aarch64 in Sema since it just works.
2023-04-21cbe: fix issues with atomic floatsJacob Young
Since the Zig language documentation claims support for `.Min` and `.Max` in `@atomicRmw` with floats, allow in Sema and implement for both the llvm and C backends.
2023-04-15CI: more C backend test coverageAndrew Kelley
The CI now runs C backend tests in addition to compiling them. It uses -std=c99 -pedantic -Werror in order to catch non-conformant C code. This necessitated disabling a test case that caused a C compile error, in addition to disabling a handful of warnings that are already being triggered by Zig's C backend output for the behavior tests. The upshot is that I was able to, very cleanly, integrate the C backend tests into the build system, so that it communicates via the test runner protocol along with all the other behavior tests.
2023-04-13x86_64: fix atomic loop implementationJacob Young
2023-03-25x86_64: fix cmpxchgJacob Young
2023-03-21x86_64: implement atomic and fence opsJacob Young
2023-01-02fix behavior test compile errorAndrew Kelley
I bungled the commit 995c36dcb1a82c3ec9cbd0cd7bfbadd5c0abd10e during the merge. Sorry about that.
2023-01-02avoid testing `inline for` in unrelated behavior testsAndrew Kelley
2023-01-02skip "atomicrmw with 128-bit ints" on everything except cbekcbanner
2023-01-02skip "atomicrmw with 128-bit ints" on linux x64_64 due to linker errorkcbanner
2023-01-02fmt fixupskcbanner
2023-01-02tests: add more coverage for 128 bit operationskcbanner
- fixup 128-bit atomics test to only run on x86_64 - add truncation test for 128-bit types, including non power of two targets (there was a bug with broken non-power-of-two truncation in the cbe) - add 128-bit binary not test (covers another bug fixed in the cbe)
2023-01-01cbe: add msvc flt atomics, re-enable testkcbanner
2023-01-01cbe: all behaviour tests now pass on msvckcbanner
- Fix zig_clz_u128 not respecting the bits argument. This was crashing the compile-rt addxf3 tests with the cbe - Instead of redering a negation for negative 128 bit int literals, render the literal as twos complement. This allows rendering int representations of floats correctly (specifically f80).
2023-01-01tests: disable function alignment test for cbe, add 128-bit atomicrmw testskcbanner
2023-01-01cbe: implement 128 bit atomic operations with cmpxchg loopskcbanner
- Enable 128 bit atomic int tests for the cbe only
2023-01-01tests: update "atomicrmw with ints" to test u8 through u64kcbanner
2023-01-01cbe: msvc atomicskcbanner
- Implement most atomic operations for msvc - Disable "atomicrmw with floats" test for cbe
2022-12-27Revert "aarch64: reenable tests that are no longer regressed"Andrew Kelley
This reverts commit 3370d58956ecc744a004dff47b0437473f0ef7da. This commit was done with an LLVM build that did not have assertions enabled. There are LLVM assertions being triggered due to this commit. Reopens #10627 Reopens #12013 Reopens #12027
2022-12-10aarch64: reenable tests that are no longer regressedr00ster91
Closes #12013 Closes #10627 Closes #12027
2022-12-06remove references to stage1 in behavior testsAndrew Kelley
Good riddance.