Jacob Young
f08a8f0fc2
main: reimplement compiler debug flags
...
* Add `.llvmbc`/`.llvmir` to `ObjectFormat` for emitting unoptimized IR
* Replace `--verbose-air`, `--verbose-intern-pool`,
`--verbose-generic-instances`, `--verbose-llvm-ir`, and
`--verbose-llvm-bc` with various `--debug-log` scopes
* `--debug-log illegal-air`: pre-legalized Air
* `--debug-log legal-air`: post-legalized Air
* `--debug-log air`: final Air with liveness
* `--debug-log ip-stats`: InternPool statistics
* `--debug-log ip-values`: InternPool values
* `--debug-log ip-generic-instances`: InternPool generic instances
* `--debug-log llvm-ir`: pre-optimized LLVM IR
* `--debug-log opt-llvm-ir`: post-optimized LLVM IR
* Delete `--verbose-cimport` which does nothing
* Delete `--verbose-llvm-cpu-features` which is equivalent to looking at
the outputs of `--show-builtin` and `--debug-log llvm-ir`
2026-10-21 10:04:01 -07:00
Jacob Young
07ea1c97ee
process: fix bsd spawn
2026-10-21 10:04:01 -07:00
Andrew Kelley
ed136f8306
Merge pull request 'compiler_rt: support targets where c_longdouble is not a valid type' ( #37324 ) from jacobly/invalid-c-longdouble into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37324
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-10-21 19:01:01 +02:00
Andrew Kelley
c79058895b
Merge pull request 'std.json: update usages of array_list.Managed to ArrayList' ( #37291 ) from mcrtin/array-list-unmanaged into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37291
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-10-21 18:57:34 +02:00
Robbie Lyman
755d09660d
fix(Io.Dispatch): synchronize with updates to VTable
...
This is a minimal set of changes to let a test program which uses
Dispatch to sleep to compile.
2026-10-21 18:52:45 +02:00
Ryan Liptak
8f0c6ce407
Merge pull request 'Allow \u escape sequences to encode surrogate code points' ( #36965 ) from squeek502/zig:surrogates into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/36965
2026-10-21 09:43:04 +02:00
Jacob Young
b2d0675f90
Type: make c_longdouble an invalid type without x87
...
Also invert `xclang_flags` loop nesting which will make it easier to
translate features to something without `-Xclang` in the future.
2026-10-20 15:47:57 -04:00
mlugg
67f773beae
Merge pull request 'Elf2: refactors, fixes, and performance enhancements' ( #37326 ) from mlugg/elf2-thingies into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37326
2026-10-20 15:27:17 +02:00
Alex Rønne Petersen
6d24378a30
Merge pull request 'Linux 7.3' ( #37333 ) from alexrp/zig:linux-7.3 into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37333
2026-10-20 09:53:06 +02:00
Alex Rønne Petersen
e771583d88
Merge pull request 'std.Target: more fixes' ( #37334 ) from alexrp/zig:target-fixes into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37334
2026-10-20 09:52:48 +02:00
Alex Rønne Petersen
ffe1510d29
std.Target: drop the baseline CPU for hppa from pa_7300lc to pa_7000
...
This is what Debian and Gentoo support as their baseline.
2026-10-20 06:13:01 +02:00
Alex Rønne Petersen
a0d8ee3fde
std.Target: drop the baseline CPU for kvx from coolidge_v2 to coolidge_v1
...
This is the default in the Linux kernel and GCC ports for kvx.
2026-10-20 06:13:00 +02:00
Alex Rønne Petersen
9bcc2b6c8c
std.Target: drop the baseline CPU for alpha from ev6 to ev56
...
This is the baseline for the Linux kernel.
2026-10-20 06:13:00 +02:00
Alex Rønne Petersen
b0ce4f0996
update_cpu_features: omit more optional arm features
...
Both on models and architecture levels this time.
As part of this, I removed neon from the baseline model because that isn't
actually part of the ARMv7 baseline on any platform I'm aware of, and it made
our baseline binaries not work on some real boards, e.g. Tegra 2. We keep
vfp3d16 since virtually every ARMv7 board has VFP.
To not regress PlayStation Vita performance, I also added a kermit model with
neon enabled. This was necessary since vortex_a9 lost all NEON/VFP features by
default.
2026-10-20 05:37:12 +02:00
Alex Rønne Petersen
373ae07113
update_cpu_features: add and use cpu_overrides field
...
It was really confusing that feature_overrides was pulling double duty for both
features and models. Now there's a clean split between the two. The new
cpu_overrides also subsumes omit_cpus. This in turn uncovered a bug where some
x86 models were not getting the smep/smap features.
2026-10-20 04:29:49 +02:00
Alex Rønne Petersen
e76f969f1a
update_cpu_features: flesh out ve data
2026-10-20 03:29:36 +02:00
Alex Rønne Petersen
acc1233c8b
update_cpu_features: refine the set of wasm models
2026-10-20 03:29:36 +02:00
Alex Rønne Petersen
77178704d1
update_cpu_features: add some missing wasm feature dependencies
2026-10-20 03:29:36 +02:00
Alex Rønne Petersen
0f09c3c55a
update_cpu_features: flesh out xcore data
...
LLVM's backend is very outdated so we can't extract any useful data from it.
2026-10-20 03:29:33 +02:00
Alex Rønne Petersen
39ca9cae43
update_cpu_features: omit/flatten a bunch of csky features
2026-10-20 02:55:29 +02:00
Alex Rønne Petersen
aac91a1ac8
update_cpu_features: omit the dummy and dwarfris bpf features
2026-10-20 02:55:29 +02:00
Alex Rønne Petersen
125917c069
update_cpu_features: delete hppa 64bit feature
...
The hppa64 arch tag specifies whether we're in 64-bit mode. At that point, the
64bit feature is strictly redundant with v2_0.
2026-10-20 02:55:29 +02:00
Alex Rønne Petersen
7ae9b045a8
update_cpu_features: fix kvx v3_2 feature to not imply v3_1
...
These have incompatible instruction encodings.
2026-10-20 02:55:26 +02:00
Alex Rønne Petersen
bb1900c95d
update_cpu_features: fix description of alpha fix feature
...
🤨
2026-10-20 02:55:17 +02:00
Alex Rønne Petersen
dff54eecb0
update_cpu_features: omit optional features on some ARM models by default
...
ARM insist on having these enabled in LLVM's CPU model definitions by default
despite them not actually being required, so we have to do this.
2026-10-20 02:55:15 +02:00
Matthew Lugg
067f8dcb37
std.Build.Cache: support depending on nonexistent file/directory
2026-10-19 18:30:35 +01:00
Matthew Lugg
c3b8abfc26
std.Build.Cache: fix diagnostic printing
2026-10-19 18:30:35 +01:00
Alex Rønne Petersen
3513dc3695
std.Target: update max Linux version to 7.3.0
2026-10-19 18:04:05 +02:00
Alex Rønne Petersen
5b21a02877
std.so.linux: update syscalls to 7.3
2026-10-19 18:03:26 +02:00
Frank Denis
ddf480d78e
Add a reference to the open issue
2026-10-19 15:45:07 +02:00
Frank Denis
86fb10d327
crypto.aes: correctly set has_hardware_support
...
On macOS with the stage2 C backend, we use the software AES
implementation because the C backend can't pass vectors to
inline assembly.
But because the hardware still supports hardware AES, we use to
set `has_hardware_support` to true.
Fix that and improve readability by the way.
2026-10-19 15:45:07 +02:00
Frank Denis
bd33e1fd71
crypto.ff: compute Montgomery R2 with doubling and squaring
...
Use doubling and Montgomery squaring to speed up R2 construction
for larger moduli.
For small (1 or 2 limbs) moduli, the shift-based method remains
faster, so keep it.
2026-10-19 15:44:33 +02:00
Matthew Lugg
187d0bf9e4
std: fix non-conforming formatting
...
Fixes: a7f35c766b
2026-10-19 10:54:40 +01:00
Alex Rønne Petersen
3dbffc6886
std.Target: fix some inaccuracies in stackAlignment()
2026-10-19 08:03:19 +02:00
Alex Rønne Petersen
c0cc0f5991
std.Target: fix cTypeBitSize() for ez80-freestanding
...
It was incorrectly using the generic prong. Just throw tios in the same OS prong
as freestanding and ashetos.
2026-10-19 06:58:23 +02:00
Alex Rønne Petersen
ce95ea1113
std.Target: fix cTypeBitSize(.{long,ulong}) for plan9
...
They really made this choice *after* Microsoft's mistake.
2026-10-19 06:56:12 +02:00
Alex Rønne Petersen
7a310e4ab6
std.Target: fix cTypeBitSize(.longdouble) on alpha-netbsd/openbsd
2026-10-19 06:52:16 +02:00
Alex Rønne Petersen
3026fdece2
std.Target: fix cTypeBitSize(.longdouble) on x86[_64]-linux-ohos
2026-10-19 06:52:04 +02:00
Alex Rønne Petersen
7b38151ec2
std.Target: further simplify cTypeBitSize()
...
And fix long double size on x86_64-linux-android as a happy accident.
2026-10-19 06:47:50 +02:00
Alex Rønne Petersen
5c1bbdc433
std.Target: fix cCallingConvention() to return m68k_sysv for m68k-netbsd
2026-10-19 06:23:24 +02:00
Alex Rønne Petersen
df360a8ca2
std.Target: fix cCallingConvention() to pick xtensa_windowed for abi != .call0
2026-10-19 06:15:42 +02:00
Alex Rønne Petersen
91f5a800f7
std.Target: fix cCharSignedness() for propeller (unsigned in propgcc)
2026-10-19 06:12:42 +02:00
Alex Rønne Petersen
707137bb52
std.Target: fix standard dynamic linker paths for OHOS
2026-10-19 06:11:51 +02:00
Alex Rønne Petersen
4642ab5fb9
std.Target: fix standard dynamic linker for hppa-linux-gnueabi[hf]
2026-10-19 06:00:49 +02:00
Voxell Paladynee
a7f35c766b
updated documentation for std.Target.Query and std.Target.Cpu.Feature.Set to point to existing feature sets in std\n\nthe motivation for this change was the issue codeberg#37309 and the feature presets living in another namespace than std.Target.Cpu.Feature.Set.*, making it harder to find things around by looking around in the proximity.
2026-10-19 03:57:07 +02:00
Frank Denis
9552ca4c2e
Mention the limitations of secureZero()
2026-10-19 00:56:14 +02:00
Frank Denis
76789ff59c
std.crypto: remove secureZero() calls doing more harm than good
...
Calling secureZero() on secrets that fit in a register can create
copies of that didn't originally exist:
https://00f.net/2026/10/06/zeroization-1/
Remove the wipes where this currently happens.
We need a better solution to this.
2026-10-19 00:56:14 +02:00
Alex Rønne Petersen
26500dafe5
std.debug.SelfInfo.MachO: fix xreg/dreg restore logic in compact unwinding
...
The old logic advanced in the wrong direction and also overwrote one register in
consecutive pairs. I'm not aware of any case where this matters in practice
since macOS mandates the use of an FP register on AArch64, but we should still
get it right.
2026-10-18 17:27:28 +02:00
Alex Rønne Petersen
701b4e10c6
std.macho: fix CompactUnwindEncoding.value.arm64.frame layout
2026-10-18 17:27:28 +02:00
Alex Rønne Petersen
f03e7e318a
std.debug.SelfInfo.MachO: handle new UNWIND_ARM64_MODE.FRAME_PAUTH_LR
2026-10-18 17:23:42 +02:00