Commit Graph
34717 Commits
Author SHA1 Message Date
Evan Haas da3822f4c2 aro_translate_c: Translate array types 2024-07-31 09:35:07 -07:00
Evan Haas 236567de8d aro_translate_c: Emit compile errors instead of panicking for var decls 2024-07-31 09:35:07 -07:00
Alex Rønne Petersen 653eb75355 start: Disable the gp initialization code for the self-hosted riscv64 backend. 2024-07-31 02:06:57 +02:00
Alex Rønne Petersen 982510f8d5 start: Initialize gp to __global_pointer$ on riscv. 2024-07-31 02:05:17 +02:00
YANG Xudong a69d403cb2 std: fix long double size for loongarch. 2024-07-30 15:21:14 -07:00
YANG Xudong 2fb813c61f std: set standard dynamic linker path for loongarch64 on linux. (#20726) 2024-07-30 15:20:56 -07:00
Jakub Konka 30b4a87db7 Merge pull request #20873 from ziglang/elf-ownership
elf: clean up resource ownership in the linker
2024-07-30 18:49:39 +02:00
Alex Rønne Petersen 2e719f3239 std.os.linux.start_pie: Use a 64-bit displacement for s390x.
Not likely to be necessary ever, but might as well be 100% correct.
2024-07-30 18:02:40 +02:00
Alex Rønne Petersen 52519f79e0 std.os.linux.start_pie: Apply MIPS local GOT relocations. 2024-07-30 18:02:36 +02:00
Alex Rønne Petersen 78e581b86f start: Copy the mips64 comment about gp to the mips32 code.
Also, don't incorrectly claim that it's only needed for dynamic linking/PIC.
2024-07-30 17:58:22 +02:00
Alex Rønne Petersen 108c682df0 start: Add POSIX csky support. 2024-07-30 17:47:46 +02:00
Jakub Konka 3f10217a47 elf: fix a typo in setting atom name before it's been allocated 2024-07-30 12:54:30 +02:00
Marc Tiehuis 843885512d std.math.complex: fix cosh/tanh 2024-07-30 20:31:22 +12:00
Jakub Konka e0c475b6b7 elf: remove now unused globalByName 2024-07-30 10:03:13 +02:00
Jakub Konka a76ad907d0 elf: include LinkerDefined in symbol resolution 2024-07-30 10:03:13 +02:00
Jakub Konka 3618824ea3 elf: move entry tracking into LinkerDefined 2024-07-30 10:03:13 +02:00
Jakub Konka 5ceac8ebba elf: move initializing and allocating linker-defined symbols into LinkerDefined 2024-07-30 10:03:11 +02:00
Jakub Konka ef7bbcd80f elf: do not store merge section output section name in strings buffer 2024-07-30 10:00:50 +02:00
Jakub Konka 801c372098 elf: init output merge sections in a separate step 2024-07-30 10:00:50 +02:00
Jakub Konka 0701646beb elf: move merge subsections ownership into merge sections 2024-07-30 10:00:50 +02:00
Jakub Konka 24126f5382 elf: simplify output section tracking for symbols 2024-07-30 10:00:50 +02:00
Jakub Konka e8d008a8a8 elf: atom is always assigned output section index 2024-07-30 10:00:50 +02:00
Jakub Konka 96c20adeee elf: remove obsolete flags from atom 2024-07-30 10:00:50 +02:00
Jakub Konka c575e3daa4 elf: resolve COMDATs in more parallel-friendly way 2024-07-30 10:00:50 +02:00
Jakub Konka fa09276510 test/link/elf: test COMDAT elimination 2024-07-30 10:00:50 +02:00
Jakub Konka 494ae149e0 elf: skip storing comdat group signature globally 2024-07-30 10:00:50 +02:00
Jakub Konka 669f285943 elf: move ownership of atoms into objects 2024-07-30 10:00:50 +02:00
Jakub Konka f1fedb3a51 elf: move ownership of comdat groups to Object 2024-07-30 10:00:50 +02:00
Jakub Konka 733d25000b elf: move ownership of input merge sections to Object 2024-07-30 10:00:50 +02:00
Alex Rønne Petersen 62a01851d9 glibc: Add a temporary hack in abilists loading due to sparcel removal.
Revert this commit on the next glibc abilists update.
2024-07-30 06:30:26 +02:00
Alex Rønne Petersen c377316420 std.Target: Add tce/tcele to the comment listing omitted architectures. 2024-07-30 06:30:26 +02:00
Alex Rønne Petersen b49b7501cf std.Target: Remove cloudabi OS tag.
It's discontinued in favor of WASI.

https://github.com/NuxiNL/cloudlibc
2024-07-30 06:30:26 +02:00
Alex Rønne Petersen ef06e4b6e4 std.Target: Remove ananas OS tag.
This is a fairly small hobby OS that has not seen development in 2 years. Our
current policy is that hobby OSs should use the `other` tag.

https://github.com/zhmu/ananas
2024-07-30 06:30:25 +02:00
Alex Rønne Petersen c8ca05e93a std.Target: Remove sparcel architecture tag.
What is `sparcel`, you might ask? Good question!

If you take a peek in the SPARC v8 manual, §2.2, it is quite explicit that SPARC
v8 is a big-endian architecture. No little-endian or mixed-endian support to be
found here.

On the other hand, the SPARC v9 manual, in §3.2.1.2, states that it has support
for mixed-endian operation, with big-endian mode being the default.

Ok, so `sparcel` must just be referring to SPARC v9 running in little-endian
mode, surely?

Nope:

* https://github.com/llvm/llvm-project/blob/40b4fd7a3e81d32b29364a1b15337bcf817659c0/llvm/lib/Target/Sparc/SparcTargetMachine.cpp#L226
* https://github.com/llvm/llvm-project/blob/40b4fd7a3e81d32b29364a1b15337bcf817659c0/llvm/lib/Target/Sparc/SparcTargetMachine.cpp#L104

So, `sparcel` in LLVM is referring to some sort of fantastical little-endian
SPARC v8 architecture. I've scoured the internet and I can find absolutely no
evidence that such a thing exists or has ever existed. In fact, I can find no
evidence that a little-endian implementation of SPARC v9 ever existed, either.
Or any SPARC version, actually!

The support was added here: https://reviews.llvm.org/D8741

Notably, there is no mention whatsoever of what CPU this might be referring to,
and no justification given for the "but some are little" comment added in the
patch.

My best guess is that this might have been some private exercise in creating a
little-endian version of SPARC that never saw the light of day. Given that SPARC
v8 explicitly doesn't support little-endian operation (let alone little-endian
instruction encoding!), and no CPU is known to be implemented as such, I think
it's very reasonable for us to just remove this support.
2024-07-30 06:30:25 +02:00
Alex Rønne Petersen 1e9278d718 std.Target: Remove spir/spir64 architecture tags.
These were for very old OpenCL have been long abandoned in favor of SPIR-V.

* https://github.com/KhronosGroup/SPIR
* https://github.com/KhronosGroup/SPIR-Tools
2024-07-30 06:30:25 +02:00
Marc Tiehuis 0fda2f31aa std.math.complex: tighten existing test bounds 2024-07-30 16:30:20 +12:00
Marc Tiehuis 2bd7af63d7 std.math.complex: fix acosh/atan/cosh/sqrt
Some of these are upstream changes since the original port, others are
translation errors.
2024-07-30 15:38:00 +12:00
Andrew Kelley f219286573 Merge pull request #20852 from ziglang/init-array-start-code
start code: implement __init_array_start, __init_array_end
2024-07-29 18:40:27 -07:00
Alex Rønne Petersen 36332a4fdc std.os.linux.tls: Add csky support. 2024-07-30 02:33:16 +02:00
Alex Rønne Petersen 9abe3aeeea std.os.linux.tls: Add arc support. 2024-07-30 02:33:16 +02:00
Alex Rønne Petersen e6fe7a329a std.os.linux.tls: Add hexagon support. 2024-07-30 02:33:16 +02:00
Alex Rønne Petersen d2b21d5823 std.os.linux.tls: Add s390x support. 2024-07-30 02:33:16 +02:00
Alex Rønne Petersen 9db992bd9b std.os.linux.tls: Add loongarch support. 2024-07-30 02:33:15 +02:00
Alex Rønne Petersen 44d4656dfc std.os.linux.tls: Add m68k support. 2024-07-30 02:32:55 +02:00
Alex Rønne Petersen 37275c0f69 std.os.linux.tls: Fix layout computation for the modified Variant I. 2024-07-30 02:32:32 +02:00
Alex Rønne Petersen b52e054261 std.os.linux.tls: Refactor and improve documentation.
* Elaborate on the sub-variants of Variant I.
* Clarify the use of the TCB term.
* Rename a bunch of stuff to be more accurate/descriptive.
* Follow Zig's style around namespacing more.
* Use a structure for the ABI TCB.

No functional change intended.
2024-07-30 02:32:32 +02:00
Alex Rønne Petersen 876383cb2a std.os.linux: Hook up newly added syscall enums. 2024-07-30 01:32:48 +02:00
Alex Rønne Petersen 7e0f9c45f2 std.os.linux: Adjust for rename of mips syscall enums. 2024-07-30 01:32:48 +02:00
Alex Rønne Petersen e77b3ff74f std.os.linux.syscalls: Regenerate based on Linux v6.7. 2024-07-30 01:32:48 +02:00
Alex Rønne Petersen f29967f46c generate_linux_syscalls: Skip some reserved syscalls on mips and xtensa. 2024-07-30 01:32:48 +02:00