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
Jakub Konka
8c0e5435b3
macho: do not close file on error - it will happen automatically anyhow
2024-02-08 23:51:30 +01:00
Jakub Konka
32386a06ca
builtin: enable panic handler on self-hosted macho
...
comp: toggle compiler-rt and zig-libc caps for macho
2024-02-08 23:51:21 +01:00
John Schmidt
7cb227ab67
Polish a few tests in switch.zig
...
- Return `error.TestFailed` instead of panicing
- Use `comptime assert` for type checks so that errors surface at
compile time
2024-02-08 23:49:03 +01:00
John Schmidt
0d1baf0c61
Improvements after code review
2024-02-08 23:49:03 +01:00
John Schmidt
dbcd53def0
Preserve field alignment in union pointer captures
2024-02-08 23:49:03 +01:00
Jakub Konka
7fb9df3fab
test/link/macho: -fstrip is no longer needed for self-hosted
2024-02-08 22:15:00 +01:00
Jakub Konka
5da9d250ff
macho: fix incorrect skip conditions for zig and dwarf sections
2024-02-08 22:08:51 +01:00
e4m2
60639ec83d
Fixup filename casing
2024-02-08 15:39:28 +01:00
e4m2
a9a5833f23
Update rand.zig source file name for CMake
2024-02-08 15:35:33 +01:00
e4m2
8d56e472c9
Replace std.rand references with std.Random
2024-02-08 15:21:35 +01:00
e4m2
9af077d71e
std.rand: Move to std.Random
2024-02-08 14:43:20 +01:00
Jakub Konka
dcb7f5791a
macho: alloc improvement for relocatable
2024-02-08 13:22:48 +01:00
Jakub Konka
102846315c
macho: couple small fixes
2024-02-08 13:12:06 +01:00
Jakub Konka
ce207caa24
macho: in relocatable mode, macho emit __DWARF directly
2024-02-08 12:15:46 +01:00
Jakub Konka
37033a96ac
macho: move Dwarf handle to ZigObject from DebugSymbols
2024-02-08 11:13:52 +01:00
Jacob Young
919a3bae1c
http: protect against zero-length chunks
...
A zero-length chunk marks the end of the body, so prevent any from
possibly occurring in the middle of the body.
2024-02-08 01:29:49 -08:00