Andrew Kelley
179a6e61e8
Merge pull request #20708 from alexrp/target-cleanup-2
...
`std.Target`: Remove more dead architecture tags.
2024-07-21 19:24:04 -07:00
Bogdan Romanyuk
42d9017feb
Sema: fix OOB access in coerceTupleToStruct ( #19620 )
...
Co-authored-by: Veikka Tuominen <git@vexu.eu >
2024-07-21 23:56:04 +00:00
Alex Rønne Petersen
be9841335e
std.Target.Os: Rename lv2 to ps3.
...
It is very non-obvious that this is what lv2 refers to, and we already use ps4
and ps5 to refer to the later models, so let's just be consistent.
2024-07-21 22:38:30 +02:00
Alex Rønne Petersen
db8bc4770c
std.Target: Remove the tce/tcele arch tags.
...
There is no obvious reason why this would be relevant for Zig to target. I
rather question the value of LLVM even having target triple code for this, too.
See: https://blog.llvm.org/2010/06/tce-project-co-design-of-application.html
See: https://github.com/cpc/llvmtce
2024-07-21 22:38:30 +02:00
Alex Rønne Petersen
21cc5a2044
std.Target: Remove the shave arch tag.
...
This was added as an architecture to LLVM's target triple parser and the Clang
driver in 2015. No backend ever materialized as far as I can see (same for GCC).
In 2016, other code referring to it started using "Myriad" instead. Ultimately,
all code related to it that isn't in the target triple parser was removed. It
seems to be a real product, just... literally no one seems to know anything
about the ISA. I figure after almost a decade with no public ISA documentation
to speak of, and no LLVM backend to reference, it's probably safe to assume that
we're not going to learn much about this ISA, making it useless for Zig.
See: 1b5767f72b
See: 84a7564b28
See: 8cfe9d8f2a
2024-07-21 22:38:30 +02:00
Alex Rønne Petersen
f1e0c35db4
std.Target: Remove hsail/hsail64 arch tags.
...
This seems to just be dead.
See: https://github.com/search?q=repo%3Allvm%2Fllvm-project%20hsail&type=code
See: https://github.com/HSAFoundation/HSAIL-Tools/commits/master
2024-07-21 22:38:30 +02:00
Alex Rønne Petersen
67a052df81
std.Target: Remove amdil/amdil64 arch tags.
...
This is really obscure and no one is 100% sure what it is. It seems to be old
and unused. My suspicion is that it's just an old term for "AMDGPU" before it
was upstreamed to LLVM.
See: https://github.com/search?q=repo%3Allvm%2Fllvm-project+amdil&type=code
2024-07-21 22:38:30 +02:00
Alex Rønne Petersen
c825b567b2
std.Target: Remove the r600 arch tag.
...
These are quite old GPUs, and it is unlikely that Zig will ever be able to
target them.
See: https://en.wikipedia.org/wiki/Radeon_HD_2000_series
2024-07-21 22:38:30 +02:00
Alex Rønne Petersen
9848623e62
std.Target: Remove the renderscript32/renderscript64 arch tags.
...
It's dead: https://developer.android.com/guide/topics/renderscript/migrate
2024-07-21 22:38:30 +02:00
Andrew Kelley
f303c3943f
Revert "Merge pull request #20380 from tau-dev/master"
...
This reverts commit 397be0c9cc , reversing
changes made to 18d412ab2f .
Caused test failures in master branch.
2024-07-21 02:44:58 -07:00
David Rubin
7591df5172
ip: use getExternFunc in getCoerced
...
`ip.get` specifically doesn't allow `extern_func` keys to access it.
2024-07-21 01:00:49 -07:00
cheme
01dc0d5a72
Riscv32e align stack to 4 bytes ( #20673 )
2024-07-21 00:28:22 -07:00
Andrew Kelley
397be0c9cc
Merge pull request #20380 from tau-dev/master
...
llvm: Nest debug info correctly
2024-07-21 00:19:52 -07:00
WillLillis
18d412ab2f
fix: remove misleading error note for failed array coercions
2024-07-21 00:10:36 -07:00
Will Lillis
9b292c0949
fix: Add error notes for method calls on double pointers ( #20686 )
2024-07-21 00:03:23 -07:00
Andrew Kelley
93c546c8c9
Merge pull request #20692 from pavelverigo/stage2-wasm-overflow-ops
...
stage2-wasm: overflow ops improvement
2024-07-20 23:57:14 -07:00
Andrew Kelley
ff02bf403b
Merge pull request #20402 from alexrp/target-cleanup
...
std.Target: Remove some obsolete/dead specifiers.
2024-07-20 13:55:37 -07:00
Robin Voetter
6d7bbab740
Merge pull request #20696 from sobolevn/typos-fix
...
Fix typos in code comments in `src/`
2024-07-20 22:28:42 +02:00
Andrew Kelley
b5f3d12164
Merge pull request #20688 from ziglang/incr-test
...
introduce a new tool for testing incremental compilation
2024-07-20 13:04:49 -07:00
sobolevn
4c71d3f29e
Fix typos in code comments in src/
2024-07-20 20:23:18 +03:00
Jacob Young
5424239154
dev: add missing x86_64 backend checks
2024-07-20 07:43:53 -04:00
Jacob Young
2e65244cae
dev: fix llvm backend checks
2024-07-20 07:43:40 -04:00
Pavel Verigo
f5dd6fb71a
stage2-wasm: @mulWithOverflow fixes + 128 bit signed
2024-07-20 13:21:46 +02:00
Andrew Kelley
eb4028bf30
add std.fmt.hex
...
converts an unsigned integer into an array
2024-07-20 01:06:29 -07:00
Jacob Young
4f742c4cfc
dev: introduce dev environments that enable compiler feature sets
2024-07-19 22:35:33 -07:00
Alex Rønne Petersen
5e82e90dbf
std.Target: Remove coreclr ABI specifier.
...
This was added to LLVM in 2015 for the LLILC project, which was discontinued in
~2018, and subsequently archived in 2022.
933b58d00f
2024-07-20 05:08:16 +02:00
Alex Rønne Petersen
af8205e25e
std.Target: Remove nacl OS specifier and le32/le64 arch specifiers.
...
Native Client is dead.
https://developer.chrome.com/docs/native-client
2024-07-20 05:08:16 +02:00
Alex Rønne Petersen
5a2f6acb44
std.Target: Remove kfreebsd OS specifier.
...
kFreeBSD is dead.
https://lists.debian.org/debian-devel/2023/07/msg00176.html
2024-07-20 05:08:14 +02:00
Alex Rønne Petersen
9939b116bf
std.Target: Remove the gnuf64 ABI specifier.
...
This was used for LoongArch64, where:
* `gnuf64` -> `ilp32d` / `lp64d` (full hard float)
* `gnuf32` -> `ilp32f` / `lp64f` (hard float for `f32` only)
* `gnusf` -> `ilp32` / `lp64` (soft float)
But Loongson eventually settled on just `gnu` for the first case since that's
what most people will actually be targeting outside embedded scenarios. The
`gnuf32` and `gnusf` specifiers remain in use.
2024-07-20 04:56:56 +02:00
Tau
94cf4d2d81
llvm: add pass-by-reference info to debug types
...
Without this data, debugger expressions try to pass structs by-value,
which mostly just crashes.
Also: mark enums as enum classes to prevent the enumerators from
shadowing other identifiers.
2024-07-19 17:51:38 +02:00
Tau
177b3359a1
llvm: Do not generate static member definitions
...
They were not helping LLDB and actively throwing off GDB.
Also: clean up some llvm.Builder and llvm.ir definitions that are no
longer necessary.
2024-07-19 17:51:38 +02:00
Tau
52e4cdb45e
Try linking static members' definitions to their declarations.
...
This does not help anything though: gdb would follow the
DW_AT_specification link only in the opposite direction, which LLVM
cannot emit.
2024-07-19 17:51:38 +02:00
Tau
3bfa63aa61
ModuleDebugInfo: Discard C++ namespaces appearing in PDBs
2024-07-19 17:51:38 +02:00
Tau
9c2d597e69
llvm: Fix debug gen for 0-bit types
...
Add a regression test for that, since these weirdly never occur in any
of the other tests on x86-64-linux.
2024-07-19 17:51:38 +02:00
Tau
b4eb812305
Don't attach a top-level function to its file, but to the file's struct
2024-07-19 17:51:38 +02:00
Tau
359bbdd574
llvm: encode variables as DW_TAG_imported_declaration
...
Now we get working global variable lookup in GDB! LLDB still re-mangles,
and it looks like we can't do much about that for now.
Also: translate non-owning type declarations into typedefs.
2024-07-19 17:51:37 +02:00
Tau
876258abe4
llvm: set precise scopes on namespace types and variables
...
This will allow accessing non-local declarations from debuggers, which,
AFAICT, was impossible before.
Getting scopes right already works for type declarations and functions,
but will need some fiddling for variables:
For those, I tried imitating what Clang does for static member
variables, but LLDB tries to re-mangle those and then fails at lookup,
while GDB outright crashes. Hopefully I can find some other dwarven
incantation to do the right thing.
2024-07-19 17:46:34 +02:00
Andrew Kelley
8c4a2dc1df
move non-libc stuff out of std.c
2024-07-19 00:30:32 -07:00
mlugg
f5a941b3d6
Sema: return module-relative path for @src()
...
This is one possible approach to fixing an issue with reproducible
builds where the compiler's cwd changes the paths returned by `@src()`.
2024-07-18 18:45:07 +01:00
Pavel Verigo
56d535dd24
stage2-wasm: improve @shlWithOverflow for <= 128 bits
...
Additionally fixed a bug for shr on signed big ints
2024-07-18 18:01:06 +02:00
Pavel Verigo
dc3176d628
stage2-wasm: enhance add/subWithOverflow
...
Added behavior tests to verify implementation
2024-07-18 17:54:44 +02:00
Pavel Verigo
d1bd9518f9
stage2-wasm: fix big int comparison
...
Unexpected to be found only now
2024-07-18 17:18:17 +02:00
Jakub Konka
3bdbf81a3f
macho: fix emitting data-in-code entries
2024-07-18 09:13:09 +02:00
Jakub Konka
34f34dbe32
macho: reinstate duplicate definition checking
2024-07-18 09:13:09 +02:00
Jakub Konka
b339a30680
macho: fix off-by-one when populating strtab
2024-07-18 09:13:09 +02:00
Jakub Konka
e9328e7da8
macho: fix 32bit compilation issues
2024-07-18 09:13:09 +02:00
Jakub Konka
3338813077
macho: use isec for working out getAtomData in ZigObject
2024-07-18 09:13:09 +02:00
Jakub Konka
a9e3088d9c
macho: extract testing logic for TLS into a helper
2024-07-18 09:13:08 +02:00
Jakub Konka
103c16c879
macho: clean up atom+symbol creation logic in ZigObject
2024-07-18 09:13:08 +02:00
Jakub Konka
e117e05768
macho: ensure we always name decls like LLVM to avoid confusion
2024-07-18 09:13:08 +02:00