10816 Commits

Author SHA1 Message Date
joachimschmidt557
1caf56c5fb stage2 AArch64: implement errUnion{Err,Payload} for registers 2022-12-29 11:12:08 +01:00
Andrew Kelley
34887cf136 powerpc does not have a red zone
This will prevent unused argument warnings when compiling C objects
targeting powerpc.
2022-12-29 00:19:00 -05:00
Andrew Kelley
7350f0d9b5 mingw: add missing vscprintf.c file
closes #13733

Thanks to @kcbanner for finding this.
2022-12-28 12:33:55 -07:00
Jacob Young
74b14edea8 link: fix memory leaks
* Fix linker memory leaks found while running `zig build test-cases`.
 * Add missing target to test manifest.
2022-12-28 14:24:27 -05:00
Jakub Konka
101c259da7
Merge pull request #14087 from jvolkman/issue-14046
Add support for -undefined error
2022-12-28 16:27:42 +01:00
Jakub Konka
601ab9a251
Merge pull request #14086 from ziglang/issue-14082
macho: ensure LINKEDIT layout follows Apple strict validation rules
2022-12-27 21:39:05 +01:00
Andrew Kelley
19056cb682
Merge pull request #14024 from Vexu/overflow-arithmetic
Make overflow arithmetic builtins return tuples
2022-12-27 13:57:49 -05:00
Jeremy Volkman
50a8afd242 Handle -undefined error when passed as linker arg 2022-12-27 10:47:27 -08:00
Jakub Konka
aea3460cf5
Merge pull request #14084 from joachimschmidt557/stage2-aarch64
stage2 AArch64: small improvements
2022-12-27 18:59:59 +01:00
Jeremy Volkman
b0bfde917b Add support for -undefined error
`-undefined dynamic_lookup` was added in #13991. `-undefined error` is the
opposite, and can be used to revert an `-undefined dynamic_lookup` flag
specified previously on the command line.
2022-12-27 08:18:04 -08:00
Jakub Konka
c0c5acf074 macho+zld: fix 32bit build 2022-12-27 17:04:57 +01:00
Jakub Konka
6925ef0f1a zld: exclude strtab padding from uuid calculation 2022-12-27 16:43:35 +01:00
Jakub Konka
2620146834 macho+zld: align to 8 and pad out strtab 2022-12-27 16:43:35 +01:00
Jakub Konka
d83d39297c macho+zld: align to 8 and pad out dysymtab 2022-12-27 16:43:35 +01:00
Jakub Konka
0409dda46b zld: align to 8 and pad out function starts and data in code sections 2022-12-27 16:43:35 +01:00
Jakub Konka
246e3e0c75 macho+zld: align to 8 and pad out dyld info sections 2022-12-27 16:43:35 +01:00
Veikka Tuominen
9c0f3163a8 value: fix bitcasting packed structs with u0 fields
Closes #13942
2022-12-27 15:33:27 +02:00
joachimschmidt557
485082064a
stage2 AArch64: implement field_parent_ptr 2022-12-27 21:26:18 +08:00
joachimschmidt557
d6e6162081
stage2 AArch64: unify callee-preserved regs on all targets
also enables many passing behavior tests
2022-12-27 21:17:52 +08:00
Veikka Tuominen
622311fb9a update uses of overflow arithmetic builtins 2022-12-27 15:13:14 +02:00
Veikka Tuominen
54160e7f6a Sema: make overflow arithmetic builtins return tuples 2022-12-27 15:13:14 +02:00
Jacob Young
81318e8704 llvm: add asserts and behavior tests for #14063
Closes #14063
2022-12-27 00:12:56 -05:00
Jacob Young
46b49a0a76 llvm: cleanup code no longer needed with opaque pointers
When using llvm opaque pointers, typed pointers and pointer bitcasts are
no longer needed.  This also avoids needing packed struct layouts that
are nested inside pointers, letting us avoid computing struct layouts
in Sema that could cause unnecessary dependency loops.
2022-12-27 00:12:56 -05:00
Andrew Kelley
1b86a628ac
Merge pull request #14015 from Vexu/recursive-inline
Sema: add error for recursive inline call
2022-12-26 20:34:22 -05:00
Veikka Tuominen
81443fcde8 Sema: add error for recursive inline call
Closes #12973
2022-12-26 16:36:30 +02:00
Veikka Tuominen
3535c4b3b6 Sema: fix elem ptr type of vector in slice
Closes #14071
2022-12-26 15:26:27 +02:00
Jacob Young
64865679cf Sema: add missing resolveLazyValue cases
Closes #14032
2022-12-26 04:39:32 -05:00
Jacob Young
8dd844d96f Sema: fix typo 2022-12-26 04:18:08 -05:00
Matt Knight
cf822c6ddd
@export() with linksection option (#14035) 2022-12-25 20:19:50 -05:00
Jacob Young
f5b6019646 Sema: fix missing struct layout for llvm backend
Closes #14063
2022-12-25 20:18:15 -05:00
zooster
0c30e006c9 delete empty.zig
This is no longer used anywhere.
2022-12-24 23:17:27 -05:00
Jacob Young
bc913295b5 CBE: fix emitting a partially undefined string literal 2022-12-24 02:40:33 -05:00
Jacob Young
6cd8004213 Sema: relax undefined checks for concat
Closes #14037
2022-12-24 02:40:33 -05:00
Jacob Young
0559cdb554 Sema: support concat of tuple and array
Closes #14041
2022-12-24 02:40:33 -05:00
Jakub Konka
bb62d5105c
Merge pull request #14049 from ziglang/issue-14045
macho+zld: write code signature padding before committing load commands
2022-12-23 19:07:36 +01:00
Jakub Konka
22b39f034b macho+zld: properly deinit code signature object 2022-12-23 14:35:45 +01:00
Jakub Konka
550ebcce9a macho+zld: write code signature padding before commiting LCs
Otherwise, we were prematurely committing `__LINKEDIT` segment LC
with outdated size (i.e., without code signature being taken into account).
This would scaffold into strict validation failures by Apple tooling.
2022-12-23 12:50:03 +01:00
Luuk de Gram
0d66112643 wasm: refactor extended instructions
The extended instructions starting with opcode `0xFC` are refactored
to make the work the same as the SIMD instructions. This means a
`Mir` instruction no longer contains a field 'secondary'. Instead,
we use the `payload` field to store the index into the extra list
which contains the extended opcode value. In case of instructions
such as 'memory.fill' which also have an immediate value, such
values will also be stored in the extra list right after the
instruction itself. This makes each `Mir` instruction smaller.
2022-12-21 17:02:53 +01:00
Jacob Young
a52dcdd3c5 CBE: fix bitwise not
Closes #13911
2022-12-21 03:04:59 -05:00
Veikka Tuominen
e1345fd0a0
Merge pull request #14004 from Vexu/packed-struct-vector
llvm: handle vectors in packed structs
2022-12-20 23:13:36 +02:00
Jakub Konka
dc22c3b9a5
Merge pull request #14006 from Luukdegram/wasm-no-lld
wasm-linker: allow usage of the in-house WebAssembly linker
2022-12-20 18:42:14 +01:00
Veikka Tuominen
9f23702c21 llvm: fix C ABI for <=256 bit vectors
Closes #13918
2022-12-20 18:34:33 +02:00
Veikka Tuominen
6da070c5ac Sema: fix crash with generic function with generic function parameter
Closes #12810
2022-12-20 17:32:04 +02:00
Veikka Tuominen
6511afcfe0 Sema: fix coercion from [:0]T to [*c]T 2022-12-19 20:45:53 +02:00
Luuk de Gram
6f44e2d1d3
wasm-linker: consolidate writing to file
This merges the paths from flushModule and linkWithZld to a single
function that will write the entire WebAssembly module to the file.
This reduces the chance of mistakes as we do not have to duplicate
the logic. A similar action may be needed later for linkWithLLD.
2022-12-19 16:50:25 +01:00
Veikka Tuominen
0c1d8659c5 Sema: print notes and reference traces when using --debug-compile-errors 2022-12-19 17:01:44 +02:00
Veikka Tuominen
ee334aea80 value: remove indexVectorlike
Vectors can represented in all the same values as arrays
so this was never a valid shortcut.
2022-12-19 17:01:44 +02:00
Veikka Tuominen
22d46e1d77 value: use int tag type when querying for tag value
Closes #13757
2022-12-19 15:08:49 +02: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
Veikka Tuominen
2926d95e6a llvm: handle vectors in packed structs
Closes #13201
2022-12-19 12:19:52 +02:00