Andrew Kelley
995c36dcb1
avoid testing inline for in unrelated behavior tests
2023-01-02 14:09:01 -07:00
kcbanner
4776128099
skip "atomicrmw with 128-bit ints" on everything except cbe
2023-01-02 13:56:32 -07:00
kcbanner
8ebf18635c
skip "atomicrmw with 128-bit ints" on linux x64_64 due to linker error
2023-01-02 13:56:32 -07:00
kcbanner
50c31e5caa
skip "truncate int128" on wasm
2023-01-02 13:56:32 -07:00
kcbanner
fc84b233ee
skip "truncate to non-power-of-two integers from 128-bit" on non-llvm
2023-01-02 13:56:32 -07: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
Luuk de Gram
f9b3e8c762
test/link: add test case for exporting data syms
2023-01-02 18:36:18 +01:00
Luuk de Gram
3e32a18956
test/link: add test case for function table
...
Adds 3 linker tests to verify the indirect function table
functionality for importing, exporting and its regular definitions.
2023-01-02 18:36:18 +01:00
Luuk de Gram
e4869eeac1
test/link: linker tests for all export cases
...
Adds a linker test case for each possible export case. This means
one where no exports are done (i.e. no flags set), when the -dynamic
flag is set, and finally when --export=<value> flag(s) are set.
2023-01-02 18:36:17 +01:00
Veikka Tuominen
332a43858a
Sema: @intToEnum on non-exhaustive enum at comptime should check int is in range
...
Closes #14155
2023-01-02 17:06:06 +02:00
kcbanner
676e4f3824
cbe: changes to get zig2.c compiling under msvc
...
- Add cpuid / getXCR0 functions for the cbe to use instead of asm blocks
- Don't cast between 128 bit types during truncation
- Fixup truncation to use functions for shifts / adds
- Fixup float casts for undefined values
- Add test for 128 bit integer truncation
2023-01-01 16:44:29 -05: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
kcbanner
5d59799641
cbe: add msvc flt atomics, re-enable test
2023-01-01 16:44:29 -05:00
kcbanner
6ed049fe36
cbe: all behaviour tests now pass on msvc
...
- Fix zig_clz_u128 not respecting the bits argument. This was crashing the compile-rt addxf3 tests with the cbe
- Instead of redering a negation for negative 128 bit int literals, render the literal as twos complement. This allows
rendering int representations of floats correctly (specifically f80).
2023-01-01 16:44:29 -05:00
kcbanner
6445196fab
tests: disable function alignment test for cbe, add 128-bit atomicrmw tests
2023-01-01 16:44:29 -05:00
kcbanner
5470708a89
cbe: implement 128 bit atomic operations with cmpxchg loops
...
- Enable 128 bit atomic int tests for the cbe only
2023-01-01 16:44:29 -05:00
kcbanner
5b8245d35a
tests: update "atomicrmw with ints" to test u8 through u64
2023-01-01 16:44:29 -05:00
kcbanner
2d34477dbb
cbe: msvc atomics
...
- Implement most atomic operations for msvc
- Disable "atomicrmw with floats" test for cbe
2023-01-01 16:44:28 -05:00
kcbanner
4fe71977e0
temporarily disable asm tests
2023-01-01 16:44:28 -05:00
Veikka Tuominen
58c1d98c14
add tests for fixed stage1 bugs
...
Closes #4144
Closes #4255
Closes #4372
Closes #4375
Closes #4380
Closes #4417
Closes #4423
Closes #4476
Closes #4528
Closes #4562
Closes #4572
Closes #4597
Closes #4639
Closes #4672
Closes #4782
Closes #4955
Closes #4984
Closes #4997
Closes #5010
Closes #5114
Closes #5166
Closes #5173
Closes #5276
2022-12-31 20:49:02 -05:00
Andrew Kelley
40ba4d4a89
Merge pull request #14102 from Luukdegram/wasm-undefined-symbols
...
WebAssembly: remove unconditional --allow-undefined flag
2022-12-29 17:59:44 -05:00
Andrew Kelley
9b665a59f2
Merge pull request #14101 from Vexu/stage1
...
add tests for fixed stage1 bugs
2022-12-29 15:33:45 -05:00
Veikka Tuominen
e0b6140009
Type: fix printing of default alignment on non-byte aligned pointers
2022-12-29 12:47:11 +02:00
Veikka Tuominen
9a0c593a54
add tests for fixed stage1 bugs
...
Closes #1957
Closes #1994
Closes #2140
Closes #2746
Closes #2802
Closes #2855
Closes #2895
Closes #2981
Closes #3054
Closes #3158
Closes #3234
Closes #3259
Closes #3371
Closes #3376
Closes #3387
Closes #3529
Closes #3653
Closes #3750
Closes #3778
Closes #3882
Closes #3915
Closes #3929
Closes #3961
Closes #3988
Closes #4123
Closes #7448
2022-12-29 12:42:44 +02:00
joachimschmidt557
1caf56c5fb
stage2 AArch64: implement errUnion{Err,Payload} for registers
2022-12-29 11:12:08 +01:00
Jacob Young
74b14edea8
link: fix memory leaks
...
* Fix linker memory leaks found while running `zig build test-cases`.
* Add missing target to test manifest.
2022-12-28 14:24:27 -05:00
Andrew Kelley
0be6157a23
disable failing compile errors test
...
tracking issue #14105
2022-12-28 12:08:03 -07:00
Luuk de Gram
8403612adc
test/link: update linker tests
...
Force importing symbols to show the correct functions are being
imported from the host environment.
2022-12-28 16:49:36 +01:00
Andrew Kelley
a1d82352d2
disable failing C var arg behavior tests
...
See tracking issue #14096
2022-12-27 23:13:03 -07: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
3f1cfcbea8
Merge pull request #14091 from ziglang/stage1-test-coverage
...
add more behavior test coverage
2022-12-27 21:47:17 -05:00
Andrew Kelley
357235d9de
add behavior test for ptrcasted function pointers
...
See #2626 . The runtime case is solved but comptime is not.
2022-12-27 15:19:00 -07:00
Andrew Kelley
6e9fbc83ca
add behavior test for comptime pointer casting
...
comptime `@ptrCast` a subset of an array, then write through it
closes #2444
2022-12-27 14:44:04 -07:00
Andrew Kelley
f4b067743f
add behavior test for optional error union return type
...
closes #1814
2022-12-27 13:46:57 -07:00
Jakub Konka
601ab9a251
Merge pull request #14086 from ziglang/issue-14082
...
macho: ensure LINKEDIT layout follows Apple strict validation rules
2022-12-27 21:39:05 +01: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
Jakub Konka
aea3460cf5
Merge pull request #14084 from joachimschmidt557/stage2-aarch64
...
stage2 AArch64: small improvements
2022-12-27 18:59:59 +01:00
Jakub Konka
8d29c84d00
link-tests: test uuid on x86_64-macos too
2022-12-27 16:43:35 +01:00
Jakub Konka
6925ef0f1a
zld: exclude strtab padding from uuid calculation
2022-12-27 16:43:35 +01:00
Jakub Konka
8adcc2258f
link-tests: redo macho strict validation test to match libstuff
2022-12-27 16:43:35 +01:00
Veikka Tuominen
a777373bb8
enable test on more targets
...
This was fixed by 8a0a6b7387 for targets
without avx512
2022-12-27 15:34:19 +02:00
Veikka Tuominen
9c0f3163a8
value: fix bitcasting packed structs with u0 fields
...
Closes #13942
2022-12-27 15:33:27 +02:00
joachimschmidt557
485082064a
stage2 AArch64: implement field_parent_ptr
2022-12-27 21:26:18 +08: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
81318e8704
llvm: add asserts and behavior tests for #14063
...
Closes #14063
2022-12-27 00:12:56 -05:00
Andrew Kelley
1b86a628ac
Merge pull request #14015 from Vexu/recursive-inline
...
Sema: add error for recursive inline call
2022-12-26 20:34:22 -05:00
Veikka Tuominen
81443fcde8
Sema: add error for recursive inline call
...
Closes #12973
2022-12-26 16:36:30 +02:00