aboutsummaryrefslogtreecommitdiff
path: root/tools/update_cpu_features.zig
AgeCommit message (Collapse)Author
2025-10-30std.debug.lockStderrWriter: also return ttyconfMatthew Lugg
`std.Io.tty.Config.detect` may be an expensive check (e.g. involving syscalls), and doing it every time we need to print isn't really necessary; under normal usage, we can compute the value once and cache it for the whole program's execution. Since anyone outputting to stderr may reasonably want this information (in fact they are very likely to), it makes sense to cache it and return it from `lockStderrWriter`. Call sites who do not need it will experience no significant overhead, and can just ignore the TTY config with a `const w, _` destructure.
2025-10-30Merge pull request #25733 from GasInfinity-Forks/x86_16-cpu_contextAlex Rønne Petersen
* fix: add `i86` cpu in `update_cpu_features` * feat: add `x86_16` debug `cpu_context`
2025-10-29fix: add `i86` cpu in `update_cpu_features`GasInfinity
2025-10-29remove all IBM AIX and z/OS supportAlex Rønne Petersen
As with Solaris (dba1bf935390ddb0184a4dc72245454de6c06fd2), we have no way to actually audit contributions for these OSs. IBM also makes it even harder than Oracle to actually obtain these OSs. closes #23695 closes #23694 closes #3655 closes #23693
2025-09-19tools: eliminate dependency on std.SegmentedListAndrew Kelley
2025-09-18std.Target: adjustments to LoongArch CPU modelsAlex Rønne Petersen
* Remove the generic model; we already have generic_la32 and generic_la64 and pick appropriately based on bitness. * Remove the loongarch64 model. We used this as our baseline for 64-bit, but it's actually pretty misleading and useless; it doesn't represent any real CPU and has less features than generic_la64. * Add la64v1_0 and la64v1_1 models. * Change our baseline CPU model for 64-bit to be la64v1_0, thus adding LSX to the baseline feature set.
2025-08-30std.Target.x86: purge avx10.n-256, rename avx10.n_512 to avx10.n, require ↵Alex Rønne Petersen
evex512 for avx512f Intel has abandoned AVX10.N/128,256; AVX10.N is now always 512-bit.
2025-08-30update_cpu_features: bump branch quota for amdgcnAlex Rønne Petersen
/lib/std/Target/amdgcn.zig:1656:5: error: evaluation exceeded 1000 backwards branches for (&result, 0..) |*elem, i| { ^~~
2025-08-30update_cpu_features: fix a fmtId call to be fmtIdPUAlex Rønne Petersen
2025-08-11std.ArrayList: make unmanaged the defaultAndrew Kelley
2025-08-08std.Io: remove BufferedWriterAndrew Kelley
2025-07-16tools: fix some bitrotAlex Rønne Petersen
2025-07-07update standalone and incremental tests to new APIAndrew Kelley
2025-06-23remove `spirv` cpu archAli Cheraghi
2025-05-21target: auto-generated spirv featuresAli Cheraghi
2025-04-04std.Target: Update CPU models/features for LLVM 20.Alex Rønne Petersen
Closes #21818.
2025-02-18spirv: ziggify and remove unknown spirv featuresAli Cheraghi
`OpCapability` and `OpExtension` now can also be emitted from inline assembly
2025-02-17std.Target: Remove Cpu.Arch.propeller2 and use a CPU feature instead.Alex Rønne Petersen
2025-02-17update_cpu_features: Handle targets that don't have LLVM data.Alex Rønne Petersen
2025-01-22wasm: Add a nontrapping_bulk_memory_len0 feature.Alex Rønne Petersen
This will mainly be used when targeting our wasm2c implementation which has no problem with zero-length bulk memory operations, as a non-standard extension.
2025-01-22std.Target: Define and use lime1 as the baseline CPU model for WebAssembly.Alex Rønne Petersen
See: https://github.com/WebAssembly/tool-conventions/pull/235 This is not *quite* using the same features as the spec'd lime1 model because LLVM 19 doesn't have the level of feature granularity that we need for that. This will be fixed once we upgrade to LLVM 20. Part of #21818.
2025-01-16x86_64: implement clz and notJacob Young
2024-11-25refactor `update_cpu_features.zig`David Rubin
Most of this commit is whitespace changes, moving to use RLS for assigning the `CpuModel`
2024-11-25make `crc32` a featdep of `sse4.2`David Rubin
To my knowledge there isn't an implementation of `sse4.2` that doesn't have `crc32`. The Clang driver also sets `crc32` to be implicitly enabled when an explicit `-crc32` wasn't provided. This matches that behaviour. We need this behaviour to compile libraries like `rocksdb` which currently guard against `crc32` intrinsics by checking for `sse4.2`.
2024-11-25cleanup `update_cpu_feature.zig`David Rubin
* Cleanup the argument handling logic to allow for optional arguments. * Add a filter for which `llvm_target` to process. * Switch to using a threadpool, needed for skipping llvm targets cleanly and better distributes the work. * Remove a seemingly useless piece of logic. I re-ran the script and it gave identical outputs.
2024-11-02std.Target: Rename amdgpu module to amdgcn.Alex Rønne Petersen
This was an inconsistency left over from c825b567b26c475e058e074e5d22af006854fab6.
2024-11-02std.Target: Remove armv7k/armv7s.Alex Rønne Petersen
Like d1d95294fd657f771657ea671a6984b860347fb0, this is more Apple nonsense where they abused the arch component of the triple to encode what's really an ABI. Handling this correctly in Zig's target triple model would take quite a bit of work. Fortunately, the last Armv7-based Apple Watch was released in 2017 and these targets are now considered legacy. By the time Zig hits 1.0, they will be a distant memory. So just remove them.
2024-10-04Merge pull request #21572 from alexrp/tests-llvm-targetsAlex Rønne Petersen
`test`: Rewrite the target triple list for `llvm_targets`.
2024-10-03update_cpu_features: Don't delete the output file if there are no CPU features.Alex Rønne Petersen
At bare minimum, the compiler expects std.Target.<arch>.cpu.generic to work for any given architecture when generating the builtin module. So rather than try to hack that into working when the affected modules are omitted, just actually keep them. This affected lanai and xcore.
2024-09-24update_cpu_features: Don't set trustzone on cortex-m85.Alex Rønne Petersen
cortex-m85 already has 8msecext, which is not the same as trustzone. The former is for the M profile, while the latter is for the A profile. Revert of a small part of #18498.
2024-09-24update_cpu_features: Add support for parsing DefaultExts as used for aarch64.Alex Rønne Petersen
2024-09-19update_cpu_features: Fix feature_overrides logic and replace an omit_cpus ↵Alex Rønne Petersen
misuse.
2024-09-19update_cpu_features: Update for LLVM 19.Alex Rønne Petersen
* Add `ProcessorAlias` support. * Bump output buffer size. * Include `i` extension in RISC-V baselines. * Update evaluation branch quota for RISC-V. * Retain some CPU features that LLVM removed. * Flatten more 'meta-features' used for CPU models. * Remove some superfluous dependencies.
2024-08-28std: update `std.builtin.Type` fields to follow naming conventionsmlugg
The compiler actually doesn't need any functional changes for this: Sema does reification based on the tag indices of `std.builtin.Type` already! So, no zig1.wasm update is necessary. This change is necessary to disallow name clashes between fields and decls on a type, which is a prerequisite of #9938.
2024-08-12std.Target: Rename feature_set_fns to FeatureSetFnsLinus Groh
From https://ziglang.org/documentation/master/#Names: > If `x` is callable, and `x`'s return type is `type`, then `x` should > be `TitleCase`.
2024-08-07update_cpu_features: Add x86 alias and arm overrideRyan Liptak
Before this commit, the name `v9.5a` was being used for two different features, and one was overwriting the other in the `all_features` array. `arrowlake_s` is an alias for `arrowlake-s`
2024-06-11update update_cpu_features tool to latest std.Progress APIAndrew Kelley
closes #20261
2024-05-26std: restructure child process namespaceAndrew Kelley
2024-05-08update CPU features to LLVM 18Andrew Kelley
release/18.x branch, commit 78b99c73ee4b96fe9ce0e294d4632326afb2db42
2024-04-07Update usages of `fmtId`/`isValidId`Carl Åstholm
`{}` for decls `{p}` for enum fields `{p_}` for struct fields and in contexts following a `.` Elsewhere, `{p}` was used since it's equivalent to the old behavior.
2024-01-09Override incorrect ARM Cortex-M series CPU feature definitionsCarl Åstholm
Based on the Arm Cortex-M Processor Comparison Table v3.0 <https://developer.arm.com/documentation/102787/0300/?lang=en>
2024-01-09update_cpu_features: Support omitting depsCarl Åstholm
2023-10-22child_process + Build: rename exec to run + all related codeJan Philipp Hafer
Justification: exec, execv etc are unix concepts and portable version should be called differently. Do no touch non-Zig code. Adjust error names as well, if associated. Closes #5853.
2023-09-19LLVM 17 std lib updates and fixesAndrew Kelley
* some manual fixes to generated CPU features code. in the future it would be nice to make the script do those automatically. I suspect the sm_90a thing is a bug in LLVM. * add liteos to various target OS switches. I know nothing about this OS; someone will need to work specifically on support for this OS when the time comes to support it properly in zig. * while waiting for the compiler, I went ahead and made more conservative choices about when to use `inline` in std/Target.zig
2023-09-19update CPU features to LLVM 17Andrew Kelley
release/17.x branch, commit 8f4dd44097c9ae25dd203d5ac87f3b48f854bba8
2023-06-19all: zig fmt and rename "@XToY" to "@YFromX"Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19std: Support user-provided jsonParse method. Unify json.Parser and ↵Josh Wolfe
json.parse* (#15705)
2023-05-23std.sort: add pdqsort and heapsortAli Chraghi
2023-05-13std: Rewrite low-level json api to support streaming (#15602)Josh Wolfe
2023-04-18std.target.riscv: fix baseline_rv32 missing feature "32bit"serg