Commit Graph

30299 Commits

Author SHA1 Message Date
Alex Rønne Petersen
76ebae2ee0 ci: Add stage3/4 diff to aarch64-linux-release script. 2024-08-02 09:56:54 +02:00
Alex Rønne Petersen
6def9cee00 ci: Add stage3/4 diff to (aarch64,x86_64)-windows-release scripts. 2024-08-02 09:56:37 +02:00
Alex Rønne Petersen
624fa8523a std.os.linux: Unbreak the build
Happened because I wrote #20869 before #20870.
2024-08-01 13:05:26 +02:00
Andrew Kelley
7a0da805a8 Merge pull request #20797 from alexrp/start-more-arches
`start`: Add POSIX arc, csky, and hexagon support
2024-08-01 01:34:33 -07:00
Andrew Kelley
8f7cbaa4c0 Merge pull request #20870 from alexrp/target-cleanup-3
`std.Target`: Remove more dead OS/architecture tags
2024-08-01 01:32:32 -07:00
Andrew Kelley
f17f73b4fa Merge pull request #20869 from alexrp/linux-syscalls
`std.os.linux`: Add syscall enums for all remaining architectures
2024-08-01 01:21:10 -07:00
Andrew Kelley
91163b44dd Merge pull request #20857 from alexrp/tls-porting
`std.os.linux.tls`: Refactor, improve documentation, fix a bug, and port to more architectures
2024-08-01 01:15:17 -07:00
Andrew Kelley
16dde6d260 Merge pull request #20772 from alexrp/linux-audit
`std.os.linux.AUDIT`: Rewrite ARCH in terms of std.elf.EM.
2024-08-01 01:09:22 -07:00
Alex Rønne Petersen
8d5eaadb05 std.Target: Handle loongarch in Os.Tag.archName(). 2024-08-01 01:08:20 -07:00
Alex Rønne Petersen
f03d54f069 std.atomic: Don't lie to the compiler about memory clobbers in spinLoopHint(). 2024-08-01 01:07:56 -07:00
Alex Rønne Petersen
604e87a958 std.Target: Use hexagonv60 as the baseline CPU model for hexagon. 2024-08-01 01:01:24 -07:00
Andrew Kelley
9c22a6b3ad Merge pull request #20823 from alexrp/start-pie-mips-ppc
`std.os.linux.start_pie`: Add mips and powerpc support
2024-08-01 00:57:10 -07:00
Andrew Kelley
63aa85e7af Merge pull request #20872 from alexrp/riscv-gp
start: Initialize `gp` to `__global_pointer$` on riscv.
2024-08-01 00:47:05 -07:00
Jakub Konka
8ea323822b Merge pull request #20884 from Rexicon226/riscv 2024-08-01 07:17:40 +02:00
Andrew Kelley
eb1a199dff Merge pull request #20885 from ziglang/simplify-tokenizer
std.zig.tokenizer: simplification and spec conformance
2024-07-31 19:52:34 -07:00
Andrew Kelley
059856acfc Merge pull request #20878 from tiehuis/std-math-complex-fixes
std.math.complex fixes
2024-07-31 19:19:27 -07:00
Andrew Kelley
7c5ee3efde Merge pull request #20883 from ehaas/aro-translate-c-no-panic
aro-translate-c improvements
2024-07-31 18:53:05 -07:00
Andrew Kelley
c2b8afcac9 tokenizer: tabs and carriage returns spec conformance 2024-07-31 16:57:42 -07:00
Andrew Kelley
a7029496d1 remove hard tabs from source code
these are illegal according to the spec
2024-07-31 16:57:42 -07:00
Andrew Kelley
377e8579f9 std.zig.tokenizer: simplify
I pointed a fuzzer at the tokenizer and it crashed immediately. Upon
inspection, I was dissatisfied with the implementation. This commit
removes several mechanisms:
* Removes the "invalid byte" compile error note.
* Dramatically simplifies tokenizer recovery by making recovery always
  occur at newlines, and never otherwise.
* Removes UTF-8 validation.
* Moves some character validation logic to `std.zig.parseCharLiteral`.

Removing UTF-8 validation is a regression of #663, however, the existing
implementation was already buggy. When adding this functionality back,
it must be fuzz-tested while checking the property that it matches an
independent Unicode validation implementation on the same file. While
we're at it, fuzzing should check the other properties of that proposal,
such as no ASCII control characters existing inside the source code.

Other changes included in this commit:

* Deprecate `std.unicode.utf8Decode` and its WTF-8 counterpart. This
  function has an awkward API that is too easy to misuse.
* Make `utf8Decode2` and friends use arrays as parameters, eliminating a
  runtime assertion in favor of using the type system.

After this commit, the crash found by fuzzing, which was
"\x07\xd5\x80\xc3=o\xda|a\xfc{\x9a\xec\x91\xdf\x0f\\\x1a^\xbe;\x8c\xbf\xee\xea"
no longer causes a crash. However, I did not feel the need to add this
test case because the simplified logic eradicates most crashes of this
nature.
2024-07-31 16:57:42 -07:00
David Rubin
c08effc20a riscv: implement non-pow2 indirect loads 2024-07-31 16:57:30 -07:00
David Rubin
2b8a71489a start: remove riscv condition 2024-07-31 13:40:00 -07:00
David Rubin
9c7aade488 riscv: fix .got symbol loading 2024-07-31 13:39:57 -07:00
David Rubin
0008934745 riscv: implement @divExact 2024-07-31 11:44:16 -07:00
Evan Haas
1cc74f3cae aro_translate_c: fix formatting 2024-07-31 10:33:44 -07:00
Evan Haas
aa5a1105e8 aro_translate_c: do not translate atomic types 2024-07-31 10:04:21 -07:00
Evan Haas
6c632d52f9 aro_translate_c: move noreturn test to manifest 2024-07-31 09:35:07 -07:00
Evan Haas
b3f5769930 aro_translate_c: handle opaque struct defs in prototypes 2024-07-31 09:35:07 -07:00
Evan Haas
93a502cb2f aro_translate_c: move simple function prototype test to manifest 2024-07-31 09:35:07 -07:00
Evan Haas
6a103d87f6 aro_translate_c: basic typedef support 2024-07-31 09:35:07 -07:00
Evan Haas
055077f9dd aro_translate_c: improve record translation
Move field record decl translation into `transType` instead of `transDecl`
2024-07-31 09:35:07 -07:00
Evan Haas
c57fcd1db5 aro_translate_c: demote functions with bodies to extern
Translating statements is currently not supported; demoting to extern is
better than crashing.
2024-07-31 09:35:07 -07:00
Evan Haas
6997f82e02 translate_c: move empty declaration test to test manifest 2024-07-31 09:35:07 -07:00
Evan Haas
4300a9c417 aro_translate_c: Make function decls public 2024-07-31 09:35:07 -07:00
Evan Haas
5cc9e18277 aro_translate_c: Translate enum types 2024-07-31 09:35:07 -07:00
Evan Haas
2f2f35105e aro_translate_c: translate pointer types 2024-07-31 09:35:07 -07:00
Evan Haas
e32cde2568 aro_translate_c: translate incomplete arrays 2024-07-31 09:35:07 -07:00
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