aboutsummaryrefslogtreecommitdiff
path: root/src/arch
AgeCommit message (Collapse)Author
2025-09-26compiler: move self-hosted backends from src/arch to src/codegenAlex Rønne Petersen
2025-09-24x86_64: improve support for large enumsJacob Young
Closes #25247
2025-09-24x86_64: support more in/out formsJacob Young
Closes #25303
2025-09-21Elf2: create a new linker from scratchJacob Young
This iteration already has significantly better incremental support. Closes #24110
2025-09-20x86_64: rewrite vector element pointer accessJacob Young
2025-09-20x86_64: fix safety crashes in `storeRegs`Jacob Young
2025-09-20x86 codegen: handle spilled tuplesAndrew Kelley
2025-09-10x86_64: fix `@splat` typoJacob Young
2025-09-10x86_64: delete usages of avx2 `vpack?s??`Jacob Young
This instruction actually has fairly useless semantics, and even the cases that were semantically correct could save 1 cycle of latency by using a different sequnce involving the avx version instead. Closes #25174
2025-09-10x86_64: fix strictness edge cases in `+|`Jacob Young
Closes #25145
2025-08-31std.fmt: delete deprecated APIsAndrew Kelley
std.fmt.Formatter -> std.fmt.Alt std.fmt.format -> std.Io.Writer.print
2025-08-29std.Io: delete GenericReaderAndrew Kelley
and delete deprecated alias std.io
2025-08-29std.Io: delete CountingReaderAndrew Kelley
2025-08-28more updates to not use GenericWriterAndrew Kelley
2025-08-28compiler: update to not use GenericWriterAndrew Kelley
2025-08-27x86_64: fix multiplication overflow detection with adxJacob Young
Closes #24965
2025-08-12replace most aggregate interns in x86_64/CodeGenJustus Klausecker
2025-08-12Sema: Improve comptime arithmetic undef handlingJustus Klausecker
This commit expands on the foundations laid by https://github.com/ziglang/zig/pull/23177 and moves even more `Sema`-only functionality from `Value` to `Sema.arith`. Specifically all shift and bitwise operations, `@truncate`, `@bitReverse` and `@byteSwap` have been moved and adapted to the new rules around `undefined`. Especially the comptime shift operations have been basically rewritten, fixing many open issues in the process. New rules applied to operators: * `<<`, `@shlExact`, `@shlWithOverflow`, `>>`, `@shrExact`: compile error if any operand is undef * `<<|`, `~`, `^`, `@truncate`, `@bitReverse`, `@byteSwap`: return undef if any operand is undef * `&`, `|`: Return undef if both operands are undef, turn undef into actual `0xAA` bytes otherwise Additionally this commit canonicalizes the representation of aggregates with all-undefined members in the `InternPool` by disallowing them and enforcing the usage of a single typed `undef` value instead. This reduces the amount of edge cases and fixes a bunch of bugs related to partially undefined vecs. List of operations directly affected by this patch: * `<<`, `<<|`, `@shlExact`, `@shlWithOverflow` * `>>`, `@shrExact` * `&`, `|`, `~`, `^` and their atomic rmw + reduce pendants * `@truncate`, `@bitReverse`, `@byteSwap`
2025-08-11std.ArrayList: make unmanaged the defaultAndrew Kelley
2025-08-11linker: delete plan9 supportAndrew Kelley
This experimental target was never fully completed. The operating system is not that interesting or popular anyway, and the maintainer is no longer around. Not worth the maintenance burden. This code can be resurrected later if it is worth it. In such case it will be subject to greater scrutiny.
2025-08-07std.Io: delete CountingWriterAndrew Kelley
2025-07-27Merge pull request #24585 from jacobly0/aarch64Andrew Kelley
aarch64: more progress
2025-07-26aarch64: implement some safety checksJacob Young
Closes #24553
2025-07-26x86_64: fix dst create alloc reg clobbering srcJacob Young
Closes #24390
2025-07-26x86_64: fix switch on mod resultJacob Young
Closes #24541
2025-07-24stage2-wasm: implement try_ptr + is_(non_)err_ptrPavel Verigo
2025-07-22aarch64: add new from scratch self-hosted backendJacob Young
2025-07-16inline assembly: use typesAndrew Kelley
until now these were stringly typed. it's kinda obvious when you think about it.
2025-07-11Remove numerous things deprecated during the 0.14 release cycleLinus Groh
Basically everything that has a direct replacement or no uses left. Notable omissions: - std.ArrayHashMap: Too much fallout, needs a separate cleanup. - std.debug.runtime_safety: Too much fallout. - std.heap.GeneralPurposeAllocator: Lots of references to it remain, not a simple find and replace as "debug allocator" is not equivalent to "general purpose allocator". - std.io.Reader: Is being reworked at the moment. - std.unicode.utf8Decode(): No replacement, needs a new API first. - Manifest backwards compat options: Removal would break test data used by TestFetchBuilder. - panic handler needs to be a namespace: Many tests still rely on it being a function, needs a separate cleanup.
2025-07-09eliminate all uses of std.io.Writer.count except for CBEAndrew Kelley
2025-07-07wasm backend: memcpy and memmove are the sameAndrew Kelley
both lower to memory.fill operation, which are allowed to overlap
2025-07-07std.io.Writer.printValue: rework logicAndrew Kelley
Alignment and fill options only apply to numbers. Rework the implementation to mainly branch on the format string rather than the type information. This is more straightforward to maintain and more straightforward for comptime evaluation. Enums support being printed as decimal, hexadecimal, octal, and binary. `formatInteger` is another possible format method that is unconditionally called when the value type is struct and one of the integer-printing format specifiers are used.
2025-07-07std.fmt: fully remove format string from format methodsAndrew Kelley
Introduces `std.fmt.alt` which is a helper for calling alternate format methods besides one named "format".
2025-07-07std.fmt.format: use {t} for tag name rather than {s}Andrew Kelley
prevents footgun when formatted type changes from string to enum
2025-07-07compiler: update a bunch of format stringsAndrew Kelley
2025-07-07compiler: fix a bunch of format stringsAndrew Kelley
2025-07-07compiler: fix a bunch of format stringsAndrew Kelley
2025-07-07compiler: upgrade various std.io API usageAndrew Kelley
2025-07-07compiler: upgrade various std.io API usageAndrew Kelley
2025-07-07compiler: update all instances of std.fmt.FormatterAndrew Kelley
2025-07-07std.fmt: breaking API changesAndrew Kelley
added adapter to AnyWriter and GenericWriter to help bridge the gap between old and new API make std.testing.expectFmt work at compile-time std.fmt no longer has a dependency on std.unicode. Formatted printing was never properly unicode-aware. Now it no longer pretends to be. Breakage/deprecations: * std.fs.File.reader -> std.fs.File.deprecatedReader * std.fs.File.writer -> std.fs.File.deprecatedWriter * std.io.GenericReader -> std.io.Reader * std.io.GenericWriter -> std.io.Writer * std.io.AnyReader -> std.io.Reader * std.io.AnyWriter -> std.io.Writer * std.fmt.format -> std.fmt.deprecatedFormat * std.fmt.fmtSliceEscapeLower -> std.ascii.hexEscape * std.fmt.fmtSliceEscapeUpper -> std.ascii.hexEscape * std.fmt.fmtSliceHexLower -> {x} * std.fmt.fmtSliceHexUpper -> {X} * std.fmt.fmtIntSizeDec -> {B} * std.fmt.fmtIntSizeBin -> {Bi} * std.fmt.fmtDuration -> {D} * std.fmt.fmtDurationSigned -> {D} * {} -> {f} when there is a format method * format method signature - anytype -> *std.io.Writer - inferred error set -> error{WriteFailed} - options -> (deleted) * std.fmt.Formatted - now takes context type explicitly - no fmt string
2025-07-02compiler: delete dead x86 bits fileAndrew Kelley
2025-07-02compiler: change canonical path for backend ABI source filesAndrew Kelley
2025-07-02compiler: delete arm backendAndrew Kelley
this backend was abandoned before it was completed, and it is not worth salvaging.
2025-07-02compiler: delete aarch64 backendAndrew Kelley
this backend was abandoned before it was completed, and it is not worth salvaging.
2025-07-02compiler: delete powerpc backend stubAndrew Kelley
nobody is currently working on this
2025-06-23x86_64: fix pair live-out trackingJacob Young
Closes #24226
2025-06-19x86_64: increase passing test coverage on windowsJacob Young
Now that codegen has no references to linker state this is much easier. Closes #24153
2025-06-19Target: pass and use locals by pointer instead of by valueJacob Young
This struct is larger than 256 bytes and code that copies it consistently shows up in profiles of the compiler.
2025-06-15compiler: fix `@intFromFloat` safety checkmlugg
This safety check was completely broken; it triggered unchecked illegal behavior *in order to implement the safety check*. You definitely can't do that! Instead, we must explicitly check the boundaries. This is a tiny bit fiddly, because we need to make sure we do floating-point rounding in the correct direction, and also handle the fact that the operation truncates so the boundary works differently for min vs max. Instead of implementing this safety check in Sema, there are now dedicated AIR instructions for safety-checked intfromfloat (two instructions; which one is used depends on the float mode). Currently, no backend directly implements them; instead, a `Legalize.Feature` is added which expands the safety check, and this feature is enabled for all backends we currently test, including the LLVM backend. The `u0` case is still handled in Sema, because Sema needs to check for that anyway due to the comptime-known result. The old safety check here was also completely broken and has therefore been rewritten. In that case, we just check for 'abs(input) < 1.0'. I've added a bunch of test coverage for the boundary cases of `@intFromFloat`, both for successes (in `test/behavior/cast.zig`) and failures (in `test/cases/safety/`). Resolves: #24161