aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-02-17Merge pull request #22913 from jacobly0/x86_64-rewriteAndrew Kelley
x86_64: rewrite unsafe int vector multiplication
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.Target: Move osArchName() and Cpu.Arch.archName() to std.zig.target.Alex Rønne Petersen
These deal with how Zig stores OS headers in `lib/libc/include` and so don't really belong in std.Target.
2025-02-17std.Target: Move Cpu.Arch.supportsAddressSpace() up to Cpu.Alex Rønne Petersen
This allows it to inspect CPU features which is needed for Propeller, and AVR in the future.
2025-02-17std.Target: Make Cpu.Arch.supportsAddressSpace() take an optional context.Alex Rønne Petersen
Allows deduplicating the code in Sema.
2025-02-17std.builtin: Rename CallingConvention.propeller1_sysv to propeller_sysv.Alex Rønne Petersen
2025-02-17std.builtin: Rename CallingConvention.wasm_watc to wasm_mvp.Alex Rønne Petersen
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-17std.Target: Remove Cpu.Arch.propeller2 and use a CPU feature instead.Alex Rønne Petersen
2025-02-17std.Target: Remove Cpu.Arch.spu_2.Alex Rønne Petersen
This was for a hobby project that appears to be dormant for now. This can be added back if the project is resumed in the future.
2025-02-17x86_64: implement prefetchJacob Young
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: reuse integer `@divTrunc` for `@divExact`Jacob Young
2025-02-15main: increase thread stack size for non-x86_64 backendsJacob Young
I observed a stack overflow during x86_64 CodeGen in a debug compiler compiled by the llvm backend. This happens while compiling `main.buildOutputType` due to the Air being nested almost 500 levels.
2025-02-15x86_64: rewrite array accessJacob 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-13Expand zig fetch usage help doc to explain URL (#22850)Michael Lynch
The current zig fetch help docs tell the user to specify a package's URL, but it's unclear what the URL should be. This change expands the help output to explain what URLs the zig fetch command can handle and provides examples of valid URLs. Related: #20096 A git bundle file seems to be the more accurate term, as it's what git uses in its documentation: https://git-scm.com/docs/git-bundle
2025-02-12x86_64: implement conversions between float and int vectorsJacob Young
2025-02-11Merge pull request #22862 from ziglang/fuzzAndrew Kelley
fuzzer: write inputs to shared memory before running
2025-02-11Compilation: disable error return tracing in rt libsAndrew Kelley
2025-02-11link.Elf: implement non-alloc `{SET,SUB}_ULEB128`David Rubin
2025-02-11ZigLLVMTargetMachineEmitToFile: schedule sancov pass depending on modeAndrew Kelley
In debug mode, schedule it early. In release modes, schedule it late.
2025-02-10cbe: fix incomplete array element typesJacob Young
Can't imagine this working, but might as well try until I remember why. Closes #21439
2025-02-10cbe: fix crash rendering argument names in lazy functionsJacob Young
Closes #19905
2025-02-10cbe: emit linksection for `@export`Jacob Young
Closes #21490
2025-02-10link: simplify control flowIsaac Freund
This refactor was left out of the previous commit to make the diff less noisy and easier to review. There should be no change in behavior.
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-10std.ArrayList: popOrNull() -> pop() [v2] (#22720)Meghan Denny
2025-02-09x86_64: implement conversions between scalar floats and intsJacob Young
Closes #22797
2025-02-08Merge pull request #22808 from ziglang/fast-gpaAndrew Kelley
introduce std.heap.SmpAllocator
2025-02-07x86_64: fix backend assertion failuresJacob Young
Fixes the backend portion of #22798
2025-02-07std.ArrayHashMap: popOrNul() -> pop()Meghan Denny
2025-02-07compiler: use std.heap.smp_allocatorAndrew Kelley
In main, now this allocator is chosen by default when compiling without libc in ReleaseFast or ReleaseSmall, and not targeting WebAssembly.
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-07x86_64: fix calling convention typosJacob Young
2025-02-07Dwarf: fix cross_section_relocs capacityIsaac Freund
This ensure capacity call does not match the number of appendAssumeCapacity() calls that follow it. Fix this. This was discovered due to hitting the assertion failure in appendAssumeCapacity() while building river. I'm not sure how to isolate a minimal reproducer for a test.
2025-02-06adjust runtime page size APIsAndrew Kelley
* fix merge conflicts * rename the declarations * reword documentation * extract FixedBufferAllocator to separate file * take advantage of locals * remove the assertion about max alignment in Allocator API, leaving it Allocator implementation defined * fix non-inline function call in start logic The GeneralPurposeAllocator implementation is totally broken because it uses global state but I didn't address that in this commit.
2025-02-06runtime page size detectionArchbirdplus
heap.zig: define new default page sizes heap.zig: add min/max_page_size and their options lib/std/c: add miscellaneous declarations heap.zig: add pageSize() and its options switch to new page sizes, especially in GPA/stdlib mem.zig: remove page_size
2025-02-06Merge pull request #22777 from mlugg/some-bugsMatthew Lugg
Fix a bunch of frontend bugs
2025-02-06x86_64: rewrite float `@mod`Jacob Young
2025-02-06x86_64: avoid comparing different transcendental function implsJacob Young
2025-02-06x86_64: remove cases that are impossible to lowerJacob Young
2025-02-06x86_64: rewrite most of the remaining float opsJacob Young