Veikka Tuominen
799a558e39
Sema: implement peer type resolution of function pointers and function bodies
...
Closes #13438
2022-11-04 23:13:49 +02:00
Veikka Tuominen
e6b3cb5043
Sema: detect division overflow
...
Closes #13434
2022-11-04 23:13:29 +02: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
Veikka Tuominen
577daab08c
CI: windows: update tarball
2022-11-03 22:11:25 +02:00
Yujiri
b19161ba9c
Add docstrings to some functions in std.meta
2022-11-03 17:37:38 +02:00
Veikka Tuominen
678f3f6e65
Merge pull request #13276 from r00ster91/stem
...
std.fs.path: add stem()
2022-11-03 16:45:37 +02:00
Jakub Konka
3465203824
libc: add support for arm64 msvc installation
2022-11-03 15:07:31 +01:00
Jakub Konka
480c3c4d0a
compiler_rt: fix duplicate symbol error when linking libc on arm64 Windows
2022-11-03 14:41:28 +01:00
Frank Denis
96793530cd
std.crypto.pwhash.bcrypt: inline the Feistel network function ( #13416 )
...
std/crypto/benchmark.zig results:
* Intel i5
before: 3.144 s/ops
after: 1.922 s/ops
* Apple M1
before: 2.067 s/ops
after: 1.373 s/ops
2022-11-03 13:10:08 +01:00
Nathan Bourgeois
e64eef366c
Translate-C Remainder Macro Fix
2022-11-03 14:07:00 +02:00
Veikka Tuominen
b2f8c1f2ef
Merge pull request #13420 from jacobly0/c-backend
...
cbe: enough fixes to bootstrap a compiler with a working c backend
2022-11-03 13:43:10 +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
Eric Milliken
b40fc70188
std.time: add microTimestamp() ( #13327 )
2022-11-02 23:20:19 +01: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
771dadc5e0
x86: cleanup inline asm
...
Multiple outputs work now, so use that instead of deleting clobbers.
2022-11-01 20:39:06 -04:00
Jacob Young
9b2db56d0f
x86: remove inline asm clobbers that conflict with inputs or outputs
2022-11-01 20:39:06 -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
Jacob Young
757db665a7
build: remove ofmt from LibExeObjStep which is redundant with target.ofmt
2022-11-01 20:38:37 -04:00
Jacob Young
93d60d0de7
std: avoid vector usage with the C backend
...
Vectors are not yet implemented in the C backend, so no reason to
prevent code using the standard library from compiling in the meantime.
2022-11-01 20:38:37 -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
Frank Denis
0d192ee9ef
std.crypto.onetimeauth.Ghash: make GHASH 2 - 2.5x faster ( #13374 )
...
Rewrite GHASH to use 128-bit multiplication over non-reversed
integers, and up to 8 blocks aggregated reduction.
lib/std/crypto/benchmark.zig results:
Xeon E5:
Before: 1604 MiB/s
After: 4005 MiB/s
Apple M1:
Before: 2769 MiB/s
After: 6014 MiB/s
This also makes AES-GCM faster by the way.
2022-11-01 13:49:13 -04:00
Andrew Kelley
1780d7a348
Merge pull request #13368 from jacobly0/fix-aarch64-c
2022-11-01 13:28:40 -04:00
Luuk de Gram
ef0df24626
test/link: add linker test to verify mangling
...
This adds a simple linker test to ensure the built library contains
an import entry for each extern function call that was mangled.
2022-11-01 15:43:34 +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
mnordine
2943df016e
Fix variable name in documentation sample ( #13391 )
2022-11-01 12:49:13 +01:00
Frank Denis
ddb9eac05c
ed25519: recommend using the seed to recover a key pair
2022-11-01 07:26:32 +01:00
Frank Denis
9e44710fc4
Ed25519.KeyPair.fromSecretKey() didn't compile after the API changes ( #13386 )
...
Fixes #13378
2022-11-01 07:10:40 +01:00