Commit graph

21093 commits

Author SHA1 Message Date
Andrew Kelley
8bbb4a2f81 disable failing arm-linux non-llvm backend tests
See #13623
2023-01-09 14:37:30 -07:00
Andrew Kelley
8f2bb38a09 CI: fix wrong tarball name for aarch64-linux 2023-01-09 14:37:26 -07:00
Andrew Kelley
d27007cd7e CI: switch to GitHub Actions
This is a merge commit.
2023-01-09 14:37:20 -07:00
Andrew Kelley
2bbaf95ebe Merge pull request #11828 from devins2518/arm-atomics
compiler_rt: aarch64 outline atomics
2023-01-09 14:36:40 -07:00
Veikka Tuominen
a3232c6764 Merge pull request #13585 from Vexu/stage2-fixes
Stage2 bug fixes
2023-01-09 14:35:42 -07:00
joachimschmidt557
10a660ebea stage2 ARM: misc fixes
- remove redundant `new` from `binOpRegisterNew` name
- fix mul_with_overflow
2023-01-09 14:35:32 -07:00
David Gonzalez Martin
9498c95faf 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.
2023-01-09 14:35:21 -07:00
Andrew Kelley
06dfa88d3f fix CPU model detection for neoverse_n1 on aarch64-linux
see #10086
2023-01-09 14:34:40 -07:00
Veikka Tuominen
da418ee0af translate-c: cast unsuffixed floats to f64 2023-01-09 14:34:05 -07:00
Guillaume Wenzek
58ac0082d2 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>
2023-01-09 14:33:43 -07:00
Guillaume Wenzek
4428e3837c add C ABI tests with double
const DC = extern struct { v1: f64, v2: u8 };
const CFF = extern struct { v1: u8, v2: f32, v3: f32 };
const PD = extern struct { v1: ?*anyopaque, v2: f64 };

Signed-off-by: Guillaume Wenzek <gwenzek@users.noreply.github.com>
2023-01-09 14:33:27 -07:00
Ali Chraghi
1702404adf os: windows: fix unhandled error 2023-01-09 14:29:59 -07:00
Jimmi Holst Christensen
dd175e2928 c backend: Output string literals for array init of bytes 2023-01-09 14:29:59 -07:00
Casey Banner
90fedf24fc 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
2023-01-09 14:29:59 -07:00
remeh
a5bcdfd27e 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.
2023-01-09 14:18:45 -07:00
kcbanner
c5900224fd windows: fix _tls_index not being defined if libc wasn't linked, and fix x86 name mangling 2023-01-09 14:18:09 -07:00
Jonathan Marler
9f215318b8 packed struct fix example and clarify least to most significant ordering
The packed struct example was mistakenly applying endianness where it
shouldn't have been.  This wasn't being caught because we don't currently
test the examples on Big-endian systems.

I updated the test to remove the endianness where it didn't apply, and
added a new part of the test to demonstrate when it would apply.
2023-01-09 14:18:01 -07:00
Guillaume Wenzek
91b8d9e370 fix Nvptx backend outputing files at the top level of zig-cache 2023-01-09 14:17:29 -07:00
Andrew Kelley
6064477928 Merge pull request #13561 from jacobly0/gcc-warnings 2023-01-09 14:17:06 -07:00
Veikka Tuominen
4ed0cd51c0 Merge pull request #13558 from Vexu/stage2-fixes
Stage2 bug fixes to get third party projects building
2023-01-09 14:06:50 -07:00
mike
9e50cb294b zig-cache: support windows drive + fwd-slash paths
closes #13539
2023-01-09 14:06:29 -07:00
GethDW
6494cec59c std.build: fix typo
This would only fail to compile when building *on* WASI.
2023-01-09 14:06:13 -07:00
mparadinha
35c13c262c Fix error reporting the wrong line for struct field inits (#13502)
* point to init part of field delc when that's where the error occurs

* update test to reflect fixed error message

* only lookup source location in case of error
2023-01-09 14:05:29 -07:00
Hayden Pope
2d623d7774 std.os.linux: Add setitimer and getitimer syscalls 2023-01-09 14:05:18 -07:00
Andrew Kelley
d6ee8cb063 CI: disable github workflows until it is working in the ci branch 2023-01-09 14:05:07 -07:00
Andrew Kelley
b10386bcf0 disable failing test on aarch64-macos 2023-01-09 14:05:04 -07:00
Andrew Kelley
3591c51fbe CI: aarch64-linux: init 2023-01-09 14:04:56 -07:00
Andrew Kelley
2623b5cf3a macos: x86_64: fix wrong path to cmake 2023-01-09 14:04:53 -07:00
Andrew Kelley
390fb9a3ca CI: aarch64-macos: set PATH env var for cmake 2023-01-09 14:04:49 -07:00
Andrew Kelley
db58a45ab6 CI: separate aarch64 and x86_64 macos scripts 2023-01-09 14:04:45 -07:00
Loris Cro
dc96e47eb3 ci: init github actions support 2023-01-09 14:04:40 -07:00
Frank Denis
b239a178c5 crypto.bcrypt: fix massive speed regression when using stage2 (#13518)
state: State -> state: *const State
Suggested by @nektro

Fixes #13510
2023-01-09 14:03:11 -07:00
Motiejus Jakštys
50fb7a4144 musl.zig: remove unused enum (#13545) 2023-01-09 14:03:04 -07:00
Andrew Kelley
013d615077 Merge pull request #13536 from ziglang/cbe-zig-h
C backend: improve ergonomics of zig.h a little bit
2023-01-09 14:02:44 -07:00
Veikka Tuominen
33fe7f2881 Sema: remove block and src parameters from getBuiltin
These parameters are only ever needed when `std.builtin` is out of sync
with the compiler in which case panicking is the only valid operation
anyways. Removing them causes a domino effect of functions no longer
needing a `src` and/or a `block` parameter resulting in handling
compilation errors where they are actually meaningful becoming simpler.
2023-01-09 14:02:34 -07:00
Jonathan
568a619251 pthread_sigmask 2023-01-09 14:01:57 -07:00
Veikka Tuominen
b494f6a9dc Merge pull request #13497 from Vexu/stage2-fixes
Stage2 bug fixes
2023-01-09 14:01:01 -07:00
Stevie Hryciw
7748d2bb44 langref: add appendix and explain 'container' terminology 2023-01-09 14:00:35 -07:00
Jakub Konka
56195aa73c pdb: make SuperBlock def public 2023-01-09 14:00:21 -07:00
Cody Tapscott
bc33243650 stage2: Support modifiers in inline asm
These are supported using %[ident:mod] syntax. This allows requesting,
e.g., the "w" (32-bit) vs. "x" (64-bit) views of AArch64 registers.

See https://llvm.org/docs/LangRef.html#asm-template-argument-modifiers
2023-01-09 14:00:11 -07:00
Andrew Kelley
48798da29b Merge pull request #13074 from topolarity/stage2-opt
stage2: Miscellaneous fixes to vector arithmetic and copy elision
2023-01-09 13:59:04 -07:00
Jacob Young
b931889c65 Sema: avoid breaking hash contract when instantiating generic functions
* Add tagName to Value which behaves like @tagName.
 * Add hashUncoerced to Value as an alternative to hash when we want to
   produce the same hash for value that can coerce to each other.
 * Hash owner_decl instead of module_fn in Sema.instantiateGenericCall
   since Module.Decl.Index is not affected by ASLR like *Module.Fn was,
   and also because GenericCallAdapter.eql was already doing this.
 * Use Value.hashUncoerced in Sema.instantiateGenericCall because
   GenericCallAdapter.eql uses Value.eqlAdvanced to compare args, which
   ignores coersions.
 * Add revealed missing cases to Value.eqlAdvanced.

Without these changes, we were breaking the hash contract for
monomorphed_funcs, and were generating different hashes for values that
compared equal.  This resulted in a 0.2% chance when compiling
self-hosted of producing a different output, which depended on
fingerprint collisions of hashes that were affected by ASLR.  Normally,
the different hashes would have resulted in equal checks being skipped,
but in the case of a fingerprint collision, the truth would be revealed
and the compiler's behavior would diverge.
2023-01-09 13:58:52 -07:00
Jakub Konka
52f8de0194 Merge branch 'jcmoyer-lld-explicit-pdb' 2023-01-09 13:58:02 -07:00
Jakub Konka
84f5843178 Merge pull request #13495 from ziglang/macho-dsym
stage2: misc DWARF debug info fixes and additions for x86_64 and aarch64
2023-01-09 13:57:34 -07:00
Veikka Tuominen
95ecd521b8 Merge pull request #13418 from ryanschneider/signal-alignment-13216
std.os: fix alignment of Sigaction.handler_fn
2023-01-09 13:56:41 -07:00
IntegratedQuantum
11c1ddfc97 Handle sentinel slices in std.mem.zeroes
Fixes #13256
2023-01-09 13:56:20 -07:00
Veikka Tuominen
c1fc15f913 llvm: implement packed unions
Closes #13340
2023-01-09 13:56:14 -07:00
bfredl
a0dd11c479 Fixes to linux/bpf/btf.zig
- the meaning of packed structs changed in zig 0.10. adjust accordingly.
  Use "extern struct" for the cases that directly map to C structs.

- Add new type info kinds, like enum64 and DeclTag

- change the Type enum to use the canonical names from libbpf.
  This is more predictable when comparing with external BPF
  documentation (than invented synonyms that need to be guessed)
2023-01-09 13:55:53 -07:00
Jakub Konka
eb21b20949 Merge pull request #13487 from ziglang/zld-dwarf-string
macho: misc DWARF parser fixes
2023-01-09 13:55:25 -07:00
Andrew Kelley
4efb197f90 CI: stop using cloud.drone.io
This service stopped working two days ago for unknown reasons. Until it
is determined how to get it working again, or we switch to a different
CI provider for aarch64, this CI test coverage is disabled so that
we can continue to use the CI for other targets.
2023-01-09 13:55:16 -07:00