Jacob Young
0543def52f
llvm: fix crashes when loading a struct field
...
The result of buildStructGEP is not always a GEP (sorry), so we can't
use getGEPResultElementType on it.
Closes #14641
2023-03-30 11:54:24 +03:00
dweiller
ff97bd21c3
tests: enable test_runner_module_imports standalone test
2023-03-30 11:53:07 +03:00
Jakub Konka
46b2f1f705
Merge pull request #15105 from ziglang/hcs-win-poc
...
coff: improve handling of relocs and general linker fixes
2023-03-29 09:21:52 +02:00
Jacob Young
dd66e0addb
Sema: fix empty slice pointer value
...
We just checked that inst_child_ty was effectively a zero-bit type, so
it is certainly not the non-zero alignment we are looking for.
Closes #15085
2023-03-28 23:12:19 +03:00
Jakub Konka
17ec2cea64
macho: remove error_union return from resolveRelocations()
2023-03-28 21:52:44 +02:00
Jakub Konka
cde722a711
coff: put section growing in helper; only mark section if actually resolved
2023-03-28 21:42:55 +02:00
Jakub Konka
2b80552603
Merge pull request #14771 from kcbanner/coff_dynamicbase
...
Allow dynamicbase to be disabled by CompileStep
2023-03-28 20:18:25 +02:00
Jakub Konka
25f3175217
coff: use ArrayHashMap if we are iterating over keys
2023-03-28 19:27:05 +02:00
Jakub Konka
004f32e79d
coff: resolve relocs on bytes buffer directly
2023-03-28 18:59:44 +02:00
Jakub Konka
43487eb3ef
Merge pull request #15102 from ziglang/fix-15075
...
coff: handle multiple DLLs
2023-03-28 18:28:48 +02:00
Jakub Konka
1c5f255789
tests: enable multi-threaded x86_64-windows tests with self-hosted
2023-03-28 15:49:26 +02:00
Jakub Konka
70838d34aa
coff: assert the imports table is not dirty
2023-03-28 14:17:12 +02:00
Jakub Konka
db877df8eb
coff: move import table definition into a separate ImportTable.zig module
2023-03-28 14:13:39 +02:00
Tw
5d63d1115f
bpf: add missing *const for helper functions
...
Signed-off-by: Tw <tw19881113@gmail.com>
2023-03-28 14:30:12 +03:00
Jakub Konka
fb3345e346
coff: do not use atoms for synthetic import address table
...
Instead, introduce a custom ImportTable structure which will
act as a thunk in the MachO linker, and we will use that to
calculate the address of a pointer on-the-fly.
Additionally, fix logic in writeImportTables to allow for multiple
DLLs.
2023-03-28 13:28:48 +02:00
Jakub Konka
2a5c4ea8f0
coff: repurpose value field of import Symbol for lib_name offset
2023-03-28 12:28:49 +02:00
Jakub Konka
0dc210f950
link: pass expected lib name as hint in getGlobalSymbol()
2023-03-28 12:28:48 +02:00
Jakub Konka
d2040b2763
coff: grow .idata if required
2023-03-28 12:28:48 +02:00
Jakub Konka
28d6dd75ac
Merge pull request #15087 from jacobly0/x86-debug-mir
...
x86_64: misc fixes
2023-03-27 16:20:27 +02:00
Jacob Young
fd13e44e0c
x86_64: cleanup debug mir dumping
2023-03-27 05:58:00 -04:00
Jacob Young
802c2e4fae
x86_64: fix popcnt and disable regressed test
2023-03-27 05:58:00 -04:00
Jacob Young
6c54428415
x86_64: implement trunc with large source
2023-03-27 05:58:00 -04:00
Jacob Young
587eacefec
x86_64: fix 64-bit multiply by 32-bit immediate
2023-03-27 05:58:00 -04:00
Jacob Young
65838fcabe
x86_64: implement some binary ops for large values
2023-03-27 05:58:00 -04:00
Jacob Young
3a516433b0
x86_64: add live codegen debug
2023-03-27 05:58:00 -04:00
Jacob Young
abb37a7cb8
x86_64: factor out lowering from emitting
2023-03-27 05:58:00 -04:00
Jacob Young
0e5e001278
std.MultiArrayList: add set and get to Slice
2023-03-27 05:58:00 -04:00
Jacob Young
86625c5a75
x86_64: enable mem dst bin ops, and fix uncovered bugs
2023-03-27 04:31:39 -04:00
David CARLIER
1de64dba23
std: add the VM_MAKE_TAG macro for darwin.
2023-03-26 23:56:27 +02:00
kcbanner
43ff6c14f9
main: recognize --dynamicbase
2023-03-26 13:10:36 -04:00
Jakub Konka
32591c1d99
Merge pull request #15076 from jacobly0/x86_64-backend
...
x86_64: implement things
2023-03-26 17:31:42 +02:00
Veikka Tuominen
4a5628e730
Module: fix lazy srcloc resolution for new for loop syntax
...
Closes #15081
2023-03-26 15:14:03 +03:00
Jakub Konka
3a7fe0d010
Merge pull request #15077 from ziglang/update-macos-headers
...
libc: update macos headers
2023-03-26 08:41:38 +02:00
Jacob Young
65f77878b4
std: remove temporary workarounds for stage2_x86_64
...
These seem to work great now.
2023-03-25 21:32:55 -04:00
Jacob Young
14c0b8c548
x86_64: remove unused Mir encodings
...
This also restores the size of Mir.Inst and simplifies logic in general.
2023-03-25 21:26:18 -04:00
Jakub Konka
59a67e9a43
libc: update macOS libSystem stubs
2023-03-25 21:38:35 +01:00
kcbanner
4569a28ea3
build: fixes from review
2023-03-25 16:33:25 -04:00
Jakub Konka
1b97881e38
libc: update macOS libc headers
2023-03-25 21:27:47 +01:00
kcbanner
c79073c176
compilation: fixup linker_dynamicbase default in InitOptions
2023-03-25 16:26:48 -04:00
kcbanner
113f80bcf7
coff: change dynamicbase to default to true (to match lld), change it to pass the negation to lld, and add --no-dynamicbase
...
build: expose linker_dynamicbase on CompileStep and map it to emit --no-dynamicbase
2023-03-25 16:26:48 -04:00
Jacob Young
a80be15cd4
behavior: disable multi threaded for the stage2_x86_64 windows target
...
See #15075 for more details.
2023-03-25 16:23:55 -04:00
Jacob Young
d29c674d0d
x86_64: implement teb inline assembly for windows
2023-03-25 16:23:55 -04:00
Jacob Young
1e080e5056
x86_64: implement atomic loops
2023-03-25 16:23:55 -04:00
Jacob Young
6d9bdc8733
x86_64: fix cmpxchg
2023-03-25 16:23:55 -04:00
Jacob Young
a2f6e068b0
x86_64: implement 128-bit intcast
2023-03-25 16:23:55 -04:00
Jacob Young
d064cf639f
x86_64: implement 128-bit shifts
2023-03-25 16:23:55 -04:00
Jacob Young
77300c02d6
x86_64: implement large ptr_elem_val
2023-03-25 16:23:55 -04:00
Jacob Young
8f385e77ca
x86_64: implement struct_field_val for packed containers
2023-03-25 16:23:55 -04:00
Jacob Young
0cfc0d0d13
x86_64: implement struct_field_ptr for packed containers
2023-03-25 16:23:55 -04:00
Jacob Young
d9ce69dc39
codegen: fix ptr-like optional constants
2023-03-25 16:23:55 -04:00