aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/var_args.zig
AgeCommit message (Collapse)Author
2025-09-20aarch64: enable fixed behaviorJacob Young
2025-08-30test: disable some varargs behavior tests on RISC-V due to LLVM 21 regressionAlex Rønne Petersen
https://github.com/ziglang/zig/issues/25064
2025-08-28behavior tests: remove "variadic functions" dependency on std libAndrew Kelley
2025-08-11std.ArrayList: make unmanaged the defaultAndrew Kelley
2025-07-27aarch64: implement var argsJacob Young
2025-07-22aarch64: add new from scratch self-hosted backendJacob Young
2025-06-16rename spirv backend nameAli Cheraghi
`stage2_spirv64` -> `stage2_spirv`
2025-04-28test: Disable some varargs behavior tests on sparc.Alex Rønne Petersen
https://github.com/ziglang/zig/issues/23718
2025-02-24test: skip failing tests with spirv-vulkanAli Cheraghi
2025-01-16x86_64: implement switch jump tablesJacob Young
2025-01-16all: update to `std.builtin.Type.Pointer.Size` field renamesmlugg
This was done by regex substitution with `sed`. I then manually went over the entire diff and fixed any incorrect changes. This diff also changes a lot of `callconv(.C)` to `callconv(.c)`, since my regex happened to also trigger here. I opted to leave these changes in, since they *are* a correct migration, even if they're not the one I was trying to do!
2024-09-24std: add arch bits for s390x-linux (#21342)Meghan Denny
see #21402
2024-06-13riscv: `std.fmt.format` runningDavid Rubin
- implements `airSlice`, `airBitAnd`, `airBitOr`, `airShr`. - got a basic design going for the `airErrorName` but for some reason it simply returns empty bytes. will investigate further. - only generating `.got.zig` entries when not compiling an object or shared library - reduced the total amount of ops a mnemonic can have to 3, simplifying the logic
2024-05-11riscv: add stage2_riscv to test matrix and bypass failing testsDavid Rubin
2023-11-19test: update behavior to silence 'var is never mutated' errorsmlugg
2023-10-15spirv: update failing / passing testsRobin Voetter
Some tests are now failing due to debug info changes, some tests now pass due to improved compiler functionality.
2023-10-13Sema: fix crash when ref coercion dest is var argsAndrew Kelley
When analyzing the `validate_ref_ty` ZIR instruction, an assertion would trip if the result type was a var args function argument. The fix is the same as e6b73be870a39f4da7a08a40da23e38b5e9613da - inline the logic of `resolveType` and handle the case of var args. Closes #17494
2023-10-12Sema: fix crash when coercion dest is var argsAndrew Kelley
When analyzing the `as` ZIR instruction, an assertion would trip if the result type was a var args function argument. The fix is simple: inline a little bit of the `resolveType` logic into `analyzeAs` to make it detect this situation - which it was already attempting to do. Closes #16197
2023-10-07x86_64: implement C var argsJacob Young
2023-09-23spirv: disable failing testsRobin Voetter
2023-09-19langref: disable var args example on aarch64-windowsAndrew Kelley
See tracking issues #14096 and #16961. Also, any time a test is skipped it should link to the open bug report for it.
2023-07-31std: finish cleanup up asmJacob Young
This also required implementing the necessary syntax in the x86_64 backend.
2023-05-20spirv: ptr_elem_valRobin Voetter
Implements the ptr_elem_val air tag. Implementation is unified with ptr_elem_ptr.
2023-05-20spirv: more passing testsRobin Voetter
2023-05-11setup spirv backend in behavior testsAli Chraghi
2023-04-28stage2: sparc64: Skip unimplemented testsKoakuma
2023-04-20behavior: fix test disable conditionJacob Young
2023-04-20wasm: integrate new Liveness behaviourLuuk de Gram
Uses the new liveness behaviour. This also removes useless calls to `processDeath` on branches that were just initialized. Branch consolidation and processing deaths on branches inside `condbr` is still a TODO, just like before. This also skips var_args on other native backends as they do not support this feature yet.
2023-04-20Liveness: avoid emitting unused instructions or marking their operands as usedmlugg
Backends want to avoid emitting unused instructions which do not have side effects: to that end, they all have `Liveness.isUnused` checks for many instructions. However, checking this in the backends avoids a lot of potential optimizations. For instance, if a nested field is loaded, then the first field access would still be emitted, since its result is used by the next access (which is then unreferenced). To elide more instructions, Liveness can track this data instead. For operands which do not have to be lowered (i.e. are not side effecting and are not something special like `arg), Liveness can ignore their operand usages, and push the unused information further up, potentially marking many more instructions as unreferenced. In doing this, I also uncovered a bug in the LLVM backend relating to discarding the result of `@cVaArg`, which this change fixes. A behaviour test has been added to cover it.
2023-02-23CBE: implement the futureJacob Young
Turns out f(...) will be supported one day.
2023-02-23CBE: implement c varargsJacob Young
Removed some backend test skip checks for things disabled in std.
2022-12-27disable failing C var arg behavior testsAndrew Kelley
See tracking issue #14096
2022-12-17implement defining C variadic functionsVeikka Tuominen
2022-12-10stage2: sparc64: Skip unimplemented testsKoakuma
2022-06-25stage2 ARM: implement basic intCast and error union wrappingjoachimschmidt557
2022-03-17CBE: enable more tests that are currently passingDaniele Cocca
2022-03-16stage2 ARM: genSetStack for stack_argument_offsetjoachimschmidt557
2022-03-13stage2 AArch64: enable mul for ints with <= 64 bitsjoachimschmidt557
2022-03-09wasm: Enable passing behavior testsLuuk de Gram
This also adds some float-related instructions to MIR/Emit
2022-03-01LLVM: add extra padding to structs and tuples sometimesAndrew Kelley
* Sema: resolve type fully when emitting an alloc AIR instruction to avoid tripping assertion for checking struct field alignment. * LLVM backend: keep a reference to the LLVM target data alive during lowering so that we can ask LLVM what it thinks the ABI alignment and size of LLVM types are. We need this in order to lower tuples and structs so that we can put in extra padding bytes when Zig disagrees with LLVM about the size or alignment of something. * LLVM backend: make the LLVM struct type packed that contains the most aligned union field and the padding. This prevents the struct from being too big according to LLVM. In the future, we may want to consider instead emitting unions in a "flat" manner; putting the tag, most aligned union field, and padding all in the same struct field space. * LLVM backend: make structs with 2 or fewer fields return isByRef=false. This results in more efficient codegen. This required lowering of bitcast to sometimes store the struct into an alloca, ptrcast, and then load because LLVM does not allow bitcasting structs. * enable more passing behavior tests.
2022-02-14stage2 AArch64: Enable behavior testingjoachimschmidt557
2022-02-12move more behavior tests to the "passing" sectionAndrew Kelley
2021-06-21fix code broken from previous commitJacob G-W
2021-06-21std, src, doc, test: remove unused variablesJacob G-W
2021-05-08Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
Conflicts: * doc/langref.html.in * lib/std/enums.zig * lib/std/fmt.zig * lib/std/hash/auto_hash.zig * lib/std/math.zig * lib/std/mem.zig * lib/std/meta.zig * test/behavior/alignof.zig * test/behavior/bitcast.zig * test/behavior/bugs/1421.zig * test/behavior/cast.zig * test/behavior/ptrcast.zig * test/behavior/type_info.zig * test/behavior/vector.zig Master branch added `try` to a bunch of testing function calls, and some lines also had changed how to refer to the native architecture and other `@import("builtin")` stuff.
2021-04-29move behavior tests from test/stage1/ to test/Andrew Kelley
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.