Hardy
37fe41792c
added test for bitcast signaled nan float
...
This was fixed by MR #14201
closes #10449
2023-01-20 16:42:24 +02:00
Veikka Tuominen
14f03fbd16
AstGen: reset source cursor before generating pointer attributes
...
These attributes can appear in any order but AstGen expects the source
cursor to be incremented in a monotonically increasing order.
Closes #14332
2023-01-17 20:28:43 +02:00
Veikka Tuominen
8b35f09f4a
Sema: resolve lazy values in switch prong items
...
Closes #14330
2023-01-17 20:28:43 +02:00
Veikka Tuominen
6b037bad59
Sema: ignore dependency loops in typeinfo decls
...
This matches stage1 behavior.
Closes #14322
2023-01-17 20:28:43 +02:00
Veikka Tuominen
6e067dc050
llvm: do not offset packed struct field pointers if they have a host size
...
Closes #14261
2023-01-17 20:28:42 +02:00
Veikka Tuominen
342bae02d8
Sema: automatically optimize order of struct fields
...
This is a simple starting version of the optimization described in #168
where the fields are just sorted by order of descending alignment.
2023-01-16 19:46:41 +02:00
Techatrix
32544ed56c
swap align and callconv in function typeName
2023-01-16 14:04:03 +02:00
Veikka Tuominen
d8128c272a
Sema: fix typeInfo decls with usingnamespace
...
Closes #12403
2023-01-11 21:11:21 +02:00
Veikka Tuominen
83673a8b5f
fix errdefers in functions that can't return errors
...
This was broken by 58caed1c71
Closes #14053
2023-01-10 19:17:42 +02:00
Andrew Kelley
a01d2ab0e3
Merge pull request #14210 from Vexu/compile-errors
...
improve struct/union field error locations
2023-01-05 20:05:14 -07:00
Andrew Kelley
b3e495a38a
Merge pull request #14202 from ziglang/std.http
...
std.http.Client: support HTTP redirects
2023-01-05 19:42:59 -07:00
Veikka Tuominen
f2faa303a5
Sema: handle enum expressions referencing local variables
...
Closes #12272
2023-01-05 22:03:32 +02:00
Veikka Tuominen
f83834993e
std: collect all options under one namespace
2023-01-05 02:31:29 -07:00
Michael Dusan
e0fb4c29cb
llvm codegen: fix f16,f32,f64 nan bitcasts
...
@bitCast from integer NaN representation to float NaN resulted in
changed bits in float. This only happened with signaled NaN.
- added test for signaled NaN
- added tests for quiet NaN (for completeness)
closes #14198
2023-01-05 02:22:30 -07:00
Andrew Kelley
ba1e53f116
avoid triggering LLVM bug on MIPS
...
See #13782
2023-01-05 00:03:59 -07:00
Michael Dusan
ed23615638
behavior: add test for #8277
...
Test `@sizeOf` reified union with zero-size payload fields.
closes #8277
2023-01-04 15:48:00 -05:00
joachimschmidt557
09122650ba
stage2 AArch64: bump up alignment of stack items fitting in regs
...
This enables us to use more efficient loading and storing for these
small stack items
2023-01-03 19:56:09 +01:00
Andrew Kelley
0b99c83c21
fix behavior test compile error
...
I bungled the commit 995c36dcb1 during the
merge. Sorry about that.
2023-01-02 15:02:33 -07:00
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
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
9b665a59f2
Merge pull request #14101 from Vexu/stage1
...
add tests for fixed stage1 bugs
2022-12-29 15:33:45 -05: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
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
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
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
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