243 Commits

Author SHA1 Message Date
Jacob Young
729daed591 x86_64: rewrite casts 2023-05-18 20:42:38 -04:00
Jacob Young
904ffb41de x86_64: implement calling function references 2023-05-15 03:07:51 -04:00
Jacob Young
e36e9323f4 x86_64: implement union_init 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
5d4288c5f6 x86_64: fix unordered float equality 2023-05-08 07:36:19 -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
6de457211f behavior: update affected tests for the x86_64 backend 2023-05-01 19:22:52 -04:00
Koakuma
d339e86fb1 stage2: sparc64: Skip unimplemented tests 2023-04-28 16:45:37 -07:00
Jakub Konka
bc69d5a00f macho: invalidate GOT/stub relocs after segment shift in memory 2023-04-26 19:08:38 -04:00
Jacob Young
b5b0b55582 x86_64: fix tlv references 2023-04-26 19:05:17 -04:00
Jacob Young
894406b9d3 behavior: update passing cbe tests 2023-04-26 19:05:17 -04:00
Andrew Kelley
a5c910adb6 change semantics of @memcpy and @memset
Now they use slices or array pointers with any element type instead of
requiring byte pointers.

This is a breaking enhancement to the language.

The safety check for overlapping pointers will be implemented in a
future commit.

closes #14040
2023-04-25 11:23:40 -07:00
Jacob Young
780f654e19 behavior: disable flaky test on x86_64
Also reenable stage2_x86_64 windows behavior tests in case it is failing
for the same reason.

Closes #15324
2023-04-16 17:07:07 -04:00
Jacob Young
c1a2da6b78 x86_64: implement packed load and store 2023-04-16 17:05:35 -04:00
Andrew Kelley
a281d29881 disable not-yet-passing C backend tests 2023-04-15 10:33:08 -07:00
Jacob Young
0165187cd0 x86_64: fix some of the mass confusion about the meaning of MCValue 2023-04-13 04:17:47 -04:00
Jacob Young
5900dc0580 x86_64: fix typos 2023-04-03 18:02:55 +02:00
Jacob Young
272acb7ee5 x86_64: implement storing large immediates 2023-04-03 17:45:16 +02:00
Jacob Young
b80cdde4f0 x86_64: implement struct_field_val for large packed structs 2023-04-02 04:49:53 -04:00
Jacob Young
83a208c355 x86_64: implement large cmp 2023-04-02 04:49:53 -04:00
Jacob Young
677427bc3a x86_64: implement error name 2023-04-02 04:49:53 -04:00
Jacob Young
802c2e4fae x86_64: fix popcnt and disable regressed test 2023-03-27 05:58:00 -04:00
Jacob Young
1e080e5056 x86_64: implement atomic loops 2023-03-25 16:23:55 -04:00
Jacob Young
8f385e77ca x86_64: implement struct_field_val for packed containers 2023-03-25 16:23:55 -04:00
Jacob Young
0cfc0d0d13 x86_64: implement struct_field_ptr for packed containers 2023-03-25 16:23:55 -04:00
Jacob Young
dbe1b4a7e5 x86_64: fix value tracking bugs 2023-03-24 17:57:58 -04:00
Jacob Young
f316cb29cc x86_64: implement atomic and fence ops 2023-03-21 08:49:54 +01:00
Jacob Young
f95faac5ae x86_64: (re)implement optional ops
Note that this commit also changes the layout of optional for all
other backends using `src/codegen.zig` without updating them!
2023-03-21 08:49:54 +01:00
Jacob Young
c51930b060 behavior: enable passing behavior tests on stage2_x86_64 2023-03-15 01:04:21 -04:00
Ian Johnson
adc6dec26b Sema: avoid panic on callconv(.C) generic return type
Fixes #14854
2023-03-13 13:17:13 +02:00
Jacob Young
93d696e84e CBE: implement some big integer and vector unary operations 2023-03-05 02:59:01 -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
Veikka Tuominen
d284c00fda Sema: handle lazy values in more places
* resolve lazy values in anon structs being passed to anytype params
* use `resolveMaybeUndefValIntable` where appropriate

Closes #14356
2023-01-22 00:12:36 +02: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
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
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
Veikka Tuominen
81443fcde8 Sema: add error for recursive inline call
Closes #12973
2022-12-26 16:36:30 +02:00
Jacob Young
fc0789f8e7 behavior: disable tests that trigger an llvm 15 bug and assertion
```
LLVM Emit Object... zig: llvm/include/llvm/ADT/APInt.h:840: void llvm::APInt::lshrInPlace(unsigned int): Assertion `ShiftAmt <= BitWidth && "Invalid shift amount"' failed.
Aborted
```

Tracked by #13782
2022-12-24 02:23:05 -05:00
Andrew Kelley
f211c1559a
Merge pull request #13960 from r00ster91/stage1cruft
Close more old stage1 issues
2022-12-22 16:36:55 -05:00
r00ster91
5ecc2b99af behavior: more test coverage
Closes #12450
Closes #13113
Closes #12051
Closes #12092
Closes #12119
Closes #12142
Closes #12450
Closes #13113
Closes #11995
Closes #12000
2022-12-21 23:34:22 +01:00
Jacob Young
0768115b01 behavior: disable failing test
Also add an assert to catch this issue earlier.  For future reference,
the decl without a type and value is the string literal "GET".
2022-12-19 05:59:45 -05:00
r00ster91
aac2d6b56f std.builtin: rename Type.UnionField and Type.StructField's field_type to type 2022-12-17 14:11:33 +01:00
r00ster91
7350ea3e2d std.builtin: rename Type.Fn's args to params
This was a poor naming choice; these are parameters, not arguments.
Parameters specify what kind of arguments are expected, whereas the arguments are the actual values passed.
2022-12-17 14:11:33 +01:00
r00ster91
20d3fd901e std.builtin: rename Type.Fn.Param's arg_type to type
It's the type of a parameter, not an argument, but the prefix is redundant either way.
2022-12-17 14:11:33 +01:00
Evin Yulo
8c8f6bfa64 Add test for #13366
Closes #13366
2022-12-16 18:21:56 +02:00
Evin Yulo
b5d1df091b Add test for #12571
Closes #12571
2022-12-16 18:19:32 +02:00
IntegratedQuantum
0b4461d97b
Fix tautological big_int tests. 2022-12-14 00:29:25 +00: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