Jakub Konka
351031b6c7
macho: parse weak symbols in tbds
...
However, we will treat them as standard imports rather than refs
to weak imports until I investigate more how it actually works
underneath.
2022-11-06 15:19:17 +01:00
Jakub Konka
1aeef29733
coff: move relocation in its own module
2022-11-06 08:41:43 +01:00
Jakub Konka
5ef33e7c7e
Merge pull request #13459 from ziglang/issue-13457
...
macho: do not zero-out file if there are no nonzerofill sects
2022-11-06 08:39:13 +01:00
Jakub Konka
76fb3e0621
macho: do not zero-out file if there are no nonzerofill sects
...
If the `__DATA` segment comprises of only zerofill sections, do not
accidentally zero out all of file.
2022-11-06 00:36:27 +01:00
Ali Chraghi
aea617c60b
std.os: take advantage of the freebsd's copy_file_range
2022-11-05 15:43:39 -04:00
Jakub Konka
165ae04a03
coff: use .x86 instead of .i386
2022-11-05 10:35:04 +01:00
Jakub Konka
59fa0499c9
coff: tentatively handle Obj in getImageBase() func
2022-11-05 10:15:01 +01:00
Jakub Konka
9618fdc8a2
coff: circumvent stage1 inference problems
2022-11-05 10:15:01 +01:00
Jakub Konka
83d89a05b7
coff: compile and link simple exit program on arm64
...
* make image base target dependent
* fix relocs to imports
2022-11-05 10:15:01 +01:00
Jakub Konka
205421c311
coff: implement handling of arm64-specific relocs
2022-11-05 10:15:00 +01:00
Jakub Konka
d80203b55d
coff: clean up relocation handling between x86 and arm64
2022-11-05 10:15:00 +01:00
Jakub Konka
53a9661c1a
coff: generate relocations for branch, GOT, direct refs
2022-11-05 10:15:00 +01:00
Jakub Konka
62ae365308
aarch64: implement airCall for COFF
2022-11-05 10:15:00 +01:00
Jakub Konka
1fe0b58942
aarch64: extract atom index for both COFF and MachO
2022-11-05 10:14:59 +01:00
Jakub Konka
df0212bf47
aarch64: handle register downgrading in truncRegister
2022-11-05 10:14:59 +01:00
Andrew Kelley
1d68045919
Merge pull request #13101 from alichraghi/o4
2022-11-05 02:34:24 -04:00
Veikka Tuominen
8c4faa5f3f
Merge pull request #13338 from Vexu/stage2-compile-errors
...
Improve some error messages
2022-11-04 16:04:31 +02:00
Micah Switzer
ea54c9a375
Sema: resolve lazy align in zirReify for union fields
...
Closes #13435
2022-11-04 15:48:08 +02:00
Jacob Young
cbed6bb085
Sema: make InferredErrorSet deterministic
...
Empirically, this `AutoHashMapUnmanaged` -> `AutoArrayHashMapUnmanaged`
change fixes all non-determinism in `ReleaseFast` build artifacts.
Closes #12183
2022-11-04 00:00:10 -04:00
Andrew Kelley
42755a1944
Merge pull request #13430 from ziglang/stack-probe-msvc
...
Miscellaneous arm64 windows fixes
2022-11-03 19:49:10 -04:00
Ali Chraghi
f5f1f8c666
all: rename i386 to x86
2022-11-04 00:09:27 +03:30
Jakub Konka
3465203824
libc: add support for arm64 msvc installation
2022-11-03 15:07:31 +01:00
Nathan Bourgeois
e64eef366c
Translate-C Remainder Macro Fix
2022-11-03 14:07:00 +02:00
Jacob Young
f02b8a9cca
cbe: fix padding bits after a bitcast
2022-11-02 23:00:10 -04:00
Jacob Young
085f6fd8f7
cbe: use wrapping for left shifts
2022-11-02 23:00:10 -04:00
Jacob Young
4537c1b8b6
cbe: fix crash rendering union with zero-bit tag
2022-11-02 21:42:40 -04:00
Jacob Young
fa46f9a3d7
cbe: fix extern
2022-11-02 21:42:40 -04:00
Cody Tapscott
98b60992b3
stage2: Ensure f128 alignment matches c_longdouble alignment
...
On platforms where c_longdouble is 128-bits, interop with C code
is simplified by making f128 match the alignment of c_longdouble.
I intended to make this change as part of #13257 , but I missed this
part.
2022-11-02 16:58:56 -04:00
Andrew Kelley
e50789f1cb
Merge pull request #13389 from jacobly0/fix-only-c
...
cbe: enough fixes for `-Donly-c` to be able to produce an executable
2022-11-02 15:53:59 -04:00
Andrew Kelley
57dbeb90af
Merge pull request #13396 from Luukdegram/fix-12880
...
llvm: mangle extern function names for Wasm target
2022-11-02 14:10:07 -04:00
Jacob Young
37c104ade0
cbe: ignore comptime fields when generating tuple typedefs
...
This vastly reduces the amount of deduplication state we need to deal with.
2022-11-02 10:21:05 -04:00
Jacob Young
5f31070b8b
cbe: hack around invalid Air
...
Can be changed to `!inst_ty.hisRuntimeBitsIgnoreComptime()` when the
"result location with inferred type ends up being pointer to comptime_int"
test stops producing Air containing a `bitcast(*comptime_int, ...)`.
See #13410
2022-11-02 10:20:31 -04:00
Cody Tapscott
c22f17e15f
stage2 llvm: Respect alignment for .union_init
...
Resolves #13232 .
2022-11-02 12:45:06 +02:00
Joachim Schmidt
81c27677d4
Merge pull request #13404 from joachimschmidt557/stage2-aarch64
...
stage2 aarch64: enable printing test results in the test runner
2022-11-02 09:59:15 +01:00
Jacob Young
d8635af1dc
cbe: correctly implement volatile memset
2022-11-01 20:43:54 -04:00
Jacob Young
4d594090b1
cbe: incorrectly implement volatile memset
...
This will have to be replaced with manual volatile stores.
2022-11-01 20:39:06 -04:00
Jacob Young
09763435a8
cbe: support arrays in more places
2022-11-01 20:39:06 -04:00
Jacob Young
071404ff65
cbe: fix optional access
2022-11-01 20:39:05 -04:00
Jacob Young
8e52be1602
cbe: avoid emitting code for zero-bit field access
2022-11-01 20:38:52 -04:00
Jacob Young
fb8c08d4ac
cbe: disambiguate struct typedefs with decl index
2022-11-01 20:38:52 -04:00
Jacob Young
91fe0b80a2
cbe: fix threadlocal
2022-11-01 20:38:51 -04:00
Jakub Konka
ebf9ffd342
cli: set sysroot when --sysroot option was passed
...
Fixes regression introduced in 0b47e69b7c
2022-11-01 23:11:29 +01:00
joachimschmidt557
3051fab97c
stage2 AArch64: misc fixes, enable printing in test runner
...
- Fixed missing airRetPtr implementation
- Fixed wrong pop_regs order
- Fixed wrong source and destination register in store
2022-11-01 20:44:18 +01:00
joachimschmidt557
4e0779813b
stage2 AArch64: add inline memset
2022-11-01 20:43:27 +01:00
joachimschmidt557
8a022d9c92
stage2 AArch64: implement wrap_errunion_{err,payload}
2022-11-01 20:43:27 +01:00
joachimschmidt557
3ecec50f0c
stage2 AArch64: implement basic switch statements
2022-11-01 20:43:27 +01:00
joachimschmidt557
d2a5a36cab
stage2 AArch64: implement min/max
2022-11-01 20:43:27 +01:00
Luuk de Gram
66bcc55e01
llvm: mangle extern Wasm functions
...
When Wasm extern functions contain the same name, but have a
different module name such as `extern "a"` vs `extern "b"` LLVM will
currently resolve the two functions to the same symbol. By mangling
the name of the symbol, we ensure the functions are resolved
seperately. We mangle the name by applying <name>|<module> where
module is also known as the library name.
2022-11-01 15:05:09 +01:00
Jacob Young
ff83296256
cbe: fix gcc warnings
2022-10-31 21:01:47 -04:00
Jacob Young
b945d3eb90
cbe: improve support for non-native float types
...
* Fix _start on aarch64.
* Add fallbacks when a float type is unsupported.
Fixes #13357
2022-10-31 20:18:15 -04:00