0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
Commit graph

41,264 commits

Author SHA1 Message Date
Alex Rønne Petersen
ea68de1104
std.debug.cpu_context: rename LoongArch to Loongarch 2026-11-11 01:52:55 +01:00
Alex Rønne Petersen
72c346882c
std.zig.system.linux.m68k: update model names for f20ff0be1d 2026-11-11 01:52:55 +01:00
Alex Rønne Petersen
9281d7d39c Merge pull request 'objdump: expand table filtering and sorting capabilities, and use them to avoid churn in the linker tests' (#37614) from mlugg/objdump into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37614
2026-11-11 01:51:49 +01:00
Matthew Lugg
6d066fdad4
test-link: use --filter and --sort to avoid churn 2026-11-10 21:06:16 +00:00
Matthew Lugg
1062d8fbb6
objdump: expand table filtering and sorting capabilities 2026-11-10 21:06:15 +00:00
Frank Denis
3e4c8a80e7 Merge pull request 'std.crypto.aes: zero the unused tail of partial bitsliced batches' (#37568) from jedisct1/zig:aesundef into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37568
2026-11-10 14:33:53 +01:00
Frank Denis
2784b7b13b std.crypto.aes: zero the unused tail of partial bitsliced batches
Fixes #37565
2026-11-10 14:33:53 +01:00
David Rubin
75d48dfffb x86_64: fix big switch else cases 2026-11-09 00:41:56 +01:00
David Rubin
0c6f969216 x86_64: cleanup genCall for function pointers and vaargs 2026-11-09 00:37:40 +01:00
Ryan Liptak
9c597bd2d5 Merge pull request 'Update usages of more deprecated functions' (#37576) from Der_Teufel/zig:remove-deprecated-mem into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37576
Reviewed-by: Ryan Liptak <squeek502@noreply.codeberg.org>
2026-11-08 23:24:02 +01:00
Ryan Liptak
7fb365cd66 zig fmt: Fix packed -> bitpack causing an error, integrate with --stdin
This makes `zig fmt` use the same tactic as the ambiguous precedence stuff for automatically renaming packed -> bitpack. That is, the parser still emits an error for `packed`, but all such "expected 'bitpack', found 'packed'" errors are removed during `zig fmt` since the render process fixes them.

Additionally, this commit makes both packed -> bitpack and ambiguous precedence fixes work with the --stdin flag, which wasn't the case previously.
2026-11-08 01:24:19 -08:00
Andrew Kelley
a7808addac Merge pull request 'loongarch: implement @memcpy/@memmove and lower to compiler-rt calls' (#37571) from AstraFall/zig:loongarch/pr into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37571
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-11-08 09:36:30 +01:00
Andrew Kelley
c0c4ea608b Merge pull request 'incremental: stack trace fixes' (#37574) from mlugg/more-stack-trace-fixes into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37574
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-11-08 09:23:38 +01:00
David Rubin
e65dea9bb7 x86_64: avoid spurious x87 invalid exception when loading st0
Before, loading an `f80` value into `st(0)` used `fstp st(0)` to
discard its previous contents. When the slot was empty, this
caused an x87 stack underflow and set `FE_INVALID`.

Replace the pop with `ffree st(0)` plus `fincstp`, which will
safely discard either an occupied or empty slot before loading
the new value.
2026-11-08 09:07:01 +01:00
Frank Denis
b38390b769 llvm: fix @reduce and @bitCast miscompilation on Hexagon (#37501)
On Hexagon, LLVM miscompiles reductions and bitcasts of bool vectors.

It assumes one bit per lane, while Hexagon stores comparison results with one bit per byte.

Work around this by doing these operations one element at a time.

And the tests that we previously had to skip on Hexagon now pass.

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37501
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-11-08 09:02:54 +01:00
Andrew Kelley
62c3fdef5a Merge pull request 'Update usages of deprecated APIs: std.fmt.allocPrint* and some of std.zig.allocPrintCmd' (#36542) from Der_Teufel/zig:remove-more-deprecated into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/36542
Reviewed-by: Ryan Liptak <squeek502@noreply.codeberg.org>
2026-11-08 08:59:22 +01:00
Mason Remaley
5e2e4d0a32 Merge pull request 'Sema: support .len on vectors' (#37472) from masonremaley/vector-len into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37472
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-11-08 07:45:19 +01:00
Mason Remaley
0c0c9d9404 Sema: Use elemVal instead of elemValArray internally 2026-11-08 07:45:19 +01:00
Mason Remaley
5fa7b1ced2 Sema: support .len on vectors
resolves https://github.com/ziglang/zig/issues/17886

part of #35376
2026-11-08 07:45:19 +01:00
Mason Remaley
a32338cda4 Sema: fix bug that allowed for runtime indexing of vectors 2026-11-08 07:45:19 +01:00
volnyx
30277efa40 chore: remove unused isUnderMaxLoadPercentage 2026-11-08 12:34:18 +07:00
Feryla
598176dbb1 swap setown and getown const values to match c headers for alpha and generic linux 2026-11-08 00:26:04 +01:00
Krzysztof Wolicki
3585fa1aef Update usages of std.fmt.allocPrint* to use the corresponding methods on std.mem.Allocator 2026-11-07 15:10:50 -08:00
Krzysztof Wolicki
31e2917d7e Remove usages of deprecated std.zig.allocPrintCmd 2026-11-07 15:07:59 -08:00
Krzysztof Wolicki
e3e46f22cb Change deprecated std.Io.Reader.readAlloc into a compile error.
Update usages of it in the codebase
2026-11-07 15:03:23 -08:00
Krzysztof Wolicki
f7399d538f Update usages of deprecated std.mem.byteSwapAllFields* 2026-11-07 15:03:23 -08:00
Ryan Liptak
78ee942689 Merge pull request 'Rename the packed keyword to bitpack' (#30875) from ennui/zig:feature/bitpacked into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30875
Reviewed-by: Ryan Liptak <squeek502@noreply.codeberg.org>
2026-11-07 23:03:31 +01:00
Matthew Lugg
d4bf9b271d
std.Io.Threaded: share stderr lock across all Threaded instances
This is a temporary solution to the problem that today, it is normal for
multiple `std.Io` instances to coexist, and those instances can then
race to write to stderr. This makes stack traces extremely hard to read
when using `std.Progress`, to the extent that I sometimes find myself
copying stack traces into text files just to manually remove the garabge
bytes.

I suspect that this problem should ultimately be solved either by
somehow making the stderr lock truly global across all `Io` instances,
or by removing the separate "debug" `Io` instance in favour of using the
application's instance. But for the time being, this commit solves the
problem for what is currently the only common case.
2026-11-07 16:31:49 +00:00
Matthew Lugg
0863e6174a
std.debug.Dwarf: fix incremental stack traces through generic instances 2026-11-07 16:31:49 +00:00
Matthew Lugg
7b4c9f41ef
Runner: don't bypass manifest checks when skipping initial target due to unsatisfied requirement 2026-11-07 14:06:02 +00:00
Jacob Young
c16aa3a677
test/*-traces: add and pass some incremental targets 2026-11-07 10:23:21 +00:00
Matthew Lugg
111d46ac49
Elf2: fix bugs emitting node relocs in relocatables 2026-11-07 10:23:21 +00:00
Jacob Young
ed405d95e9
Dwarf2: fix inline stack traces 2026-11-07 10:23:21 +00:00
Matthew Lugg
819284ae55
CMakeLists: fix incorrect file list
This change was unintentionally omitted from the previous cherry-pick.

Fixes: ebce4c9f21
2026-11-07 08:24:36 +00:00
Matthew Lugg
ebce4c9f21
llvm: refactor llvm.Object.emit to free llvm.Object before LLVM emit
This is a refactor which I've kind of been thinking of doing for a while
anyway. The LLVM backend, which emits LLVM bitcode, is now clearly
separated from the libllvm API calls, which process that bitcode into an
optimized IR/bitcode file, an assembly file, and/or an object file.

The main benefit of this change right now is that in non-incremental
compilations which use LLVM, we can now free the `llvm.Object` state
after generating bitcode and before calling into libllvm, which can
significantly decrease the peak RSS of such compilations.

Co-authored-by: Guy Fischman <gfischman@gmail.com>
2026-11-07 08:15:32 +00:00
xtex
6fce198bf1
loongarch: optimize nop addImm's 2026-11-07 15:10:16 +08:00
xtex
9cbb6b12fa
loongarch: stick to compiler-rt calls for large memcpy/memmove
Previously it is still very likely to generate
unrolled memcpy code due to dst/src being materialized
at somewhere else (like r5/r6/r7).

For these large memmove's we now explicitly force them
to be materialized to r4/r5.
2026-11-07 15:10:16 +08:00
xtex
f037539cf4
loongarch: implement @memcpy and @memmove 2026-11-07 15:10:16 +08:00
xtex
7a41c24a74
loongarch: provide alignment info to memory access primitives 2026-11-07 15:10:16 +08:00
xtex
57873dd6c9
loongarch: emit memmove calls for large stack to stack copy
This reduces some super long LOAD + STORE sequences.
2026-11-07 15:10:16 +08:00
Ryan Liptak
bdce08cbbe A few more packed -> bitpack renames 2026-11-06 20:14:04 -08:00
Ryan Liptak
6fa1827a4c Removed packed keyword from the grammar and update oracle
Since the parser emits an error for `packed`, the grammar should as well.
2026-11-06 20:14:04 -08:00
Ennui Langeweile
83c4de13f7 Standardize error messages on "bit-packed"
Honestly, I don't even know if this is the direction to go, but considering that the term "byte-packed" and "bit-packed" have already been used before, it makes sense to me to use `bitpack` to refer to the bitpack structs and unions while using "bit-packed" when saying that something is bitpacked.
2026-11-06 20:14:04 -08:00
Ennui Langeweile
49d255a814 Finish renaming most instances of packed 2026-11-06 20:14:04 -08:00
Ennui Langeweile
c3816e76e6 Rename packed fields to bitpack 2026-11-06 20:14:04 -08:00
Ennui Langeweile
6f91cc0a88 Update language reference and its tests 2026-11-06 20:14:04 -08:00
Ennui Langeweile
ae4e5387cf Rename the relevant tests
Done in a separate commit in order to make the diff simpler
2026-11-06 20:14:04 -08:00
Ennui Langeweile
98cc83648a Update internal naming inside tests 2026-11-06 20:14:04 -08:00
Ennui Langeweile
41bbee68df Update error messages to reflect bitpack rename 2026-11-06 20:14:04 -08:00
Ennui Langeweile
28a8c6da78 Replace packed with bitpack internally
This does not apply documentation and inner naming conventions yet.
2026-11-06 20:14:04 -08:00