Jacob Young
4e85536604
Builder: fix encoding big integers in bitcode
...
Closes #19543
2024-04-06 12:53:09 -07:00
mlugg
20403ee41d
behavior: add tests for #18816
2024-03-06 21:26:38 +00: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
Bogdan Romanyuk
7fbbeae617
value: handle lazy_align and lazy_size in writeToPackedMemory
2023-11-27 12:35:29 +00:00
mlugg
9c16b2370d
test: update behavior to silence 'var is never mutated' errors
2023-11-19 09:57:03 +00: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
Luuk de Gram
9402f8b74a
add behavior test @tagName with signed values
2023-10-08 15:23:50 +02:00
Robin Voetter
075584a4d7
spirv: enable passing tests
2023-09-23 12:36:56 -07:00
Robin Voetter
073289d0da
spirv: disable new behavior tests that do not pass
...
Some new behavior tests have recently been added, and not all of these
pass with the SPIR-V backend.
2023-07-01 19:45:09 +02: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
Jacob Young
8875efe548
Sema: fix auto-numbered enums with signed tag types
...
Closes #16095
2023-06-20 20:09:28 -07:00
IntegratedQuantum
3267eb3a28
Fix @enumToInt and @tagName for auto-numbered enums with signed tag type.
2023-06-20 20:09:28 -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
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
Luuk de Gram
1042deb86f
enable passing behavior tests
2023-05-31 18:04:33 +02: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
37aa343079
spirv: more passing tests
2023-05-20 17:30:22 +02:00
Robin Voetter
7d519b3383
spirv: use intInfo instead of arithmeticTypeInfo in airIntCast
...
This ensures that we can also cast enums and error sets here. In the future
this function will need to be changed to support composite and strange
integers, but that is fine.
2023-05-20 17:30:21 +02:00
Robin Voetter
6e3770e970
spirv: implement pointer comparison in for air cmp
...
It turns out that the Khronos LLVM SPIRV translator does not support OpPtrEqual.
Therefore, this instruction is emitted using a series of conversions.
This commit breaks intToEnum, because enum was removed from the arithmetic type
info. The enum should be converted to an int before this function is called.
2023-05-20 17:30:21 +02:00
Ali Chraghi
fedc9a19e7
spirv: lower get_union_tag
2023-05-20 18:43:26 +03:30
Ali Chraghi
f8de4db873
spirv: implement arithmeticTypeInfo for Enum (@intToEnum)
2023-05-15 14:22:40 +03:30
Ali Chraghi
ccc490ef68
setup spirv backend in behavior tests
2023-05-11 20:31:52 +02:00
Jacob Young
36a39267b8
x86_64: fix feature confusion
2023-05-03 04:25:14 -04:00
Jacob Young
47a34d038d
x86_64: implement tagName
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
c1a2da6b78
x86_64: implement packed load and store
2023-04-16 17:05:35 -04:00
Luuk de Gram
abc1e52e08
wasm: enable @tagName behavior tests
2023-04-12 22:23:36 +02:00
Jacob Young
c51930b060
behavior: enable passing behavior tests on stage2_x86_64
2023-03-15 01:04:21 -04:00
Veikka Tuominen
f2faa303a5
Sema: handle enum expressions referencing local variables
...
Closes #12272
2023-01-05 22:03:32 +02:00
Koakuma
f9e9ba784f
stage2: sparc64: Skip unimplemented tests
2022-12-10 21:51:46 +07:00
Andrew Kelley
4071b22454
Merge pull request #13715 from Vexu/cbe
...
cbe bug fixes and improvements
2022-12-01 17:38:11 -05:00
Luuk de Gram
090deae41d
wasm: enable behavior tests for packed structs
2022-11-30 21:01:09 +01:00
Veikka Tuominen
63ae7899ae
cbe: ensure test and tagName function names are unique
2022-11-30 15:14:33 +02:00
Jakub Konka
0914e0a4ec
dwarf: do not assume unsigned 64bit integer for the enum value
2022-11-10 09:36:45 +01:00
Jacob Young
f399dd107a
cbe: implement tag name
2022-10-25 05:11:28 -04:00
Andrew Kelley
7c7d9e13d7
Sema: fix runtime int to enum with one possible value
2022-10-18 10:18:09 -07:00
Cody Tapscott
83e2d3fb37
stage1: Skip new tests that never passed in stage1
...
This gets the behavior tests passing for stage1 again.
2022-10-13 12:53:20 -07:00
r00ster91
51d9db8569
fix(text): hyphenate "comptime" adjectives
2022-10-05 21:19:30 +02:00
joachimschmidt557
3794f2c493
stage2 ARM: implement struct_field_val for registers
2022-09-09 19:17:18 +02:00
joachimschmidt557
261fec8036
stage2 ARM: amend implementation of various AIR instructions
...
- unwrap_errunion_err for registers
- unwrap_errunion_payload for registers
- ptr_slice_len_ptr for all MCValues
- ptr_slice_ptr_ptr for all MCValues
2022-09-09 19:17:17 +02:00
Veikka Tuominen
f281f3d10e
Sema: improve behavior of comptime_int backed enums
2022-09-02 17:57:11 +03:00
Veikka Tuominen
776caaf999
Sema: fix handling of non-standard int types in empty non-exhaustive enums
...
Closes #12649
2022-08-28 15:41:21 +03:00
Andrew Kelley
7453f56e67
stage2: explicitly tagged enums no longer have one possible value
...
Previously, Zig had inconsistent semantics for an enum like this:
`enum(u8){zero = 0}`
Although in theory this can only hold one possible value, the tag
`zero`, Zig no longer will treat the type this way. It will do loads and
stores, as if the type has runtime bits.
Closes #12619
Tests passed locally:
* test-behavior
* test-cases
2022-08-24 22:20:31 -07:00
Veikka Tuominen
4f200eda9f
stage2 llvm: ensure @tagName functions are unique
2022-06-30 21:47:25 +03:00
joachimschmidt557
960c142060
stage2 ARM: implement basic intCast and error union wrapping
2022-06-25 21:16:51 +02:00
Luuk de Gram
90f08a69aa
wasm: Enable passing behavior tests
...
This also adds some float-related instructions to MIR/Emit
2022-03-09 13:53:20 -07:00
joachimschmidt557
a06e9eca45
stage2 AArch64: add more slice support
...
* airSlice
* airArrayToSlice
* and initial support for airSlicePtr and co
2022-03-05 11:31:51 +01:00
Jakub Konka
d35cae551e
x64: rectify and add missing optionals bits
...
Includes changes/additions to:
* `wrap_optional`
* `optional_payload`
* `isNull` helper
2022-03-02 14:05:29 +01:00
Andrew Kelley
ed2364a148
stage2: introduce anonymous struct literals
2022-03-01 23:46:57 -07:00