Jakub Konka
e401930fa8
elf: store relative offsets in atom and symbol
2024-02-13 20:33:01 +01:00
Jakub Konka
c22bb38058
macho: scrap reader for preads when parsing archives
2024-02-13 19:18:27 +01:00
Jakub Konka
de30b30202
elf: scrap reader for preads when parsing archives
2024-02-13 18:57:49 +01:00
Jakub Konka
e5483b4ffc
elf: fix 32bit build
2024-02-13 10:48:10 +01:00
Jakub Konka
8bd01eb7a9
elf: refactor archive specific object parsing logic
2024-02-12 23:59:19 +01:00
Jakub Konka
616a8f9853
elf: move code paths responsible for emitting object and archive into relocatable module
2024-02-12 23:37:51 +01:00
Jakub Konka
a94d5895cf
elf: do not prealloc input objects, pread selectively
2024-02-12 23:07:51 +01:00
Andrew Kelley
fad5e7a997
Merge pull request #18898 from psnszsn/iouring_waitid
...
io_uring: add waitid operation
2024-02-12 12:20:12 -08:00
Andrew Kelley
0c1b9992fd
Merge pull request #18821 from jacobly0/x86_64-tests
...
x86_64: pass more tests
2024-02-12 12:18:03 -08:00
Andrew Kelley
f995c1b08a
std.c.O: fix illumos regression
...
introduced in c3eb592a343d25bbb0f79b80104d7890877c7af6
2024-02-12 01:06:27 -07:00
Jacob Young
e27db373ec
x86_64: implement @clz and @ctz of big integers
2024-02-12 05:25:07 +01:00
Jacob Young
d894727873
x86_64: implement @byteSwap of big integers
2024-02-12 05:25:07 +01:00
Jacob Young
271505cfc8
x86_64: fix compiler_rt tests
2024-02-12 05:25:07 +01:00
Jacob Young
bcbd49b2a6
x86_64: implement shifts of big integers
2024-02-12 05:25:07 +01:00
Jacob Young
9023ff04d0
x86_64: fix register clobber
2024-02-12 05:25:07 +01:00
Jacob Young
a9f738e56b
x86_64: implement c abi for bool vectors
2024-02-12 05:25:07 +01:00
Jacob Young
c6b3db8910
x86_64: implement @abs of big integers
2024-02-12 05:25:07 +01:00
Jacob Young
7c9a96111c
x86_64: fix assert location
2024-02-12 05:25:07 +01:00
Jacob Young
5a62f26579
x86_64: fix packed load
2024-02-12 05:25:07 +01:00
Jacob Young
f2a62d25fc
x86_64: implement ret_safe
2024-02-12 05:25:07 +01:00
Jacob Young
c619551f7d
x86_64: fix incorrect alignment check
2024-02-12 05:25:07 +01:00
Jacob Young
6235762c09
x86_64: implement mul, div, and mod of large integers
...
This enables the last compiler-rt test disabled for the x86_64 backend.
2024-02-12 05:25:07 +01:00
Andrew Kelley
c3eb592a34
Merge pull request #18886 from ziglang/std.os.O-safety
...
some API work on std.c, std.os, std.os.wasi
2024-02-11 18:08:08 -08:00
Andrew Kelley
616f74ba20
add behavior test for recently fixed wasm backend bug
...
Adds the corresponding behavior test for the fix in
320c4d68f5f40794ae31d5535de9c3a8ff5cb471.
2024-02-11 14:14:59 -07:00
Andrew Kelley
d40b71a39f
CI: update wasmtime to v10.0.2
...
The newest release changes the CLI; let's wait until that breaking
change finds its way into system package managers before updating to it.
2024-02-11 13:38:56 -07:00
Andrew Kelley
eda58a2f46
TypedValue: fix printing some nested things
2024-02-11 13:38:56 -07:00
Andrew Kelley
7680c5330c
some API work on std.c, std.os, std.os.wasi
...
* std.c: consolidate some definitions, making them share code. For
example, freebsd, dragonfly, and openbsd can all share the same
`pthread_mutex_t` definition.
* add type safety to std.c.O
- this caught a bug where mode flags were incorrectly passed as the
open flags.
* 3 fewer uses of usingnamespace keyword
* as per convention, remove purposeless field prefixes from struct field
names even if they have those prefixes in the corresponding C code.
* fix incorrect wasi libc Stat definition
* remove C definitions from incorrectly being in std.os.wasi
* make std.os.wasi definitions type safe
* go through wasi native APIs even when linking libc because the libc
APIs are problematic and wasteful
* don't expose WASI definitions in std.posix
* remove std.os.wasi.rights_t.ALL: this is a footgun. should it be all
future rights too? or only all current rights known? both are
the wrong answer.
2024-02-11 13:38:55 -07:00
Luuk de Gram
320c4d68f5
wasm: correctly lower packed structs in arguments
...
When an argument is a 'local', which is the case when it's a parameter,
we should not attempt to load it from memory. Instead, we directly emit
it to the stack. Only when the `WValue` is ensure to live in the linear
data section do we load it from memory onto the stack.
closes #18894
2024-02-11 17:09:18 +01:00
Vlad Pănăzan
d2789908ed
io_uring: add waitid operation
...
This is the equivalent of a waitid(2) syscall and can be used to
be notified about child process state changes.
Available since kernel 6.7
2024-02-11 15:47:03 +01:00
Vlad Pănăzan
20ea0012f0
linux: add missing io_uring opcodes
2024-02-11 15:43:12 +01:00
Andrew Kelley
e56fe06d30
Merge pull request #18878 from alichraghi/vector
...
spirv: emit vectorized operations
2024-02-10 22:36:50 -08:00
Jakub Konka
d18f52197d
macho: include compiler-rt in static lib if requested
2024-02-10 08:12:06 +01:00
Ali Chraghi
72bd1cd378
spirv: remove now-redundant isUnused calls from AIR handler functions
2024-02-10 09:50:02 +03:30
Jakub Konka
d12c8db642
Merge pull request #18875 from ziglang/macho-zo-dwarf
...
macho: emit DWARF for ZigObject relocatable
2024-02-09 23:12:04 +01:00
Prokop Randacek
6fb23542fe
Buffer the logging function
...
The default logging function used to have no buffer. So a single log
statement could result in many individual write syscalls each writing
only a couple of bytes.
After this change the logging function now has a 4kb buffer. Only log
statements longer than 4kb now do multiple write syscalls.
4kb is the default bufferedWriter size and was choosen arbitrarily.
The downside of this is that the log function now allocates 4kb more
stack space but I think that is an acceptable trade-off.
2024-02-09 14:02:57 -08:00
Veikka Tuominen
731ff120d0
Sema: catch runtime stores to comptime variables through calls
2024-02-09 13:51:51 -08:00
Andrew Kelley
32f30399e5
Merge pull request #18867 from e4m2/random
...
std.rand: Move to std.Random
2024-02-09 13:42:04 -08:00
Andrew Kelley
54bbc73f85
Merge pull request #18712 from Vexu/std.options
...
std: make options a struct instance instead of a namespace
2024-02-09 13:38:42 -08:00
cdrmack
d3cf911a80
remove unused local variables
2024-02-09 23:11:46 +02:00
Ryan Liptak
0aff1f9ce5
Mark .zon as eol=lf
...
Fixes git autocrlf issues with .zon files on Windows
2024-02-09 18:49:54 +02:00
Tristan Ross
2a3e601f77
test.link.macho: fix for non-x86 and arm architectures
...
This fix is requires to make the build runner even compile when building
Zig on architectures like RISC-V.
2024-02-09 17:49:53 +02:00
Ali Chraghi
5ee96688a7
spirv: emit vectorized operations
2024-02-09 16:40:34 +03:30
Jakub Konka
83bbc39c15
ci: enable testing of non-llvm bootstrapping on x86_64-macos
2024-02-09 13:17:35 +01:00
Veikka Tuominen
ddcea2cad4
Merge pull request #18857 from alichraghi/shader
...
spirv: make rusticl the primary testing implementation
2024-02-09 14:11:31 +02:00
Jakub Konka
b5d2be1082
macho: undo invalid fix for allocating sections for relocatable
...
This is way too buggy for my taste. I will need to revisit
segment/section alloc logic.
2024-02-09 12:48:25 +01:00
Ali Chraghi
37b0aa600a
spirv: make rusticl the primary testing implementation
2024-02-09 09:27:08 +03:30
Ali Chraghi
eb2d61d02e
spirv: merge construct(Struct/Vector/Array) into constructComposite
2024-02-09 09:27:05 +03:30
Jakub Konka
925273bcc8
macho: align memory size with file size when emitting relocatable
2024-02-09 00:20:11 +01:00
Jakub Konka
7388534590
test/link/macho: more self-hosted tests
2024-02-08 23:51:30 +01:00
Jakub Konka
3bfda3d791
macho: fix alignment of objects in archive
2024-02-08 23:51:30 +01:00