23355 Commits

Author SHA1 Message Date
Andrew Kelley
ef5afbfcf4 zig.h: f16 fix for compiler_rt
See #15092
2023-04-06 08:40:02 -07:00
Andrew Kelley
467a1498e4 CI: update x86_64-macos tarballs to llvm 16.0.1 2023-04-06 01:29:19 -07:00
Andrew Kelley
eb19f73af5 update zig1.wasm 2023-04-05 23:27:50 -07:00
Andrew Kelley
fc9ab4144c update libcxx to LLVM 16.0.1 2023-04-05 23:22:29 -07:00
Andrew Kelley
f289277599 Merge remote-tracking branch 'origin/master' into llvm16 2023-04-05 22:05:31 -07:00
Jacob Young
5870ffeb82 compiler_rt: change the abi of f16 on mac to depend on the other type 2023-04-05 22:05:10 -07:00
Jacob Young
243848167b compiler_rt: attempt to fix f16 abi on mac with llvm 16 2023-04-05 22:05:06 -07:00
jim price
3487514626 std.os: add mincore syscall
The mincore syscall is available on some UNIX like operating systems
and allows a user to determine if a page is resident in memory.
2023-04-06 00:57:23 -04:00
David CARLIER
3e467c778a std: add os_log/signpost api (sort of linux's perf event equivalent)
subset.
2023-04-06 07:31:06 +03:00
Nikita Ronja
d92b5fcfb0 Add NetBSD termios constants to std.c.netbsd 2023-04-06 03:46:44 +03:00
Veikka Tuominen
66520c8342 Sema: validate array element types
Fixes the compiler crash part of #15175
2023-04-05 14:45:56 +03:00
Veikka Tuominen
82a6acca93 Sema: implement inline switch capture at comptime
Closes #15157
2023-04-05 14:45:56 +03:00
David CARLIER
080136e4ad std: add madvise flags to freebsd 2023-04-05 13:54:01 +03:00
David CARLIER
f86f531e9c std: add a subset of the apple's QOS api 2023-04-05 09:01:35 +02:00
Jacob Young
ad5fb4879b std: fix memory bugs
This fixes logged errors during CI based on the new GPA checks.
2023-04-05 08:23:07 +02:00
Jakub Konka
a503724801 macho: reapply relocation dirtying logic from coff linker 2023-04-05 05:57:09 +02:00
Jakub Konka
f372995e1e macho: refactor adding GOT and stub entries
Don't special-case resolving of `dyld_stub_binder`.
2023-04-05 05:57:09 +02:00
Jakub Konka
5ea6e78943
Merge pull request #15162 from jacobly0/x86_64-start
x86_64: get enough things working to enable full `start.zig` logic
2023-04-05 03:02:42 +02:00
Jacob Young
83b7dbe52f cases: disable failing incremental tests
Enabling start.zig logic breaks incremental compilation
See #15174
2023-04-04 12:48:21 -04:00
Jakub Konka
3a8362e751 macho+zld: refactor how we resolve dyld_stub_binder symbol 2023-04-04 15:44:01 +02:00
Ganesan Rajagopal
49b56f88b9
GPA: Catch invalid frees
* GPA: Catch invalid frees

Fix #14791: Catch cases where an invalid slice is passed to free().
This was silently ignored before but now logs an error. This change
uses a AutoHashMap to keep track of the sizes which seems to be an
overkill but seems like the easiest way to catch these errors.

* GPA: Add wrong alignment checks to free/resize

Implement @Inkryption's suggestion to catch free/resize with the wrong
alignment. I also changed the naming to match large allocations.
2023-04-04 13:11:25 +03:00
David CARLIER
771d07268f std: freebsd MAP* constants update, MAP_ALIGNED_SUPER and the MAP_ALIGNED macro. 2023-04-04 12:57:16 +03:00
Jacob Young
c91929090d start: disable extra start logic on various x86_64 subtargets 2023-04-03 15:19:07 -04:00
Jacob Young
821eb595f4 x86_64: implement cmp_lt_errors_len 2023-04-03 15:19:07 -04:00
Jacob Young
9fd460821f elf: cleanup phdr tracking
Since one of the program header entries is now the program header table
itself, we can avoid tracking it explicitly and just track it as yet
another program segment.
2023-04-03 14:17:43 -04:00
Jakub Konka
c0e9b84997 elf: preallocate offsets for PT_PHDR and PT_LOAD (empty) segment
Otherwise, we will be using `undefined` as the offset to allocate
remaining phdrs and shdrs.
2023-04-03 18:30:55 +02:00
Jacob Young
5900dc0580 x86_64: fix typos 2023-04-03 18:02:55 +02:00
Jacob Young
562170681a link: cleanup lazy symbols
We now only update one lazy symbol in flushModule.
Updating the rest from updateDecl is TBD.
2023-04-03 18:02:53 +02:00
Jacob Young
f0d13489f8 Elf: add program headers for the program header table 2023-04-03 17:45:17 +02:00
Jacob Young
cd24ab7f6e x86_64: canonicalise loops 2023-04-03 17:45:16 +02:00
Jacob Young
fde1ec5d0e x86_64: remove returns from naked functions 2023-04-03 17:45:16 +02:00
Jacob Young
1980f5479b x86_64: implement store to immediate address 2023-04-03 17:45:16 +02:00
Jacob Young
272acb7ee5 x86_64: implement storing large immediates 2023-04-03 17:45:16 +02:00
Jacob Young
f5f0d95f0e x86_64: implement a more generic assembler for inline assembly 2023-04-03 17:45:16 +02:00
Jakub Konka
a329450aa4
Merge pull request #15160 from ziglang/link-cleanup
link: misc clean ups
2023-04-03 12:53:39 +02:00
Jakub Konka
72137824e5 macho: clean up code responsible for growing sections in file 2023-04-03 10:07:49 +02:00
Jakub Konka
ad8dfd3673 macho+coff: remove alignment from Atom as it is unused 2023-04-03 09:14:36 +02:00
Veikka Tuominen
a31450375e
Merge pull request #15134 from castholm/reverse-iterator
std.mem.reverseIterator: misc improvements
2023-04-02 18:06:55 +03:00
Jacob Young
f4b411314c Sema: defer stores to inferred allocs
This lets us generate the store with knowledge of the type to be stored.
Therefore, we can avoid generating garbage Air with stores through
pointers to comptime-only types which backends cannot lower.

Closes #13410
Closes #15122
2023-04-02 18:05:44 +03:00
Jakub Konka
878163e588
Merge pull request #15140 from jacobly0/x86_64
x86_64: implement more stuff
2023-04-02 14:34:12 +02:00
Jacob Young
f4359531b1 x86_64: implement shl with overflow 2023-04-02 06:11:12 -04:00
Jacob Young
0e289cc826 x86_64: implement large add/sub with overflow 2023-04-02 05:16:46 -04:00
Jacob Young
c713c86389 x86_64: implement wide multiply 2023-04-02 04:49:53 -04: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
ccefa9dbf5 x86_64: implement calling var args functions 2023-04-02 04:49:53 -04:00
Jacob Young
ac68d72d24 x86_64: implement aggregate init of a packed struct 2023-04-02 04:49:53 -04:00
Jakub Konka
43a6384e9c link-test: adjust test/link/bugs/macho/13056 to latest changes on macOS 13.3
Latest macOS 13.3 rolled out LLVM 15 and thus the way `nullptr_t` is
defined within the `libc++`:

157bbe6aea

This seems to require including `/usr/include` with `-isystem` directive
rather than `-I`. Otherwise we get clang miscompilation issues due to
missing `nullptr_t` declaration.
2023-04-02 10:18:43 +02:00
Jakub Konka
ab44b454d0
Merge pull request #15135 from ziglang/fix-15103
macho: handle cases where entrypoint is in an archive or dylib
2023-04-01 22:30:22 +02:00