Commit Graph

154 Commits

Author SHA1 Message Date
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
Jacob Young cba195c117 x86_64: implement some float and float vector movement
This allows actually storing value of these supported types in
registers, and not restricting them to stack slots.
2023-05-08 07:36:20 -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 c388960042 x86_64: fix large not and atomicrmw 2023-05-01 19:22:52 -04:00
Jacob Young db76ae8260 x86_64: fix emitting f80 globals 2023-05-01 19:22:52 -04:00
Jacob Young 6de457211f behavior: update affected tests for the x86_64 backend 2023-05-01 19:22:52 -04:00
Jacob Young 894406b9d3 behavior: update passing cbe tests 2023-04-26 19:05:17 -04:00
Jacob Young 6b23a7b61a behavior: enable a bunch of disabled tests 2023-04-21 16:36:31 -04:00
Andrew Kelley e9d854743a disable more failing C backend tests 2023-04-15 10:33:08 -07:00
Andrew Kelley a281d29881 disable not-yet-passing C backend tests 2023-04-15 10:33:08 -07:00
Jacob Young 1e080e5056 x86_64: implement atomic loops 2023-03-25 16:23:55 -04:00
Jacob Young 93d696e84e CBE: implement some big integer and vector unary operations 2023-03-05 02:59:01 -05:00
Jacob Young a8f4ac2b94 CBE: implement big integer and vector comparisons 2023-03-05 02:59:01 -05:00
Jacob Young 434c6f42ca behavior: enable passing CBE tests 2023-02-21 09:43:23 -05:00
Andrew Kelley f0530385b5 update existing behavior tests and std lib to new for loop semantics 2023-02-18 19:17:21 -07:00
kcbanner a9b68308b9 cbe: fixes for tls, support for not linking libc, and enabling tests
- cbe: Implement linksection support, to support TLS when not linking libc
- cbe: Support under-aligned variables / struct fields
- cbe: Support packed structs (in the C definition of packed)
- windows: Fix regression with x86 _tls_array
- compiler_rt: Add 128-bit atomics to compiler_rt
- tests: Re-enable threadlocal tests on cbe+windows, and llvm+x86
- tests: Re-enable f80 tests that now pass
- ci: change windows ci to run the CBE behaviour tests with -lc, to match how the compiler is bootstrapped
- update zig1.wasm
2023-01-29 15:04:13 -05:00
kcbanner c2f5c3bc4e skip "binary not 128-bit" on non-llvm 2023-01-02 13:56:32 -07:00
kcbanner 9c951cc874 fmt fixups 2023-01-02 13:56:32 -07:00
kcbanner 9c70315854 tests: add more coverage for 128 bit operations
- fixup 128-bit atomics test to only run on x86_64
- add truncation test for 128-bit types, including non power of two targets (there was a bug with broken non-power-of-two truncation in the cbe)
- add 128-bit binary not test (covers another bug fixed in the cbe)
2023-01-02 13:55:45 -07:00
kcbanner f07d33f54b cbe: fixes for compiling zig2.c under msvc
- add zig_mul_i128
- render slice structs in static initializers without casts / c99 style init
- add negative numbers and u128 to 128-bit multiply test
2023-01-01 16:44:29 -05:00
Andrew Kelley 5ca1753ff1 Revert "aarch64: reenable tests that are no longer regressed"
This reverts commit 3370d58956.

This commit was done with an LLVM build that did not have assertions
enabled. There are LLVM assertions being triggered due to this commit.

Reopens #10627
Reopens #12013
Reopens #12027
2022-12-27 20:54:27 -07:00
Andrew Kelley 19056cb682 Merge pull request #14024 from Vexu/overflow-arithmetic
Make overflow arithmetic builtins return tuples
2022-12-27 13:57:49 -05:00
joachimschmidt557 d6e6162081 stage2 AArch64: unify callee-preserved regs on all targets
also enables many passing behavior tests
2022-12-27 21:17:52 +08:00
Veikka Tuominen 622311fb9a update uses of overflow arithmetic builtins 2022-12-27 15:13:14 +02:00
Jacob Young a52dcdd3c5 CBE: fix bitwise not
Closes #13911
2022-12-21 03:04:59 -05:00
Meghan 3318611618 re-enable "signed zeros are represented properly" beahvior tests for f80 and c_longdouble 2022-12-13 13:33:16 +02:00
Andrew Kelley 74718a1183 disable failing CBE behavior tests failing on aarch64-windows
Also start to move redundant tests next to each other to make them
slightly more obvious that they need to be cleaned up.

See tracking issue #13876
2022-12-10 16:28:49 -07:00
Andrew Kelley cffbb32d31 Merge pull request #13872 from koachan/sparc64-codegen
stage2: sparc64: Some Air lowerings + skip unbuildable tests
2022-12-10 15:10:21 -05:00
Koakuma f9e9ba784f stage2: sparc64: Skip unimplemented tests 2022-12-10 21:51:46 +07:00
r00ster91 3370d58956 aarch64: reenable tests that are no longer regressed
Closes #12013
Closes #10627
Closes #12027
2022-12-10 12:34:34 +01:00
Andrew Kelley c8aba15c22 remove references to stage1 in behavior tests
Good riddance.
2022-12-06 19:06:48 -07:00
Andrew Kelley 518392d6fe disable CBE behavior tests that are not passing in release modes 2022-12-04 15:57:40 -07:00
Jacob Young fdedd62365 cbe: use memcpy for underaligned loads and stores 2022-12-02 22:21:24 -05:00
Veikka Tuominen 11ec7109c3 cbe: do not memcpy identical integer types when bitcasting 2022-11-30 17:11:06 +02:00
Veikka Tuominen 15cc83e27a cbe: reduce amount of temporary locals 2022-11-30 17:11:06 +02:00
Veikka Tuominen 63ae7899ae cbe: ensure test and tagName function names are unique 2022-11-30 15:14:33 +02:00