Jarrod Meyer
7434accc3d
windows: make the WaitForMultipleObjectsEx assertion inclusive
...
- additionally, the parameter must be nonzero: https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitformultipleobjects
2024-07-27 11:32:43 -04:00
David Rubin
b20007daf7
riscv: correct airAsm to generate correct jalr call
2024-07-27 08:14:09 -07:00
Alex Rønne Petersen
66b71273a2
std.os.linux: Fix default value for perf_event_attr.clockid field.
...
Closes #20810 .
2024-07-26 18:21:10 -07:00
Andrew Kelley
eab934814f
docs: ArrayHashMap: warn against the shrink footgun
2024-07-26 15:24:25 -07:00
David Rubin
8f84212855
riscv: make multi-threaded enabled compilation the default
2024-07-26 14:53:55 -07:00
David Rubin
c20def73af
riscv: workarounds for riscv threading
2024-07-26 14:53:50 -07:00
Karim Mk
3b3c9d2081
Fix typo in init files.
2024-07-26 14:33:59 -07:00
David Rubin
a7498a6a53
comp: enable compilation of zig_libc
2024-07-26 14:02:48 -07:00
David Rubin
846bd40361
riscv: implement @cmpxchg* and remove fixes
2024-07-26 12:43:47 -07:00
Andrew Kelley
5d3a1cfdf5
update init template
...
* add fuzz example
* explain that you might want to delete main.zig or root.zig
2024-07-26 12:18:23 -07:00
David Rubin
9752bbfeb3
riscv: implement basic tlv loads and stores
2024-07-26 08:49:34 -07:00
Andrew Kelley
208baa37ca
frontend: add missed cache hash on --debug-rt
...
Makes adding --debug-rt correctly invalidate the cache for compiler_rt
and libfuzzer.
2024-07-26 08:42:40 -07:00
kcbanner
2a0238e5e3
zig.h: fixup pointer atomic load definitions
2024-07-26 10:42:10 -04:00
Jakub Konka
1240134c8b
Merge pull request #20788 from alexrp/elf-dt
...
`std.elf`: Add some definitions for the newer RELR relocations
2024-07-26 15:02:19 +02:00
Andrew Kelley
80269c1f53
remove deprecated --mod CLI now that a zig1.wasm update happened
2024-07-26 05:07:18 -07:00
David Rubin
8da212c11b
riscv: update tests and fix reuse bug
2024-07-26 04:19:58 -07:00
David Rubin
046001a34a
riscv implement @popCount
2024-07-26 04:19:57 -07:00
David Rubin
7ff5709e1b
riscv: implement lr/sr loop logic for non-native atomics
2024-07-26 04:19:57 -07:00
David Rubin
a1f6a8ef90
riscv: airAsm rewrite
...
with this rewrite we can call functions inside of
inline assembly, enabling us to use the default start.zig logic
all that's left is to implement lr/sc loops for atomically manipulating
1 and 2 byte values, after which we can use the segfault handler logic.
2024-07-26 04:19:55 -07:00
David Rubin
b533e848a2
riscv: enable passing tests
2024-07-26 04:19:17 -07:00
David Rubin
c00a5ff792
riscv: implement @floatFromInt
2024-07-26 04:19:16 -07:00
David Rubin
1a7d89a84d
riscv: clean up and unify encoding logic
2024-07-26 04:19:13 -07:00
David Rubin
574028ed5e
riscv: boilerplate for creating lazy functions
2024-07-26 04:05:44 -07:00
David Rubin
9bc7e8c852
riscv: update tests
2024-07-26 04:05:43 -07:00
David Rubin
64c6473443
riscv: implement add_sat and ptr_slice_len_ptr
...
this is enough to use the basic functions of an ArrayList!
2024-07-26 04:05:43 -07:00
David Rubin
45443f9c37
cmake: update to reflect added riscv64 backend files
2024-07-26 04:05:43 -07:00
David Rubin
6ac1b2d82a
riscv: add 32-bit support to integer @abs
2024-07-26 04:05:42 -07:00
David Rubin
1820f44104
riscv: implement sub-byte addition
2024-07-26 04:05:42 -07:00
David Rubin
81ca3a1d59
riscv: fix logic bug in ptr_elem_ptr
...
I was doing duplicate work with `elemOffset` multiplying by the abi size and then the `ptr_add` `genBinOp` also multiplying.
This led to having writes happening in the wrong place.
2024-07-26 04:05:41 -07:00
David Rubin
cde6956b21
riscv: remove redundant assert in genBinOp
2024-07-26 04:05:41 -07:00
David Rubin
ba58b7b881
heap: create a work-around page-allocator
...
the risc-v backend doesn't have `@cmpxchg*` implemented and so it can't use the hint that the current page-allocator uses.
this work-around branch can be removed when I implement the atomic built-in.
2024-07-26 04:05:41 -07:00
David Rubin
d3f75522d7
lower: fix logic bug in cmp_gt
2024-07-26 04:05:40 -07:00
David Rubin
c78ebeb44c
riscv: implement ptr_slice_ptr_ptr
...
just one step closer to allocation
2024-07-26 04:05:40 -07:00
David Rubin
93e9c7a963
riscv: implement @clz
2024-07-26 04:05:39 -07:00
David Rubin
8d30fc45c4
riscv: implement more operators
...
we can run `std.debug.print` now, with both run-time strings and integers!
2024-07-26 04:05:39 -07:00
David Rubin
9766b68c47
riscv: un-cache the avl and vtype when returning from a function call
...
the csrs `avl` and `vtype` are considered caller-saved so it could have changed while inside of the function.
the easiest way to handle this is to just set the cached `vtype` and `avl` to null, so that the next time something
needs to set it, it'll emit an instruction instead of relying on a potentially invalid setting.
2024-07-26 04:05:38 -07:00
Andrew Kelley
f2bf6c1b11
Merge pull request #20776 from alexrp/start-pie-more-arches
...
`std.os.linux.start_pie`: Add arc, csky, and hexagon support (and arm variants)
2024-07-25 19:33:54 -07:00
Alex Rønne Petersen
2458e53e73
std.zig.target: Handle m68k in muslArchName().
2024-07-25 19:31:39 -07:00
Alex Rønne Petersen
9536d65230
main: Don't pass --seed for zig run.
2024-07-25 19:30:13 -07:00
Andrew Kelley
afddfe25d8
Merge pull request #20773 from ziglang/fuzz
...
integrate fuzz testing into the build system
2024-07-25 18:52:39 -07:00
Andrew Kelley
688c2df646
fuzzer: use the cmp values
...
seems to provide better scoring
2024-07-25 18:52:21 -07:00
Andrew Kelley
6a63372053
fuzzer: basic implementation
...
just some experimentation. I didn't expect this to be effective so
quickly but it already can find a comparison made with mem.eql
2024-07-25 18:52:21 -07:00
Andrew Kelley
a3c74aca99
add --debug-rt CLI arg to the compiler + bonus edits
...
The flag makes compiler_rt and libfuzzer be in debug mode.
Also:
* fuzzer: override debug logs and disable debug logs for frequently
called functions
* std.Build.Fuzz: fix bug of rerunning the old unit test binary
* report errors from rebuilding the unit tests better
* link.Elf: additionally add tsan lib and fuzzer lib to the hash
2024-07-25 18:52:21 -07:00
Andrew Kelley
90dfd86ebe
test runner: always report fuzz tests
...
This way they can be smoke tested.
2024-07-25 18:52:21 -07:00
Andrew Kelley
b501adccbe
std.Build.Fuzz: fix progress node hierarchy
2024-07-25 18:52:21 -07:00
Andrew Kelley
7366b4b9e2
test runner: handle start_fuzzing message
2024-07-25 18:52:21 -07:00
Andrew Kelley
bce3b1efb0
build runner sends a start_fuzzing message to test runner
2024-07-25 18:52:21 -07:00
Andrew Kelley
711ed56ce3
build runner: extract logic to std.Build.Fuzz
2024-07-25 18:52:21 -07:00
Andrew Kelley
047640383e
add --fuzz CLI argument to zig build
...
This flag makes the build runner rebuild unit tests after the pipeline
finishes, if it finds any unit tests.
I did not make this integrate with file system watching yet.
The test runner is updated to detect which tests are fuzz tests.
Run step is updated to track which test indexes are fuzz tests.
2024-07-25 18:52:20 -07:00
Andrew Kelley
6f3767862d
implement std.testing.fuzzInput
...
For now this returns a dummy fuzz input.
2024-07-25 18:52:20 -07:00