Commit Graph

63 Commits

Author SHA1 Message Date
Alex Rønne Petersen
baf60426d4
std.Target: Rename amdgpu module to amdgcn.
This was an inconsistency left over from c825b567b2.
2024-11-02 10:44:14 +01:00
Alex Rønne Petersen
fccf15fc9f std.Target: Remove armv7k/armv7s.
Like d1d95294fd, 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-11-02 10:25:40 +01:00
Alex Rønne Petersen
eb363bf845
Merge pull request #21572 from alexrp/tests-llvm-targets
`test`: Rewrite the target triple list for `llvm_targets`.
2024-10-04 19:37:12 +02:00
Alex Rønne Petersen
cb1ac0bb2f
update_cpu_features: Don't delete the output file if there are no CPU features.
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-10-03 05:01:14 +02:00
Alex Rønne Petersen
c0561da179
update_cpu_features: Don't set trustzone on cortex-m85.
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-24 11:45:01 +02:00
Alex Rønne Petersen
dcbd3cbce9
update_cpu_features: Add support for parsing DefaultExts as used for aarch64. 2024-09-24 11:08:29 +02:00
Alex Rønne Petersen
662683cafd update_cpu_features: Fix feature_overrides logic and replace an omit_cpus misuse. 2024-09-19 18:20:21 -07:00
Alex Rønne Petersen
a4af54b4e5 update_cpu_features: Update for LLVM 19.
* 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-09-19 18:20:21 -07:00
mlugg
0fe3fd01dd
std: update std.builtin.Type fields to follow naming conventions
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-28 08:39:59 +01:00
Linus Groh
fd434fcd38 std.Target: Rename feature_set_fns to FeatureSetFns
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-12 00:34:59 +01:00
Ryan Liptak
cf2558e971 update_cpu_features: Add x86 alias and arm override
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-08-07 08:56:50 -07:00
Andrew Kelley
727f1fa743 update update_cpu_features tool to latest std.Progress API
closes #20261
2024-06-11 15:24:57 -07:00
Andrew Kelley
f47824f24d std: restructure child process namespace 2024-05-26 09:31:55 -07:00
Andrew Kelley
109ec72924 update CPU features to LLVM 18
release/18.x branch, commit 78b99c73ee4b96fe9ce0e294d4632326afb2db42
2024-05-08 19:37:28 -07:00
Carl Åstholm
4c393c7468 Update usages of fmtId/isValidId
`{}` 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-04-07 14:47:11 +02:00
Carl Åstholm
f2dfd7d212 Override incorrect ARM Cortex-M series CPU feature definitions
Based on the Arm Cortex-M Processor Comparison Table v3.0
<https://developer.arm.com/documentation/102787/0300/?lang=en>
2024-01-09 17:53:18 +01:00
Carl Åstholm
55f2a6684e update_cpu_features: Support omitting deps 2024-01-09 17:53:09 +01:00
Jan Philipp Hafer
fd2239bde9 child_process + Build: rename exec to run + all related code
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-10-22 14:47:20 -04:00
Andrew Kelley
62a12e0631 LLVM 17 std lib updates and fixes
* 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-19 09:37:31 -07:00
Andrew Kelley
3ed40b1140 update CPU features to LLVM 17
release/17.x branch, commit 8f4dd44097c9ae25dd203d5ac87f3b48f854bba8
2023-09-19 09:37:31 -07:00
Eric Joldasov
50339f595a all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19 12:34:42 -07:00
Josh Wolfe
32cb9462ff
std: Support user-provided jsonParse method. Unify json.Parser and json.parse* (#15705) 2023-06-19 11:21:37 -04:00
Ali Chraghi
3db3cf7790 std.sort: add pdqsort and heapsort 2023-05-23 17:55:59 -07:00
Josh Wolfe
018b743c7a
std: Rewrite low-level json api to support streaming (#15602) 2023-05-13 14:31:53 -04:00
serg
5bc35fa75b std.target.riscv: fix baseline_rv32 missing feature "32bit" 2023-04-18 18:37:15 -07:00
Andrew Kelley
b5b634e4e8 Merge remote-tracking branch 'origin/master' into llvm16 2023-02-19 10:20:19 -07:00
Andrew Kelley
aeaef8c0ff update std lib and compiler sources to new for loop syntax 2023-02-18 19:17:21 -07:00
Andrew Kelley
efdc94c107 Merge remote-tracking branch 'origin/master' into llvm16 2023-02-18 09:33:27 -07:00
ee7
289e8fab79 langref, tools: rename --single-threaded to -fsingle-threaded
Commit 40f5e5dfc6 ("CLI: introduce -fsingle-threaded/
-fno-single-threaded", 2021-12-01) removed the `--single-threaded`
option, but didn't update all mentions of it.

    $ zig version
    0.11.0-dev.1568+c9b957c93
    $ zig build-exe --help | grep single
      -fsingle-threaded         Code assumes there is only one thread
      -fno-single-threaded      Code may not assume there is only one thread
    $ zig build-exe --single-threaded foo.zig
    error: unrecognized parameter: '--single-threaded'
2023-02-04 23:24:07 +02:00
Andrew Kelley
0ca3582a86 update CPU features to LLVM 16 2023-01-26 16:36:14 -07:00
Andrew Kelley
5b9c8d1d6f add m68k target CPU features 2022-10-20 09:21:06 -07:00
Andrew Kelley
c75226d033 update target CPU features for LLVM 15 2022-08-02 19:22:09 -07:00
Meghan Denny
b5861193e0 std: rename std.Target.systemz to .s390x 2022-07-28 23:22:44 -07:00
Andrew Kelley
d55d98919d update CPU features to LLVM 14
Notable changes:

`_i386`, `_i486`, and `_i686` are renamed to `i386`, `i486`,
and `i686` respectively. `std.zig.fmtId` is enhanced to support
formatting `i386` as `@"i386"`.

Some CPU features which are actually CPU models have been
properly flattened, such as `apple_a12`, `apple_a13`, `apple_a7`,
`cortex_a78c`, `exynos_m4`, `neoverse_e1`, `neoverse_n1`,
`neoverse_n2`, `neoverse_v1`.

Some CPU features have been added and some have been removed, following
LLVM's lead.

CSky CPU features support is added.
2022-07-01 21:35:19 -07:00
Andrew Kelley
210ee1067b update more API usage of std.Progress
fixes regression introduced in 5a00e24963
2022-02-08 17:49:40 -07:00
Lee Cannon
1093b09a98
allocgate: renamed getAllocator function to allocator 2021-11-30 23:32:47 +00:00
Lee Cannon
75548b50ff
allocgate: stage 1 and 2 building 2021-11-30 23:32:47 +00:00
Lee Cannon
85de022c56
allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
Andrew Kelley
902df103c6 std lib API deprecations for the upcoming 0.9.0 release
See #3811
2021-11-30 00:13:07 -07:00
Andrew Kelley
6115cf2240 migrate from std.Target.current to @import("builtin").target
closes #9388
closes #9321
2021-10-04 23:48:55 -07:00
Andrew Kelley
7adf15682c update target CPU features with LLVM 13 rc1 data 2021-08-15 23:09:55 -07:00
Andrew Kelley
0961c1975a update_cpu_features tool: work around stage1 bug
This works around a stage1 compiler bug resulting in a segfault when
trying to use the tool.
2021-08-12 11:30:55 -07:00
Andrew Kelley
fc55814faa compiler-rt: do not depend on usingnamespace
The idea is to depend on this language feature as little as possible
with the hopes that it can be adjusted to be less of an anti-pattern.
This also helps self-hosted, which does not yet implement
`usingnamespace`, get closer to being able to build compiler-rt.
2021-08-12 10:48:54 -07:00
kprotty
98106b09d5 zig fmt 2021-06-30 21:49:38 -05:00
kprotty
0a1def7833 changes to accomodate std.Thread update 2021-06-30 21:48:59 -05:00
Jacob G-W
9fffffb07b fix code broken from previous commit 2021-06-21 17:03:03 -07:00
d18g
0e71e6ee0f
Fix lakemont CpuModel (#9099)
Lakemont has no x86, no MMX, no SSE and no way of handling any fp-math. In theory LLVM is able to implicitly use the soft-float emulation library calls to legalize any such operation but, given Zig's use of many non-standard features, sometimes we hit a weak spot in the X86 codegen backend.

Consider this as a work-around for this LLVM problem, fixing the problem in LLVM is not so high in my todo list as the target is pretty niche and Intel axed it in '19.

(Commit message by @LemonBoy)
2021-06-17 16:37:38 -04:00
LemonBoy
ff79b87fa0 tools: Unbreak many tools
Many tools were broken after the recent hash-table refactorings, fix
them and ensure they won't silently break again.
2021-06-13 15:25:18 -04:00
Martin Wickham
fc9430f567 Breaking hash map changes for 0.8.0
- hash/eql functions moved into a Context object
- *Context functions pass an explicit context
- *Adapted functions pass specialized keys and contexts
- new getPtr() function returns a pointer to value
- remove functions renamed to fetchRemove
- new remove functions return bool
- removeAssertDiscard deleted, use assert(remove(...)) instead
- Keys and values are stored in separate arrays
- Entry is now {*K, *V}, the new KV is {K, V}
- BufSet/BufMap functions renamed to match other set/map types
- fixed iterating-while-modifying bug in src/link/C.zig
2021-06-03 17:02:16 -05:00
LemonBoy
3eed613407 std: Add two more ARM CPUs to the known CPU list
Modeled after GCC's description.
2021-05-03 12:32:13 +02:00