Pavel Verigo
49ef28a5f1
sema: fix error_return_trace_index handling in zirCondBr
2025-12-05 18:42:47 +01:00
fn ⌃ ⌥
bfe3317059
Return a usize from @abs if given an isize
...
Also:
- `c_ushort` for `c_short`
- `c_uint` for `c_int`
- `c_ulong` for `c_long`
- `c_ulonglong` for `c_longlong`
2025-11-29 21:09:08 +01:00
Matthew Lugg
8f5db19791
Sema: initialize OPV comptime allocs correctly
...
This was caused a `[0]std.builtin.Type.StructField.Attributes` to be
considered `undefined`, even though that type is OPV so should prefer
its OPV `.{}` over `undefined`.
Resolves : #30039
2025-11-29 11:55:36 +00:00
Ali Cheraghi
dec1163fbb
all: replace all @Type usages
...
Co-authored-by: Matthew Lugg <mlugg@mlugg.co.uk>
2025-11-22 22:42:38 +00:00
Benjamin Jurk
4b5351bc0d
update deprecated ArrayListUnmanaged usage ( #25958 )
2025-11-20 14:46:23 -08:00
Alex Rønne Petersen
9ab7eec23e
represent Mac Catalyst as aarch64-maccatalyst-none rather than aarch64-ios-macabi
...
Apple's own headers and tbd files prefer to think of Mac Catalyst as a distinct
OS target. Earlier, when DriverKit support was added to LLVM, it was represented
a distinct OS. So why Apple decided to only represent Mac Catalyst as an ABI in
the target triple is beyond me. But this isn't the first time they've ignored
established target triple norms (see: armv7k and aarch64_32) and it probably
won't be the last.
While doing this, I also audited all Darwin OS prongs throughout the codebase
and made sure they cover all the tags.
2025-11-14 11:33:35 +01:00
Matthew Lugg
532aa3c575
cbe: work around some miscompilations
...
The changes to `codegen.c` are blatant hacks, but the problem they work
around isn't a regression: it's an existing miscompilation. This branch
happened to *expose* that miscompilation in more cases by changing how
an incorrect result is *used*.
2025-11-12 16:00:16 +00:00
Matthew Lugg
99a7884308
behavior: disable test on cbe
...
This isn't so much a regression as it is foreshadowing of accepted
proposal https://github.com/ziglang/zig/issues/24657 .
2025-11-12 16:00:16 +00:00
Jacob Young
459f3b7ede
codegen: fix tuple padding
...
Closes #25797
2025-11-04 06:04:30 -05:00
Jacob Young
402c14f86a
aarch64: implement optional comparisons
2025-10-30 09:31:30 +00:00
Jacob Young
52a029e503
x86_64: continue hacking around unimplemented linker logic
...
Closes #25666
2025-10-29 19:31:44 -04:00
mlugg
7a5d2a196f
tweak tests to avoid timeouts
2025-10-18 09:28:42 +01:00
Jacob Young
2e31077fe0
Coff: implement threadlocal variables
2025-10-10 22:47:47 -07:00
xdBronch
60be67d3c0
don't make OPV tuple fields comptime
2025-10-08 18:04:25 +01:00
xdBronch
2c0aa1c6f5
don't make anonymous tuple fields referencing comptime vars comptime
2025-10-07 22:13:10 +01:00
xdBronch
851ae9bb43
don't pass zero-length @memset to the backend
2025-10-06 11:28:56 -07:00
Jacob Young
07c3f9ef8e
x86_64: fix bool vector init register clobber
...
Closes #25439
2025-10-03 12:18:53 -04:00
Jacob Young
e1f3fc6ce2
Coff2: create a new linker from scratch
2025-10-02 17:44:52 -04:00
Jacob Young
d5f09f56e0
x86_64: fix windows calling convention abi
2025-10-02 15:59:51 -04:00
Jacob Young
a744fbd22f
x86_64: fix ~/! miscomps
2025-09-27 18:30:52 -04:00
Andrew Kelley
2a88a6a456
Merge pull request #24497 from ziglang/aro-translate-c
...
compiler: update aro and translate-c to latest; delete clang translate-c
2025-09-25 14:18:49 -07:00
Jacob Young
6257f4abb7
x86_64: improve support for large enums
...
Closes #25247
2025-09-24 21:20:27 -07:00
Andrew Kelley
01132e0cf8
remove behavior test that depended on std.zig.c_translation
...
behavior tests may not depend on this namespace.
2025-09-24 20:01:19 -07:00
Andrew Kelley
ba137783ed
forbid trivial local address returned from functions ( #25333 )
...
progress towards #25312
2025-09-23 23:37:53 +00:00
Andrew Kelley
633162eb0c
add behavior test: comptime C pointer to optional pointer
2025-09-20 18:58:32 -07:00
Andrew Kelley
1c9ac9dbb7
add behavior test: avoid unused field function body compile error
2025-09-20 18:51:43 -07:00
Andrew Kelley
500afbf076
add behavior test: resist alias of explicit copy...
...
...of array passed as arg
closes #22906
2025-09-20 18:51:26 -07:00
Andrew Kelley
ed7ff0b693
allow some test cases to regress
...
tracked by #24061 - these should be re-enabled once that is solved.
2025-09-20 18:33:01 -07:00
mlugg
20925f2957
Revert "frontend: another packedStructFieldPtrInfo fix"
...
This reverts commit dedccecda944f88a5278c12c24ffbea46126de63.
2025-09-20 18:33:01 -07:00
Jacob Young
5144f10ec9
aarch64: fix behavior failures
2025-09-20 18:33:01 -07:00
Andrew Kelley
2ba03e98c8
disable failing stage2_aarch64 behavior tests
2025-09-20 18:33:01 -07:00
Andrew Kelley
5d8c1fb6ab
frontend: another packedStructFieldPtrInfo fix
...
it was calculating host integer size in a wrong way. just use integer
abi size
2025-09-20 18:33:01 -07:00
Andrew Kelley
0681bf06ab
frontend: packed struct field ptr no longer finds byte borders
...
technically breaking, but I doubt anyone will notice.
2025-09-20 18:33:01 -07:00
Jacob Young
2fdf0e29b3
aarch64: enable fixed behavior
2025-09-20 18:33:00 -07:00
Andrew Kelley
5ec0a7d8a5
coerce vectors to arrays rather than inline for
2025-09-20 18:33:00 -07:00
Andrew Kelley
426af68b7d
compiler: require comptime vector indexes
2025-09-20 18:33:00 -07:00
Andrew Kelley
0e47bd16da
add behavior test: return undefined pointer from function
...
This clarifies that it is legal to return an invalid pointer from a
function, provided that such pointer is not dereferenced.
This matches current status quo of the language. Any change to this
should be a proposal that argues for different semantics.
It is also legal in C to return a pointer to a local. The C backend
lowers such thing directly, so the corresponding warning in C must be
disabled (`-Wno-return-stack-address`).
2025-09-20 17:49:00 -07:00
Alex Rønne Petersen
beb25b0430
test: disable some vector ctz/clz behavior tests on LoongArch with LSX
...
https://github.com/llvm/llvm-project/issues/159529
2025-09-18 12:42:24 +02:00
Alex Rønne Petersen
f90548e740
test: skip alternative constraints behavior test on LoongArch
...
https://github.com/llvm/llvm-project/issues/159200
2025-09-18 12:42:14 +02:00
Silver
65a6bf1267
fix handling of comptime-only union fields in Type.getUnionLayout ( #25182 )
...
Fixes #25180
2025-09-17 21:39:47 -07:00
Andrew Kelley
8e9f2f02d2
Merge pull request #25201 from jacobly0/x86_64-addsat
...
x86_64: fix strictness edge cases in `+|`
2025-09-17 21:15:03 -07:00
mlugg
32a1aabff7
std.math.big.int: normalize zero result for small multiplications
...
Resolves : #25221
2025-09-13 17:13:27 +01:00
Jacob Young
e313b387a0
x86_64: delete usages of avx2 vpack?s??
...
This instruction actually has fairly useless semantics, and even the
cases that were semantically correct could save 1 cycle of latency by
using a different sequnce involving the avx version instead.
Closes #25174
2025-09-10 22:40:26 -04:00
Jacob Young
1a0a9d7d59
x86_64: fix strictness edge cases in +|
...
Closes #25145
2025-09-10 21:01:13 -04:00
Andrew Kelley
2d9df0bb1a
behavior tests: remove one dependency on std lib
2025-09-07 20:23:05 -07:00
Andrew Kelley
5701617b27
wasm backend: disable failing behavior tests
2025-09-07 20:11:37 -07:00
Andrew Kelley
4f7aecd348
disable failing behavior test on stage2_aarch64
2025-09-05 23:47:56 -07:00
Andrew Kelley
b9a63433b7
behavior tests: update for new requirement
...
packed union fields must all have matching bit sizes
2025-09-05 19:44:54 -07:00
Luna Schwalbe
63ab0c0302
Reenable vector tests for armeb/thumbeb
...
https://github.com/ziglang/zig/issues/22060 has been fixed by upstream.
2025-09-04 16:23:18 +02:00
Andrew Kelley
ec36e0609f
delete behavior test that depends on std.fmt
...
behavior tests should have minimal dependency on std
2025-08-31 12:49:18 -07:00