Commit Graph

21180 Commits

Author SHA1 Message Date
Andrew Kelley
e18d310afd CI: build from old zig on x86_64-linux debug
This is to work around OOM on the CI server. Once #13560 is complete,
we can avoid having to replace the tarballs so often.
2022-11-22 00:56:44 -07:00
Andrew Kelley
7829c73ccf disable failing arm-linux non-llvm backend tests
See #13623
2022-11-21 22:56:05 -07:00
Andrew Kelley
0912f1d1f9 CI: fix wrong tarball name for aarch64-linux 2022-11-21 20:19:44 -07:00
Andrew Kelley
14d77108b8 CI: switch to GitHub Actions
This is a merge commit.
2022-11-21 20:17:14 -07:00
Andrew Kelley
e21b6a712d CI: switch to GitHub Actions 2022-11-21 20:16:08 -07:00
Andrew Kelley
f3d987dc87 CI: start moving tarball generation to github actions 2022-11-21 20:16:08 -07:00
Andrew Kelley
5ec9be0b03 CMake: choose native CPU instead of baseline by default 2022-11-21 20:16:08 -07:00
Andrew Kelley
69d1ea769b CI: test in the ci branch for now 2022-11-21 20:16:08 -07:00
Andrew Kelley
c822da7121 CI: aarch64-linux: support older cmake 2022-11-21 20:16:08 -07:00
Andrew Kelley
670b4c5c02
Merge pull request #13292 from mitchellh/valgrind-arm64
std: valgrind client request support for aarch64
2022-11-21 19:50:26 -05:00
Andrew Kelley
271cc52a16
Merge pull request #11828 from devins2518/arm-atomics
compiler_rt: aarch64 outline atomics
2022-11-21 19:17:50 -05:00
Andrew Kelley
545c3117ff rename lse_atomics.zig to aarch64_outline_atomics.zig 2022-11-21 17:17:02 -07:00
Andrew Kelley
58430ae6d1 outline atomics: ret instead of jump to ret
After this, the machine code generated by zig matches identically to
gcc's after the differences in loading the have_lse flag.
2022-11-21 17:17:02 -07:00
Andrew Kelley
95ee8ab77d simplify outline atomics
* Rely on libSystem when targeting macOS.
 * Make tools/gen_outline_atomics.zig more idiomatic.
 * Remove the CPU detection / auxval checking from compiler_rt. This
   functionality belongs in a different component. Zig's compiler_rt
   must not rely on constructors. Instead it will export a symbol for
   setting the value, and start code can detect and activate it.
 * Remove the separate logic for inline assembly when the target does or
   does not have lse support. `.inst` works in both cases.
2022-11-21 17:17:02 -07:00
Devin Singh
a8f2d00ec4 compiler_rt: add outlined lse atomics for aarch64 2022-11-21 17:17:02 -07:00
Veikka Tuominen
7c527c6dfe
Merge pull request #13585 from Vexu/stage2-fixes
Stage2 bug fixes
2022-11-21 13:48:23 +02:00
joachimschmidt557
89c374cd2d stage2 ARM: misc fixes
- remove redundant `new` from `binOpRegisterNew` name
- fix mul_with_overflow
2022-11-21 08:23:07 +01:00
Frank Denis
c45c6cd492 Add the POLYVAL universal hash function
POLYVAL is GHASH's little brother, required by the AES-GCM-SIV
construction. It's defined in RFC8452.

The irreducible polynomial is a mirror of GHASH's (which doesn't
change anything in our implementation that didn't reverse the raw
bits to start with).

But most importantly, POLYVAL encodes byte strings as little-endian
instead of big-endian, which makes it a little bit faster on the
vast majority of modern CPUs.

So, both share the same code, just with comptime magic to use the
correct endianness and only double the key for GHASH.
2022-11-20 18:13:19 -05:00
David Gonzalez Martin
79bba5a9e6 uefi: Delete unneeded alignment and use default 4K
Closes #7484. Right now for UEFI targets an alignment
of 32 is being used for no reason other than support
a rare bytecode. As this is far from the standard case,
removing this alignment and using the default one,
as most toolchains do, should be the desired behavior.
2022-11-20 18:11:43 -05:00
Andrew Kelley
8c7712d8fa fix CPU model detection for neoverse_n1 on aarch64-linux
see #10086
2022-11-20 15:34:39 -07:00
Veikka Tuominen
bbcd959c2b cli: warn about using --debug-compile-errors on a release build 2022-11-20 20:25:12 +02:00
Veikka Tuominen
d968d9d103 llvm: add attributes to the arguments of function pointer calls
Closes #13605
2022-11-20 20:25:12 +02:00
Veikka Tuominen
9e276d32f3 Sema: fix memory management of missing field error
Closes #13590
2022-11-20 20:25:12 +02:00
Veikka Tuominen
9e7293619f llvm: aarch64 C ABI: pass byref params as mutable pointers
Closes  #13597
2022-11-20 20:25:12 +02:00
Veikka Tuominen
08a00f0d1c llvm: use alignment of ABI return type when it differs from raw return type
This would previously cause miscompilations when the ABI type had
bigger alignment than the raw type.
2022-11-20 20:25:12 +02:00
Veikka Tuominen
835a1f7f0c Sema: fix missing error on mismatched array init count
Closes #13582
2022-11-20 20:25:12 +02:00
Veikka Tuominen
034507ef7c Module: fix compile error for non-comptime-known global initializer 2022-11-20 20:25:12 +02:00
Veikka Tuominen
98b3734b67 Sema: prioritize Value.variable over OPV when resolving const value
Closes #12275
2022-11-20 20:25:12 +02:00
Veikka Tuominen
9877a7d36c print_air: print ty_pl type 2022-11-20 20:25:11 +02:00
Veikka Tuominen
bc76873827 Sema: fix type check in zirIntToPtr
Simple fix: don't assume a ptr type before it has been checked.

Closes #13567
2022-11-20 20:25:11 +02:00
Veikka Tuominen
7b131a7cd4 Module: fix fieldSrcLoc for generated types 2022-11-20 20:25:11 +02:00
Veikka Tuominen
510b891d27 Sema: handle opt_payload in beginComptimePtrLoad 2022-11-20 20:25:11 +02:00
Veikka Tuominen
0616d2966a Sema: allow coercing typed undefined to int
Closes #13556
2022-11-20 20:25:11 +02:00
Veikka Tuominen
e5a3eb9777 Type: make hasRuntimeBitsAdvanced take AbiAlignmentAdvancedStrat
I wasn't able to create a reduced test case for this but the reasoning
can be seen in `abiAlignmentAdvancedUnion` where if `strat` was lazy
`hasRuntimeBitsAdvanced` would be given `null` instead of `sema`
which would cause eager evaluation when it is not valid or desired.
2022-11-20 20:25:11 +02:00
Veikka Tuominen
44f8714dfb translate-c: cast unsuffixed floats to f64 2022-11-20 16:10:54 +02:00
Guillaume Wenzek
476b946802
compute LLVMTypes in ParamTypeIterator (#13592)
follow up on #13376 - fixes a bug in the x86_64 C ABI. 

Co-authored-by: Veikka Tuominen <git@vexu.eu>
2022-11-20 01:14:02 -08:00
Andrew Kelley
78389af552 LLVM: add valgrind integration for x86 and aarch64
This also modifies the inline assembly to be more optimizable - instead of
doing explicit movs, we instead communicate to LLVM which registers we
would like to, somehow, have the correct values. This is how the x86_64
code already worked and thus allows the code to be unified across the
two architectures.

As a bonus, I threw in x86 support.
2022-11-19 19:32:45 -07:00
Mitchell Hashimoto
95e135a8cb std: valgrind client request support for aarch64 2022-11-19 18:54:31 -07:00
Ali Chraghi
fca776f8f5 os: windows: fix unhandled error 2022-11-19 22:48:32 +02:00
Jimmi Holst Christensen
adc3fafbc0 c backend: Output string literals for array init of bytes 2022-11-19 11:59:33 -05:00
Casey Banner
f746e11879
linker: fail the compilation if there were linker errors
There was no check for linker errors after flushing,
which meant that if the link failed the build would
continue and try to copy the non-existant exe, and
also write the manifest as if it had succeeded.

Also adds parsing of lld output, which is surfaced at the
end of the compilation with the other errors instead
of via stderr
2022-11-19 15:57:08 +02:00
Andrew Kelley
0697883d01 extract C backend behavior tests with vectors
No functional change. Separates various float operations behavior tests
from the ones that test vectors.
2022-11-19 01:29:51 -05:00
kkHAIKE
ea590ece4b
Sema: optimize compare comptime float with int 2022-11-18 22:06:49 +02:00
Stevie Hryciw
04f3067a79 run zig fmt on everything checked by CI 2022-11-18 19:22:42 +00:00
Stevie Hryciw
e999f9f472 std: replace parseAppend with parseWrite in std.zig.string_literal 2022-11-18 19:22:42 +00:00
Stevie Hryciw
ca9e1760e8 fmt: canonicalize identifiers 2022-11-18 19:22:42 +00:00
Stevie Hryciw
d6d4f2481d translate-c: use .identifier tokens in .identifier AST nodes 2022-11-18 19:22:42 +00:00
Stevie Hryciw
be737bb5cc stage1: delete keywords
Backports 05cf449 to the C++ implementation.
2022-11-18 19:22:42 +00:00
remeh
e7424d5d2a std.array_list: add a comment on every methods invalidating pointers.
While it is already mentioned on the `items` attributes of the structs, it is
interesting to comment in every method potentially invalidating pointers to items
that they may do so.
2022-11-18 14:49:31 +02:00
Veikka Tuominen
3c0c0f899b
Merge pull request #13417 from InKryption/rand-deterministic-indexing
std.Random: add functions with explicit index type
2022-11-18 14:48:51 +02:00