Ryan Liptak
815e53b147
Update all std.mem.tokenize calls to their appropriate function
...
Everywhere that can now use `tokenizeScalar` should get a nice little performance boost.
2023-05-13 13:45:04 -07:00
Veikka Tuominen
68bacad804
Merge pull request #15643 from Vexu/fixes
...
make `@call` compile errors match regular calls
2023-05-13 12:52:16 +03:00
Veikka Tuominen
5aa9628de3
Sema: handle recursive inferred errors better in analyzeIsNonErrComptimeOnly
...
Closes #15669
2023-05-12 14:59:26 +03:00
Ali Chraghi
ccc490ef68
setup spirv backend in behavior tests
2023-05-11 20:31:52 +02:00
Andrew Kelley
7f7bd206dc
Merge pull request #15519 from dweiller/issue-15482
...
Optimize lowering of `s[start..][0..len]`
2023-05-11 08:59:44 -07:00
Andrew Kelley
5569e6b49d
Merge pull request #15639 from jacobly0/signed-mod
...
llvm/cbe: fix signed `@mod`/`@divFloor` computations
2023-05-11 08:36:33 -07:00
Veikka Tuominen
f0fdaf32d3
fix incorrect use of mutable pointers to temporary values
2023-05-11 17:23:06 +03:00
Veikka Tuominen
0a7f8c2e01
Sema: return const pointers from ref inits
...
Closes #12189
2023-05-11 12:23:57 +03:00
Jacob Young
c5b96c7447
llvm: fix @max/@min of unsupported float types
...
Closes #15611
2023-05-10 15:16:50 -04:00
Jacob Young
2e6a6d7564
llvm/cbe: fix signed @mod/@divFloor computations
...
Closes #15636
2023-05-10 15:11:52 -04:00
r00ster91
297b5d1074
fix [x]u65529 and above overflowing
...
```
$ cat overflow.zig
test {
var a: [1]u65535 = undefined;
_ = a;
}
$ zig-out/bin/zig test overflow.zig
thread 290266 panic: integer overflow
zig/src/type.zig:3604:55: 0xada43d in intAbiAlignment (zig)
std.math.ceilPowerOfTwoPromote(u16, (bits + 7) / 8),
^
zig/src/type.zig:3598:42: 0xadd4ea in intAbiSize (zig)
const alignment = intAbiAlignment(bits, target);
^
zig/src/type.zig:3500:61: 0x92be91 in abiSizeAdvanced (zig)
return AbiSizeAdvanced{ .scalar = intAbiSize(bits, target) };
^
zig/src/type.zig:3385:62: 0x928933 in abiSizeAdvanced (zig)
switch (try payload.elem_type.abiSizeAdvanced(target, strat)) {
^
zig/src/type.zig:3268:32: 0x92c012 in abiSize (zig)
return (abiSizeAdvanced(ty, target, .eager) catch unreachable).scalar;
^
```
This is only noticed in a debug build of zig and silently does the wrong
thing and overflows in release builds.
This happened to `[x]u65529` and above because of the ` + 7` on a `u16`.
2023-05-09 11:58:34 +03:00
Jacob Young
6778da4516
x86_64: implement binary operations for f16 and f16 vectors
2023-05-08 07:36:20 -04:00
Jacob Young
f8708e2c4d
x86_64: implement @floor, @ceil, and @trunc for float vectors
2023-05-08 07:36:20 -04:00
Jacob Young
ea957c4cff
x86_64: implement @sqrt for f16 scalars and vectors
2023-05-08 07:36:20 -04:00
Jacob Young
05580b9453
x86_64: implement float cast from f16 to f64
2023-05-08 07:36:20 -04:00
Jacob Young
1c53f0a6b0
Dwarf: workaround crash
2023-05-08 07:36:20 -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
3a5e3c52e0
x86_64: implement @mulAdd
2023-05-08 07:36:20 -04:00
Jacob Young
5d4288c5f6
x86_64: fix unordered float equality
2023-05-08 07:36:19 -04:00
Jacob Young
32ab930f1d
x86_64: implement f16 conversions when supported
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
Dominic
5a3eca5d4c
Disallow named test decls with duplicate names
2023-05-08 10:59:06 +03:00
dweiller
4d296debef
test: disable by-length slice test on wasm backend
2023-05-07 15:55:21 +10:00
dweiller
e507f0c0aa
test: add behavior tests for pointer slice-by-length
2023-05-07 15:55:21 +10:00
dweiller
7c8d60e814
test: add behavior tests for slice-by-length
2023-05-07 15:55:20 +10:00
Jacob Young
a19faa2481
x86_64: implement movement of more types
...
* f16
* f128
* vector
2023-05-03 04:25:14 -04:00
Jacob Young
36a39267b8
x86_64: fix feature confusion
2023-05-03 04:25:14 -04:00
Jacob Young
9ccdbca635
x86_64: implement fabs
2023-05-03 04:25:14 -04:00
Jacob Young
31429a4e86
codegen: handle variable and decl_ref_mut consistently
2023-05-03 04:25:14 -04:00
Jacob Young
f894ec264b
codegen: fix global nested field_ptr
2023-05-03 04:25:14 -04:00
Jacob Young
3a30b82741
x86_64: implement fieldParentPtr
2023-05-03 04:25:14 -04:00
Jacob Young
3f5592c114
x86_64: implement slice elem ptr for more MCValue tags
2023-05-03 04:25:14 -04:00
Jacob Young
f56f5af403
x86_64: fix global slices
2023-05-03 04:25:14 -04:00
mlugg
152c7b1885
Implement multi-argument @min/@max and notice bounds
...
Resolves : #14039
2023-05-02 16:46:27 -07:00
Jacob Young
db88b41472
x86_64: fix switch multi-prongs and mul/div flags clobber
2023-05-01 19:22:53 -04:00
Jakub Konka
5e7f3d5daa
x86_64: disable advanced memset tests on Windows
2023-05-01 19:22:53 -04:00
Jacob Young
47a34d038d
x86_64: implement tagName
2023-05-01 19:22:52 -04:00
Jacob Young
c388960042
x86_64: fix large not and atomicrmw
2023-05-01 19:22:52 -04:00
Jacob Young
50f96c2949
x86_64: fix stack realignment
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
Andrew Kelley
7baf0de807
Merge pull request #15458 from koachan/sparc64-codegen
...
stage2: sparc64: Yet another patchset for the selfhosted backend
2023-04-29 10:55:50 -07:00
Koakuma
d339e86fb1
stage2: sparc64: Skip unimplemented tests
2023-04-28 16:45:37 -07:00
Andrew Kelley
85ffb8f18f
disable 2 failing behavior tests with x86 backend
2023-04-28 13:29:39 -07:00
Andrew Kelley
73d3fb9883
C backend: fix ptr comparison of array ptrs when one is null-terminated
2023-04-28 13:24:43 -07:00
Andrew Kelley
a67dec1c9f
disable not yet passing new behavior tests from this branch
2023-04-28 13:24:42 -07:00
Andrew Kelley
9295355985
LLVM backend: optimize memset with comptime-known element
...
When the element is comptime-known, we can check if it has a repeated
byte representation. In this case, `@memset` can be lowered with the
LLVM intrinsic rather than with a loop.
2023-04-28 13:24:42 -07:00
Andrew Kelley
00b690540e
llvm backend: fix lowering of memset
...
The bitcast of ABI size 1 elements was problematic for some types.
2023-04-28 13:24:42 -07:00
Andrew Kelley
011bc59e8a
Merge pull request #15435 from jacobly0/x86_64-frame
...
x86_64: add frame indices
2023-04-27 15:45:01 -07:00
Andrew Kelley
aa3405aabc
Merge pull request #15474 from Luukdegram/wasm-atomics
...
wasm: implement atomic instructions
2023-04-27 08:26:35 -07:00