190 Commits

Author SHA1 Message Date
Robin Voetter ac16545895 spirv: enable passing tests 2024-04-06 13:52:48 +02:00
Ali Chraghi 436f53f55d spirv: implement @mulWithOverflow 2024-04-06 09:01:46 +03:30
Robin Voetter 12350f53bf spirv: clz, ctz for opencl
This instruction seems common in compiler_rt.
2024-03-30 19:47:55 +01:00
Ali Chraghi 66e6d0d314 test: skip new failing tests for spirv 2024-02-15 18:44:24 +03:30
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
Jakub Konka 52066bf8e4 x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
Robin Voetter 9fbba0e01a spirv: update tests 2024-02-04 19:09:33 +01:00
Robin Voetter 76d5696434 spirv: air abs 2024-02-04 19:09:32 +01:00
Robin Voetter 2f815853dc spirv: shlWithOverflow 2024-02-04 19:09:26 +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
dweiller 8108c9f4d2 test/behavior: replace all 'comptime expect' with 'comptime assert' 2024-01-15 20:55:01 +11:00
Veikka Tuominen 804cee3b93 categorize behavior/bugs/<issueno>.zig tests 2024-01-06 16:49:41 -08:00
Andrew Kelley 52ebba6bdf @shlExact fixups
* Add clarification in langref
* move test case to behavior tests
2024-01-04 00:44:44 -07:00
Jacob Young bdb6546a8f x86_64: fix vector comparisions 2023-12-04 13:09:13 -05:00
mlugg 9c16b2370d test: update behavior to silence 'var is never mutated' errors 2023-11-19 09:57:03 +00:00
Jacob Young b55377a5ab x86_64: pass more tests
* 128-bit integer multiplication with overflow
 * more instruction encodings used by std inline asm
 * implement the `try_ptr` air instruction
 * follow correct stack frame abi
 * enable full panic handler
 * enable stack traces
2023-10-25 04:28:30 -04:00
Jacob Young fbe8c8938b x86_64: implement @mod for floating-point types 2023-10-23 22:42:18 -04:00
Robin Voetter 8c153221b9 wasm: disable division test
Seems that bit integers are not properly supported
2023-10-15 20:08:19 +02: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
Robin Voetter b1499df1b8 spirv: sign-extension for strange integers 2023-10-15 14:00:09 +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 35c9b717f7 x86_64: implement @rem for floats 2023-10-08 04:41:55 -04:00
Jacob Young 3bf9a8feb5 x86_64: fix @divTrunc and @divFloor of f16 2023-10-08 04:41:55 -04:00
Jacob Young 5aeb13c350 x86_64: implement f80 movement 2023-10-07 00:29:17 -04:00
Jacob Young 54b2d6f072 x86_64: implement C abi for everything else 2023-10-05 04:38:25 -04:00
Jacob Young cc6694a323 x86_64: implement C abi for f128 2023-10-05 04:10:38 -04:00
Jacob Young fbe5bf469e x86_64: implement float arithmetic builtins 2023-10-01 15:09:52 -04:00
Jacob Young 1eb023908d x86_64: implement float round builtins 2023-10-01 15:09:52 -04:00
Jacob Young 3bd1b9e15f x86_64: implement and test unary float builtins 2023-10-01 15:09:52 -04:00
antlilja 15cc008bf8 Replace @fabs with @abs in behavior tests 2023-09-27 11:24:33 -07:00
Robin Voetter 075584a4d7 spirv: enable passing tests 2023-09-23 12:36:56 -07:00
Robin Voetter 66b1f6c163 spirv: air sub_with_overflow 2023-09-23 12:36:56 -07:00
Robin Voetter 79f7481575 spirv: disable failing tests 2023-09-23 12:36:44 -07:00
Jacob Young d65318847f compiler_rt: fix fp sub being optimized to call itself
Closes #16844
Reduces #16846
2023-09-19 09:37:52 -07:00
Andrew Kelley 8219711063 disable behavior tests regressed by LLVM 17
See #16844
See #16845
See #16846
See #16848
2023-09-19 09:37:50 -07:00
Techatrix ab970094ab wasm: enable successful behavior tests 2023-09-10 15:59:02 +02:00
Jacob Young 228c956377 std: finish cleanup up asm
This also required implementing the necessary syntax in the x86_64 backend.
2023-07-31 03:49:21 -04:00
Jacob Young 9831f27238 cbe: get behavior tests running on arm
Specifically without linking libc.
2023-07-31 01:58:10 -04:00
antlilja a0ec2266fe Update tests to new splat syntax 2023-07-12 15:35:57 -07: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 d884d7050e all: replace comptime try with try comptime
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-13 23:46:58 +06:00
Andrew Kelley 7621e56938 Merge pull request #15753 from Snektron/spirv-more-tests
spirv: make more tests pass
2023-05-20 13:54:01 -07:00
Robin Voetter 0ba0d8fecb spirv: dont use OpIAddCarry
This instruction is not really working well in the LLVM SPIRV translator,
as it is not implemented.

This commit also intruces the constructStruct helper function to initialize
structs at runtime. This is ALSO buggy in the translator, and we must work
around OpCompositeConstruct not working when some of the constituents are
runtime-known only.

Some other improvements are made:
- improved variable() so that it is more useful and no longer requires the
  address space. It always puts values in the Function address space,
  and returns a pointer to the Generic address space
- adds a boolToInt utility function
2023-05-20 17:30:21 +02:00
Luuk de Gram ca870aa005 wasm: fix div_trunc for floats
For floats we would previously only do the division, but not
the truncation for floats. This would result in incorrect values
being returned.
2023-05-19 20:22:47 +02:00
Jacob Young 01b63cd081 x86_64: delete some incorrect code 2023-05-18 20:42:38 -04:00
Jacob Young 77a8cb5728 x86_64: fix @clz and @ctz of u8 2023-05-15 03:07:51 -04:00
Jacob Young 6c6d8d67cf x86_64: redo movement, float negation, and @fabs 2023-05-15 03:07:51 -04:00
Ali Chraghi ccc490ef68 setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
Jacob Young 2e6a6d7564 llvm/cbe: fix signed @mod/@divFloor computations
Closes #15636
2023-05-10 15:11:52 -04:00