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

16,779 commits

Author SHA1 Message Date
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
77576c9603 lldb/pretty_printers.py: support new MultiArrayList.pointer_stability
Also fix unwrapped printing of reified union types.
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
Fateme Hosseini
3c08167cb7
compiler-rt: add hexagon v79 QFloat HVX runtime conversion funcs
Add four assembly files for half-float to integer conversions using
QFloat (qf16) on Hexagon V79.

Each function provides IEEE round-to-nearest-even or fast
round-half-away-from-zero conversion for signed and unsigned 8-bit and
16-bit integer destinations.

V79 lacks direct half-float to integer conversion. V75 and below have
native IEEE vcvt instructions,
while V81 and newer have dedicated hardware support.

Co-authored-by: Sumanth Gundapaneni <sgundapa@quicinc.com>
2026-10-21 06:08:50 +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
Jacob Young
d85c0ba080 compiler_rt: support targets where c_longdouble is not a valid type 2026-10-20 15:45:44 -04:00
Andrew Kelley
c8bb44618a Merge pull request 'naked package metadata' (#37340) from naked-package-labeling into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37340
2026-10-20 19:10:07 +02: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
4bf2fe2ed8
compiler_rt.fmv: remove __aarch64_have_lse_atomics
Turns out this is not actually part of the FMV ABI.
2026-10-20 10:30:47 +02:00
Alex Rønne Petersen
a0f9377690
compiler_rt.fmv: avoid depending on @import("aarch64_outline_atomics.zig").__aarch64_have_lse_atomics 2026-10-20 10:09:01 +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
099361c146
compiler_rt: define a stub for the function multiversioning ABI
To make sure that we can link code that uses FMV, even if for now we just
conservatively use the slowest variant of a function.
2026-10-20 09:39:43 +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
Andrew Kelley
ffa20b6deb Fetch: only use name for naked packages if version specified 2026-10-19 17:46:04 -07:00
Alex Rønne Petersen
cfec358de1
compiler_rt.atomics: lanai does not support atomic instructions 2026-10-20 02:36:38 +02:00
Andrew Kelley
4fc40330a4 ability to label naked packages
dependencies inside build.zig.zon now support `paths` and `version`
fields which can be used to affect the filtered files of the package as
well as the hash.
2026-10-19 17:34:42 -07:00
Matthew Lugg
067f8dcb37
std.Build.Cache: support depending on nonexistent file/directory 2026-10-19 18:30:35 +01:00
Matthew Lugg
19c4660c77
Maker: fix error handling bugs in configure 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
Alex Rønne Petersen
b22be11891
libc: update Linux headers to 7.3 2026-10-19 18:02:46 +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