Andrew Kelley
982c500be5
Merge pull request #23188 from jacobly0/fix-23143
...
x86_64: fix crashes with symbols
2025-03-11 16:11:09 -04:00
mlugg
423907c270
Sema: fix handling of @This() on opaques
...
Resolves : #22869
2025-03-11 13:13:52 +00:00
Jacob Young
cff90e3ae0
x86_64: implement select of register mask
2025-03-10 10:38:33 -04:00
Andrew Kelley
539f3effd3
Merge pull request #21933 from kcbanner/comptime_nan_comparison
...
Fix float vector comparisons with signed zero and NaN, add test coverage
2025-03-09 15:06:25 -04:00
kcbanner
144d69b571
test: add comptime memoization tests for bit-for-bit float equality
2025-03-04 23:31:12 -05:00
kcbanner
8eefc4c5c2
test: skip the float vector cmp tests on failing targets
2025-03-04 23:31:08 -05:00
Linus Groh
79460d4a3e
Remove uses of deprecated callconv aliases
2025-03-05 03:01:43 +00:00
Matthew Lugg
c76f451abc
Merge pull request #22979 from mlugg/remove-legacy-coercions
...
Sema: remove legacy coercion
2025-03-03 22:18:28 +00:00
kcbanner
71d0d4bbfe
test: separate out float vector tests and skip them on unsupported backends
2025-03-03 15:35:07 -05:00
kcbanner
981f84157c
Value: fix comparison of NaN in compareHeteroAdvanaced
...
Sema: fix equality comparison of signed zeroes and NaN in compareScalar
tests: add test coverage for vector float comparisons
2025-03-03 15:35:07 -05:00
Jacob Young
a6525c1762
Merge pull request #22529 from xtexx/x86-64/shl-sat-int
...
x86_64: Implement integer saturating left shifting codegen
2025-03-02 02:51:36 -05:00
Bingwu Zhang
1da909a1e2
x86_64: add behavior tests for saturating shift left
...
Co-authored-by: Jacob Young <jacobly0@users.noreply.github.com>
Signed-off-by: Bingwu Zhang <xtex@aosc.io>
2025-03-02 10:30:43 +08:00
xtex
4e32193de3
x86_64: implement integer saturating left shifting codegen
...
Simliarly to shl_with_overflow, we first SHL/SAL the integer, then
SHR/SAR it back to compare if overflow happens.
If overflow happened, set result to the upper limit to make it saturating.
Bug: #17645
Co-authored-by: Jacob Young <jacobly0@users.noreply.github.com>
Signed-off-by: Bingwu Zhang <xtex@aosc.io>
2025-03-02 10:30:32 +08:00
Jacob Young
50b40c9621
x86_64: rewrite wrapping add/sub
2025-03-01 16:29:22 -05:00
mlugg
3aaf394249
test: remove dependencies on legacy coercion
2025-02-26 00:17:09 +00:00
Ali Cheraghi
aec0f9b3e7
test: skip failing tests with spirv-vulkan
2025-02-24 19:39:42 +01:00
mlugg
5e20e9b449
Sema: allow @ptrCast of slices changing the length
...
Also, refactor `Sema.ptrCastFull` to not be a horrifying hellscape.
2025-02-23 08:28:58 +00:00
Jacob Young
220f80e71d
Dwarf: fix lowering of comptime-only optional pointer null values
...
Closes #22974
2025-02-22 22:47:32 -05:00
David Rubin
84aac8b6c7
Type: resolve union tag type before checking for runtime bits
2025-02-22 22:22:55 -05:00
Andrew Kelley
eb3c7f5706
zig build fmt
2025-02-22 17:09:20 -08:00
Pavel Verigo
b25d93e7d9
stage2-wasm: implement switch_dispatch + handle > 32 bit integers in switches
...
Updated solution is future proof for arbitary size integer handling for both strategies .br_table lowering if switch case is dense, .br_if base jump table if values are too sparse.
2025-02-22 18:34:00 -05:00
Jacob Young
300cb4881f
x86_64: rewrite scalar @bitReverse
2025-02-22 00:05:47 -05:00
Alex Rønne Petersen
fc7a0c4878
Sema: Fix fnptr alignment safety checks to account for potential ISA tag.
...
As seen on e.g. Arm/Thumb and MIPS (MIPS16/microMIPS).
Fixes #22888 .
2025-02-22 04:12:46 +01:00
Jacob Young
7d70d7b215
x86_64: rewrite scalar @popCount
2025-02-18 09:47:44 -05:00
Jacob Young
ebea56d279
x86_64: rewrite scalar @ctz
2025-02-18 09:47:44 -05:00
Andrew Kelley
d2e70ef84a
Merge pull request #22913 from jacobly0/x86_64-rewrite
...
x86_64: rewrite unsafe int vector multiplication
2025-02-17 16:13:22 -08:00
Alex Rønne Petersen
481b7bf3f0
std.Target: Remove functions that just wrap component functions.
...
Functions like isMinGW() and isGnuLibC() have a good reason to exist: They look
at multiple components of the target. But functions like isWasm(), isDarwin(),
isGnu(), etc only exist to save 4-8 characters. I don't think this is a good
enough reason to keep them, especially given that:
* It's not immediately obvious to a reader whether target.isDarwin() means the
same thing as target.os.tag.isDarwin() precisely because isMinGW() and similar
functions *do* look at multiple components.
* It's not clear where we would draw the line. The logical conclusion before
this commit would be to also wrap Arch.isX86(), Os.Tag.isSolarish(),
Abi.isOpenHarmony(), etc... this obviously quickly gets out of hand.
* It's nice to just have a single correct way of doing something.
2025-02-17 19:18:19 +01:00
Jacob Young
82eedf56d7
x86_64: rewrite scalar @byteSwap
2025-02-17 05:36:18 -05:00
Jacob Young
cec6867d76
x86_64: rewrite unsafe int vector multiplication
2025-02-17 00:10:24 -05:00
Jacob Young
dcc9fe322e
x86_64: rewrite unsafe scalar int multiplication
2025-02-15 04:13:21 -05:00
Jacob Young
4ea18c22f9
x86_64: rewrite array access
2025-02-15 03:45:21 -05:00
Jacob Young
f6bcc9dbcb
x86_64: rewrite scalar and vector int @rem
2025-02-15 03:45:21 -05:00
Jacob Young
8c48376d64
x86_64: rewrite scalar and vector int @divTrunc
2025-02-15 03:45:21 -05:00
Jacob Young
9f121ec8fb
x86_64: implement unsafe scalar and vector integer add/sub
2025-02-15 03:45:21 -05:00
Jacob Young
13ca87e204
x86_64: implement conversions between float and int vectors
2025-02-12 10:11:54 -05:00
Jacob Young
5433e0438c
cbe: fix ub triggered by mulw overflowing the promoted type
...
Closes #21914
2025-02-10 17:22:16 -08:00
Jacob Young
74fbcd22e6
cbe: fix crash rendering argument names in lazy functions
...
Closes #19905
2025-02-10 17:20:52 -08:00
Jacob Young
4e4775d6bd
x86_64: implement conversions between scalar floats and ints
...
Closes #22797
2025-02-09 00:42:55 -08:00
Andrew Kelley
2d4954ad63
Merge pull request #22717 from jacobly0/x86_64-rewrite
...
x86_64: rewrite `@truncate`
2025-02-07 04:06:50 -08:00
Isaac Freund
87bbb49d5f
test: check @tagName() in callconv C function
...
This is a regression test for an x86_64 backend miscompilation when
using @tagName() in a callconv(.c) function with -fPIC.
2025-02-07 07:20:53 +01:00
Jacob Young
6afc5770d3
wasm: disable failing tests
2025-02-06 17:02:54 -05:00
Jacob Young
c2718c4803
x86_64: rewrite float @mod
2025-02-06 16:14:53 -05:00
Jacob Young
288d3062d0
x86_64: avoid comparing different transcendental function impls
2025-02-06 16:14:53 -05:00
Jacob Young
fa9b0fa6d3
x86_64: rewrite most of the remaining float ops
2025-02-06 16:14:53 -05:00
Jacob Young
39119088f9
x86_64: rewrite vector @truncate
2025-02-06 16:14:53 -05:00
Jacob Young
c58e60a042
x86_64: rewrite scalar @truncate
2025-02-06 16:14:53 -05:00
mlugg
5d935e1137
behavior: add test for old bug
...
Resolves : #18435
2025-02-06 01:23:27 +00:00
mlugg
164700740b
behavior: add test for old bug
...
Resolves : #13013
2025-02-06 00:52:03 +00:00
mlugg
6bd92a21b7
behavior: add test for old bug
...
Resolves : #2289
2025-02-06 00:51:59 +00:00
mlugg
3031d81387
Sema: fix @typeInfo of function with generic return type and IES
...
Resolves : #20088
2025-02-05 21:26:04 +00:00