283 Commits

Author SHA1 Message Date
Luuk de Gram
db1825e931
wasm: re-enable regressed tests 2023-11-01 19:47:15 +01:00
Andrew Kelley
3fc6fc6812 std.builtin.Endian: make the tags lower case
Let's take this breaking change opportunity to fix the style of this
enum.
2023-10-31 21:37:35 -04:00
Jacob Young
d890e81761 mem: fix ub in writeInt
Use inline to vastly simplify the exposed API.  This allows a
comptime-known endian parameter to be propogated, making extra functions
for a specific endianness completely unnecessary.
2023-10-31 21:37:35 -04:00
Andrew Kelley
9f0fd72321 categorize nan behavior test
move it from bugs/xxx.zig to its own category
2023-10-27 12:43:34 -07:00
Andrew Kelley
3fb301b16a categorize fn ptr behavior test
move a function pointer test from bugs/xxx.zig to fn.zig
2023-10-27 12:43:34 -07:00
Andrew Kelley
dfe9cae4eb categorize globals behavior tests
moves some tests that store to global variables to their own category
instead of being named after a GitHub issue.
2023-10-27 12:43:34 -07:00
Andrew Kelley
d4911794ae rename behavior test to better describe what it does
In general, let's not lean on GitHub issue numbers as having meaning.
The goal of behavior tests is to produce a minimum set of tests that
test 100% of the language.
2023-10-23 17:28:10 -07:00
Robin Voetter
4bf27da6a6 Revert "Revert "Merge pull request #17657 from Snektron/spirv-recursive-ptrs""
This reverts commit 9f0359d78f9facc38418e32b0e8c1bf6f99f0d26 in an attempt to
make the tests pass again. The CI failure from that merge should be unrelated
to this commit.
2023-10-23 06:27:12 -04:00
Jacob Young
27fe945a00 Revert "Revert "Merge pull request #17637 from jacobly0/x86_64-test-std""
This reverts commit 6f0198cadbe29294f2bf3153a27beebd64377566.
2023-10-22 15:46:43 -04:00
Andrew Kelley
6f0198cadb Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"
This reverts commit 0c99ba1eab63865592bb084feb271cd4e4b0357e, reversing
changes made to 5f92b070bf284f1493b1b5d433dd3adde2f46727.

This caused a CI failure when it landed in master branch due to a
128-bit `@byteSwap` in std.mem.
2023-10-22 12:16:35 -07:00
Andrew Kelley
9f0359d78f Revert "Merge pull request #17657 from Snektron/spirv-recursive-ptrs"
This reverts commit b822e841cda0adabe3fec260ff51c18508f7ee32, reversing
changes made to 0c99ba1eab63865592bb084feb271cd4e4b0357e.

This caused a CI failure when it landed in master branch.
2023-10-22 12:15:31 -07:00
Robin Voetter
b822e841cd
Merge pull request #17657 from Snektron/spirv-recursive-ptrs
spirv: recursive pointers
2023-10-22 15:35:00 +02:00
Jacob Young
0c99ba1eab
Merge pull request #17637 from jacobly0/x86_64-test-std
x86_64: start to enable `test-std` and `test-compiler-rt` testing
2023-10-22 08:06:47 -04:00
Andrew Kelley
ecfb18286a migrate make_ptr_const to new anonymous decl mechanism
Instead of creating Module.Decl objects, directly create InternPool
pointer values using the anon_decl Addr encoding.

The LLVM backend needed code to notice the alignment of the pointer and
lower accordingly. The other backends likely need a similar change.
2023-10-21 21:38:41 -04:00
Robin Voetter
6281ad91df
spirv: self-referential pointers via new fwd_ptr_type
Its a little ugly but it works.
2023-10-21 17:46:54 +02:00
Jacob Young
920e9668dd x86_64: enable fixed behavior test 2023-10-21 10:55:41 -04:00
Jacob Young
2e6e39a700 x86_64: fix bugs and disable erroring tests 2023-10-21 10:55:41 -04:00
Robin Voetter
faad97edff
spirv: update failing / passing tests
Some tests are now failing due to debug info changes, some tests
now pass due to improved compiler functionality.
2023-10-15 20:08:18 +02:00
Xavier Bouchoux
78fe3feedb tests: enable already passing behaviour tests for self-hosted wasm
1611 passed; 262 skipped; 0 failed.
(was: 1543 passed; 330 skipped; 0 failed.)
2023-10-14 12:50:39 +02:00
Jacob Young
2a5335d7b6 x86_64: implement C abi for 128-bit integers 2023-10-04 14:42:35 -04:00
Jacob Young
8470652f10 x86_64: implement float compare and cast builtins 2023-10-01 15:09:52 -04:00
mlugg
9ff872c982
behavior: disable newly failing tests 2023-09-24 00:27:33 +01:00
Robin Voetter
075584a4d7 spirv: enable passing tests 2023-09-23 12:36:56 -07:00
Robin Voetter
79f7481575 spirv: disable failing tests 2023-09-23 12:36:44 -07:00
Jay Petacat
ff61c42879 std: Rename TailQueue to DoublyLinkedList
`TailQueue` was implemented as a doubly-linked list, but named after an
abstract data type. This was inconsistent with `SinglyLinkedList`, which
can be used to implement an abstract data type, but is still named after
the implementation. Renaming `TailQueue` to `DoublyLinkedList` improves
consistency between the two type names, and should help discoverability.

`TailQueue` is now a deprecated alias of `DoublyLinkedList`.

Related to issues #1629 and #8233.
2023-08-27 20:57:46 -07:00
Lewis Gaul
387b0ac4f1
Make NaNs quiet by default and other NaN tidy-up (#16826)
* Generalise NaN handling and make std.math.nan() give quiet NaNs

* Address uses of std.math.qnan_* and std.math.nan_* consts

* Comment out failing test due to issues with signalling NaN

* Fix issue in c_builtins.zig where we need qnan_u32
2023-08-18 02:07:49 -04:00
Stevie Hryciw
2ad6ca581d Add behavior test for copying self-referential struct
Closes #6312. In the C++ implementation this caused a stack overflow
from infinite recursion during analysis.
2023-08-06 18:23:28 -07:00
Jacob Young
3f13987a76 x86_64: add missing padding to global unions 2023-06-25 19:14:03 -04:00
Jacob Young
614c807702 x86_64: fix packed store crash 2023-06-25 19:14:03 -04:00
mlugg
f26dda2117 all: migrate code to new cast builtin syntax
Most of this migration was performed automatically with `zig fmt`. There
were a few exceptions which I had to manually fix:

* `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten
* `@truncate`'s fixup is incorrect for vectors
* Test cases are not formatted, and their error locations change
2023-06-24 16:56:39 -07:00
Eric Joldasov
50339f595a all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19 12:34:42 -07:00
Luuk de Gram
44b322ce64
wasm-linker: correctly resolve undefined functions
We now resolve undefined symbols during incremental-compilation
where we discard the current symbol if we detect we found
an existing symbol which is not the one currently being updated.
The symbol will always be discarded in favor of the existing symbol
in such a case.
2023-06-16 17:16:56 +02:00
Luuk de Gram
1cfad29f10
codegen: fix union padding
This regressed during the internpool merges. This commit
reinstates the padding logic for unions.
2023-06-16 17:16:56 +02:00
Eric Joldasov
d884d7050e
all: replace comptime try with try comptime
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-13 23:46:58 +06:00
Jacob Young
44d8cf9331 wasm: address behavior test regressions 2023-06-10 20:51:10 -07:00
Jacob Young
d40b83de45 behavior: pass more tests on llvm again 2023-06-10 20:47:56 -07:00
Andrew Kelley
629f0d23b5
Merge pull request #15579 from squeek502/mem-delimiters
Split `std.mem.split` and `tokenize` into `sequence`, `any`, and `scalar` versions
2023-06-03 13:51:02 -07:00
Luuk de Gram
1042deb86f
enable passing behavior tests 2023-05-31 18:04:33 +02:00
Evin Yulo
235b776d61 fix #15778: Binary operations on empty vectors crash 2023-05-29 13:01:11 +03:00
Jacob Young
729daed591 x86_64: rewrite casts 2023-05-18 20:42:38 -04:00
Jacob Young
904ffb41de x86_64: implement calling function references 2023-05-15 03:07:51 -04:00
Jacob Young
e36e9323f4 x86_64: implement union_init 2023-05-15 03:07:51 -04:00
Ryan Liptak
815e53b147 Update all std.mem.tokenize calls to their appropriate function
Everywhere that can now use `tokenizeScalar` should get a nice little performance boost.
2023-05-13 13:45:04 -07:00
Ali Chraghi
ccc490ef68
setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
Jacob Young
5d4288c5f6 x86_64: fix unordered float equality 2023-05-08 07:36:19 -04:00
Jacob Young
1a261917ce x86_64: implement @ctz and @clz for u128 2023-05-08 07:36:19 -04:00
Jacob Young
36a39267b8 x86_64: fix feature confusion 2023-05-03 04:25:14 -04:00
Jacob Young
6de457211f behavior: update affected tests for the x86_64 backend 2023-05-01 19:22:52 -04:00
Koakuma
d339e86fb1 stage2: sparc64: Skip unimplemented tests 2023-04-28 16:45:37 -07:00
Jakub Konka
bc69d5a00f macho: invalidate GOT/stub relocs after segment shift in memory 2023-04-26 19:08:38 -04:00