Commit Graph

33 Commits

Author SHA1 Message Date
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
Michael Dusan
0c6dfa6f0c target: drop ppc32 and prefer ppc
- original PR #7949 (incorrectly) patched a generated-file and changes
  have subsequently been lost/overwritten
- fix #7947 in a different way: drop `ppc32` because `ppc` already exists
2021-04-20 16:19:59 -04:00
Andrew Kelley
70d100b1e2 update to latest std Thread API 2021-03-02 14:59:34 -07:00
Michael Dusan
85eb05e9a8 tools/update_cpu_features: fix usage() 2021-02-28 22:47:29 -08:00
Andrew Kelley
ab36a162d0 update ARM target CPU features
This completes the process. All target CPU features are now
auto-generated by the tools/update_cpu_features.zig script, which
contains all the overrides.

Invoking this tool against LLVM 12rc2 now produces an empty git diff.
2021-02-27 21:10:00 -07:00
Andrew Kelley
85ab1b01e7 tools/update_cpu_features: add a "flatten" feature
and use it to clean up aarch64 target CPU features
2021-02-27 17:26:06 -07:00
Andrew Kelley
e02acc0288 tools/update_cpu_features: better patching API
With this change, added & modified cpus & features participate in the
same pruning system, and sorting takes into account the zig name, not
the pre-modified llvm name.

The modified target files in this commit are due to the improved
sorting and pruning.

The script now fully supports extra cpus & features.
2021-02-27 15:57:01 -07:00
Andrew Kelley
d91605e27e tools/update_cpu_features: consistent naming of neoverse cpus 2021-02-27 02:25:15 -07:00
Andrew Kelley
02bda72d91 update amdgpu target CPU features 2021-02-27 01:54:07 -07:00
Andrew Kelley
a9f19221e9 update RISC-V target CPU features 2021-02-27 01:49:35 -07:00
Andrew Kelley
45739725c1 tools/update_cpu_features: prune redundant features
When a CPU feature implies that another one must be present, avoid
redundantly specifying the other one.
2021-02-27 00:50:23 -07:00
Andrew Kelley
03de5ec6dd tools/update_cpu_features: handle ISAs with no features
These are represented by not having a file for them.
2021-02-26 23:52:04 -07:00
Andrew Kelley
a804944c7d tools/update_cpu_features: branch quota where necessary
also avoid unnecessary escaping of single quotes inside double quoted
strings (depends on a master branch commit that will be merged into this
branch in a future commit)
2021-02-26 23:21:05 -07:00
Andrew Kelley
2733ca91b2 introduce tools/update_cpu_features.zig
This replaces the previous target cpu features tool, taking advantage of
llvm-tblgen --dump-json instead of trying to use python to parse the .td
files.

This is an initial version that has the basics working, including a
simple feature override system, as well as multi-threaded processing.

Follow-up commits will do clean ups to make the diff of the newly generated
source files against previous versions be as desired.
2021-02-26 21:16:04 -07:00