aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2025-02-22Dwarf: fix lowering of comptime-only optional pointer `null` valuesJacob Young
Closes #22974
2025-02-22Type: resolve union tag type before checking for runtime bitsDavid Rubin
2025-02-22zig build fmtAndrew Kelley
2025-02-23tests: disable failing testsmlugg
These were previously incremental tests, so weren't running. They didn't *need* to be incremental. They worked under the old runner because of how it directly integrated with the compiler so tracked error messages differently.
2025-02-23cases: remove old incremental case systemmlugg
We now run incremental tests with `tools/incr-check.zig` (with the actual cases being in `test/incremental/`).
2025-02-22stage2-wasm: implement switch_dispatch + handle > 32 bit integers in switchesPavel Verigo
Updated solution is future proof for arbitary size integer handling for both strategies .br_table lowering if switch case is dense, .br_if base jump table if values are too sparse.
2025-02-22Merge pull request #22659 from ifreund/linker-script-fixAndrew Kelley
link: fix ambiguous names in linker scripts
2025-02-22AstGen: make layout specifiers on opaque containers a compile errorDavid Rubin
2025-02-22link.MachO: Add support for the -x flag (discard local symbols).Alex Rønne Petersen
This can also be extended to ELF later as it means roughly the same thing there. This addresses the main issue in #21721 but as I don't have a macOS machine to do further testing on, I can't confirm whether zig cc is able to pass the entire cgo test suite after this commit. It can, however, cross-compile a basic program that uses cgo to x86_64-macos-none which previously failed due to lack of -x support. Unlike previously, the resulting symbol table does not contain local symbols (such as C static functions). I believe this satisfies the related donor bounty: https://ziglang.org/news/second-donor-bounty
2025-02-22Merge pull request #22941 from Techatrix/config-headerAndrew Kelley
std.Build.Step.ConfigHeader: improve handling of autoconf style headers
2025-02-22x86_64: rewrite scalar `@bitReverse`Jacob Young
2025-02-22Sema: Fix fnptr alignment safety checks to account for potential ISA tag.Alex Rønne Petersen
As seen on e.g. Arm/Thumb and MIPS (MIPS16/microMIPS). Fixes #22888.
2025-02-21added compile_error test coverage for issue 17166Benjamin Thompson
2025-02-20test: Disable packet timeout for debugger tests.Alex Rønne Petersen
On my machine, the defaults are 5 seconds (LLDB) and 2 seconds (GDB). These are too low on the CI machines during high load, and the CI system itself already enforces a timeout on jobs anyway, so just disable the timeout altogether.
2025-02-20translate-c: fix division and modulo of >8-bit stdint.h types in macrosChristian Fillion
Broke in c616141241047d6d6c811d43f644eb1b7d2b26ce and e64eef366c68592f6daf063a8b8f85b8626a1598
2025-02-19Merge pull request #22932 from jacobly0/x86_64-rewriteAndrew Kelley
x86_64: start rewriting bit counting operations
2025-02-19std.Build.Step.ConfigHeader: permit inserting enum valuesTechatrix
2025-02-19std.Build.Step.ConfigHeader: skip trailing whitespace in autoconf headerTechatrix
2025-02-19std.Build.Step.ConfigHeader: allow using autoconf values multiple timesTechatrix
2025-02-19add a standalone test for autoconf style addConfigHeaderTechatrix
2025-02-18x86_64: rewrite scalar `@popCount`Jacob Young
2025-02-18x86_64: rewrite scalar `@ctz`Jacob Young
2025-02-18spirv: ziggify and remove unknown spirv featuresAli Cheraghi
`OpCapability` and `OpExtension` now can also be emitted from inline assembly
2025-02-17Merge pull request #22913 from jacobly0/x86_64-rewriteAndrew Kelley
x86_64: rewrite unsafe int vector multiplication
2025-02-17test: Update some compiler-internal type names in expected output.Alex Rønne Petersen
2025-02-17std.Target: Remove functions that just wrap component functions.Alex Rønne Petersen
Functions like isMinGW() and isGnuLibC() have a good reason to exist: They look at multiple components of the target. But functions like isWasm(), isDarwin(), isGnu(), etc only exist to save 4-8 characters. I don't think this is a good enough reason to keep them, especially given that: * It's not immediately obvious to a reader whether target.isDarwin() means the same thing as target.os.tag.isDarwin() precisely because isMinGW() and similar functions *do* look at multiple components. * It's not clear where we would draw the line. The logical conclusion before this commit would be to also wrap Arch.isX86(), Os.Tag.isSolarish(), Abi.isOpenHarmony(), etc... this obviously quickly gets out of hand. * It's nice to just have a single correct way of doing something.
2025-02-17std.builtin: Remove CallingConvention.arm_(apcs,aapcs16_vfp).Alex Rønne Petersen
* arm_apcs is the long dead "OABI" which we never had working support for. * arm_aapcs16_vfp is for arm-watchos-none which is a dead target that we've dropped support for.
2025-02-17x86_64: rewrite scalar `@byteSwap`Jacob Young
2025-02-17x86_64: rewrite unsafe int vector multiplicationJacob Young
2025-02-17Sema: make source location in checkCallConvSupportsVarArgs more meaningfulTw
As calling convention may not be specified explicitly in the source, so use va_arg's location instead. Signed-off-by: Tw <tw19881113@gmail.com>
2025-02-15x86_64: rewrite unsafe scalar int multiplicationJacob Young
2025-02-15x86_64: rewrite array accessJacob Young
2025-02-15test: fix windows CIJacob Young
2025-02-15x86_64: rewrite scalar and vector int `@rem`Jacob Young
2025-02-15x86_64: rewrite scalar and vector int `@divTrunc`Jacob Young
2025-02-15x86_64: implement unsafe scalar and vector integer add/subJacob Young
2025-02-15x86_64: implement error set and enum safetyJacob Young
This is all of the expected 0.14.0 progress on #21530, which can now be postponed once this commit is merged. This required rewriting the (un)wrap operations since the original implementations were extremely buggy. Also adds an easy way to retrigger Sema OPV bugs so that I don't have to keep updating #22419 all the time.
2025-02-12x86_64: implement conversions between float and int vectorsJacob Young
2025-02-10cbe: fix ub triggered by mulw overflowing the promoted typeJacob Young
Closes #21914
2025-02-10cbe: fix crash rendering argument names in lazy functionsJacob Young
Closes #19905
2025-02-10link: fix ambiguous names in linker scriptsIsaac Freund
Currently zig fails to build while linking the system LLVM/C++ libraries on my Chimera Linux system due to the fact that libc++.so is a linker script with the following contents: INPUT(libc++.so.1 -lc++abi -lunwind) Prior to this commit, zig would try to convert "ambiguous names" in linker scripts such as libc++.so.1 in this example into -lfoo style flags. This fails in this case due to the so version number as zig checks for exactly the .so suffix. Furthermore, I do not think that this conversion is semantically correct since converting libfoo.so to -lfoo could theoretically end up resulting in libfoo.a getting linked which seems wrong when a different file is specified in the linker script. With this patch, this attempted conversion is removed. Instead, zig always first checks if the exact file/path in the linker script exists relative to the current working directory. If the file is classified as a library (including versioned shared objects such as libfoo.so.1), zig then falls back to checking if the exact file/path in the linker script exists relative to each directory in the library search path, selecting the first match or erroring out if none is found. This behavior fixes the regression that prevents building zig while linking the system LLVM/C++ libraries on Chimera Linux.
2025-02-09x86_64: implement conversions between scalar floats and intsJacob Young
Closes #22797
2025-02-07Merge pull request #20511 from archbirdplusAndrew Kelley
runtime page size detection rework GeneralPurposeAllocator to reduce active mapping count Allocator VTable API update
2025-02-07Merge pull request #22717 from jacobly0/x86_64-rewriteAndrew Kelley
x86_64: rewrite `@truncate`
2025-02-07test: check @tagName() in callconv C functionIsaac Freund
This is a regression test for an x86_64 backend miscompilation when using @tagName() in a callconv(.c) function with -fPIC.
2025-02-06std.heap: delete LoggingAllocator and friendsAndrew Kelley
I don't think these belong in std, at least not in their current form. If someone wants to add these back I'd like to review the patch before it lands. Reverts 629e2e784495dd8ac91493fa7bb11e1772698e42
2025-02-06wasm: disable failing testsJacob Young
2025-02-06x86_64: rewrite float `@mod`Jacob Young
2025-02-06x86_64: avoid comparing different transcendental function implsJacob Young
2025-02-06x86_64: rewrite most of the remaining float opsJacob Young