Commit Graph

27987 Commits

Author SHA1 Message Date
Andrew Kelley
39ec3d3116
Merge pull request #18822 from alichraghi/shader
spirv: basic shader support
2024-02-05 13:30:52 -08:00
Samuel Fiedler
0266017b59 Make EfiPhysicalAddress in std/os/uefi/tables.zig public 2024-02-05 15:31:33 +00:00
Ali Chraghi
be32ae0534 std: add gpu namespace 2024-02-05 11:55:14 +03:30
Ali Chraghi
739108c9f0 spirv: support enum integer values in Assembler 2024-02-05 11:55:14 +03:30
Ali Chraghi
b41aad0193 spirv: emit vectors whenever we can 2024-02-05 11:55:14 +03:30
Ali Chraghi
afa7793351 spirv: basic shader support 2024-02-05 11:55:14 +03:30
Robin Voetter
7634a115c5
Merge pull request #18580 from Snektron/spirv-more-vectors
spirv: more vector operations
2024-02-05 09:24:49 +01:00
Jacob Young
aebf20cc9a compiler_rt: avoid referencing symbol on versions where it doesn't exist
This change causes `__isPlatformVersionAtLeast` to no longer exist in
compiler_rt when targetting a min os version earlier than 10.15, which
is earlier than the default os version and so only affects builds that
explicitly target an older version than Zig officially supports.
2024-02-05 03:17:57 -05:00
Jacob Young
941d3a2bb1 x86_64: fix miscompilations on baseline 2024-02-05 02:16:56 -05:00
Jacob Young
eaa6218f09 x86_64: fix errors compiling the compiler
This fixes issues targetting both `x86_64-linux` and `x86_64-macos` with
the self-hosted backend.
2024-02-04 22:58:38 -05:00
Jakub Konka
f5dbcd1cb4 macho: add <cpu_arch>-macosx to target strings as a fallback target
Turns out that around 10.13/10.14 macOS release version, Apple changed the target tags in
tbd files from `macosx` to `macos`. In order to be compliant and therefore actually support
linking on older platforms against `libSystem.tbd`, we add `<cpu_arch>-macosx` to target strings.
2024-02-05 00:09:26 +01:00
Robin Voetter
2511106150
spirv: air vector_store_element 2024-02-04 19:09:34 +01:00
Robin Voetter
9fbba0e01a
spirv: update tests 2024-02-04 19:09:33 +01:00
Robin Voetter
1d548aa2aa
spirv: air splat 2024-02-04 19:09:33 +01:00
Robin Voetter
76d5696434
spirv: air abs 2024-02-04 19:09:32 +01:00
Robin Voetter
631d1b63a8
spirv: fix shuffle properly 2024-02-04 19:09:32 +01:00
Robin Voetter
9641d2ebdb
spirv: vectorize max, min 2024-02-04 19:09:31 +01:00
Robin Voetter
9f0227a326
spirv: vectorize int_cast, trunc 2024-02-04 19:09:31 +01:00
Robin Voetter
408c117246
spirv: air is_(non_)null_ptr, optional_payload_ptr 2024-02-04 19:09:30 +01:00
Robin Voetter
7dfd403da1
spirv: air mul_add 2024-02-04 19:09:30 +01:00
Robin Voetter
345d6e280d
spirv: air int_from_bool 2024-02-04 19:09:29 +01:00
Robin Voetter
77ef78a0ef
spirv: clean up arithmeticTypeInfo a bit
- No longer returns an error
- Returns more useful vector info
2024-02-04 19:09:29 +01:00
Robin Voetter
54ec936549
spirv: wrap strange its before instead of after operation
Wrapping strange integers before an operation was initially
done as an attempt to minimize the amount of normalizations
required: This way, there would not be a normalization
necessary between two modular operations. This was a
premature optimization, since the resulting logic is more
complicated than naive way of wrapping the result after
the operation.

This commit updates handling of strange integers to do
wrapping after each operation. It also seems slightly
more efficient in terms of size of generated code, as
it reduces the size of the behavior tests binary by
about 1%.
2024-02-04 19:09:28 +01:00
Robin Voetter
b67d983abd
spirv: vectorize add/sub overflow 2024-02-04 19:09:27 +01:00
Robin Voetter
761594e226
spirv: reduce, reduce_optimized 2024-02-04 19:09:27 +01:00
Robin Voetter
2f815853dc
spirv: shlWithOverflow 2024-02-04 19:09:26 +01:00
Robin Voetter
15cf5f88c1
spirv: vectors for air not 2024-02-04 19:09:25 +01:00
Robin Voetter
403c6262bb
spirv: use new vector stuff for arithOp and shift 2024-02-04 19:09:18 +01:00
Robin Voetter
cb9e20da00
spirv: element-wise operation helper 2024-02-04 19:09:00 +01:00
Robin Voetter
747f4ae3f5
spirv: sh[rl](_exact)? 2024-02-04 19:08:59 +01:00
Robin Voetter
3ef5b80d2c
std: use simple eqlBytes for spirv
The SPIR-V backend doesn't support the advanced
eqlBytes yet, and when it does, it likely that it
will be detrimental.
2024-02-04 19:08:57 +01:00
Jakub Konka
a1b607acb5 macho: sanitize Zig sections segment names before emitting a relocatable
As reported by jacobly, the Apple system linker matches sections to
segments by name and not by flags causing Zig's executable section
ending up in a segment with incorrect permission flags.
2024-02-04 18:05:38 +01:00
Andrew Kelley
3c7970dc4e
Merge pull request #18801 from jacobly0/fix-cache-retry
Cache: fix logic for retrying cache hits
2024-02-04 01:45:37 -08:00
Andrew Kelley
d3fc2648cc
Merge pull request #18778 from ziglang/system-package-mode
Implement system package mode and lazy dependencies
2024-02-04 01:44:12 -08:00
Jakub Konka
9bf97b8494
Merge pull request #18793 from ziglang/macho-zig-object
macho: emit relocatable with self-hosted x86_64 backend
2024-02-04 09:12:59 +01:00
Jacob Young
5b803aecfb bootstrap.c: allow overriding the host triple 2024-02-03 22:34:59 -05:00
Jacob Young
8fa7635419 stage1: implement fd_fdstat_get
I thought this might be needed, so may as well keep the implementation.
2024-02-04 03:48:29 +01:00
Jacob Young
26cb72086a Cache: fix logic for retrying cache hits
Fixes potentially #16149
2024-02-04 03:48:29 +01:00
lockbox
a65bc8d071 fix typo in wasm atomic opcodes doc comment 2024-02-04 00:25:05 +01:00
Chadwain Holness
6030855097
std.fmt: fix formatting slices of structs with custom formatting
`hasMethod` doesn't make sense for pointers to more than one item.
2024-02-03 21:47:55 +00:00
David Rubin
122387943b
Fix OOB when enum field out of order in different file 2024-02-03 19:52:05 +00:00
David Rubin
eb4024036d
Add error hint when looping over ErrorUnion 2024-02-03 19:16:27 +00:00
Jakub Konka
ca86dc61dd test/link/macho: test for signals only when running on the host 2024-02-03 19:36:52 +01:00
Jakub Konka
4ebd0036fd test/link/macho: add some smoke tests for self-hosted MachO 2024-02-03 17:57:35 +01:00
Jakub Konka
7641561f2d macho: refactor section/segment handle tracking logic 2024-02-03 16:57:15 +01:00
Jakub Konka
1ad545c97b macho: refactor growSection logic; remove -r limitation for ZigObject 2024-02-03 15:55:32 +01:00
Jakub Konka
0a0f90f949 macho: migrate thunks to use new relative addressing mechanism 2024-02-03 10:52:29 +01:00
Jakub Konka
aa1aa98863 macho: fix remaining references to Atom.value 2024-02-03 09:28:37 +01:00
Jakub Konka
dc6db3b309 macho: minor fixes and sanitize input *_zig segment/sections names 2024-02-03 09:28:34 +01:00
Jakub Konka
9fc1685c1c macho: make atom address relative wrt defining section 2024-02-03 09:28:30 +01:00