Alex Rønne Petersen
b24fc35eeb
std.Target: Don't match big endian architectures in Arch.toCoffMachine().
...
All of these were mapping to types that are little endian. In fact, I can find
no evidence that either Windows or UEFI have ever been used on big endian
systems.
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
8516a6ab57
std.Target: Clean up Arch.toCoffMachine().
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
490b328127
std.Target: Fix Arch.toElfMachine() for mips.
...
EM_MIPS_RS3_LE is obsolete; all mips targets just use EM_MIPS.
Also, fun fact: EM_MIPS_RS3_LE is actually big endian!
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
6c27cab5b3
std.Target: Fix Arch.toElfMachine() for arc.
...
The arc tag means ARCv2.
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
9246c88031
std.Target: Clean up Arch.toElfMachine().
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
1e67221f07
std.Target: Change requiresLibC() to return true for aix.
...
AIX does not have a stable syscall interface; libc is required.
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
fc93ab7182
std.Target: Fix isGnuLibC() to handle hurd too.
2024-08-15 10:55:45 +02:00
Alex Rønne Petersen
0def4e0db0
std.Target: Make some functions handle driverkit alongside other Apple OSs.
...
Reference for versions: https://developer.apple.com/support/xcode
2024-08-15 10:55:45 +02:00
Jacob Young
5d080e25d5
start: fix passing comptime-only value to inline asm
...
Also fix fmt directive typo.
2024-08-15 04:42:04 -04:00
clickingbuttons
da8fbcc2a9
std.mem.writeVarPackedInt: handle write_size == 0 ( #19745 )
...
Also move example comments into tests.
2024-08-15 06:03:29 +00:00
reokodoku
20f4be4cf9
std.os.linux: add mseal syscall
2024-08-14 22:48:13 -07:00
Jarrod Meyer
9be10ea964
Watch.zig: fixes for windows implementation
...
Using --watch I noticed a couple of issues with my initial attempt. 1) The index I used as 'completion key' was not stable over time, when directories are being added/removed the key no longer corresponds with the intended dir. 2) There exists a race condition in which we receive a completion notification for a directory that was removed. My solution is to generate a key value and associate it with each Directory.
2024-08-14 13:21:01 -07:00
Andrew Kelley
78fb9c0a17
Merge pull request #21031 from linusg/std-target-naming
...
std.Target: Function naming cleanup
2024-08-14 10:36:24 -07:00
T
eb7f318ea8
langref: clarify functionality of the round builtin ( #19503 )
...
A test has also been added to demonstrate the expected behavior.
* std.math: update round doc comment to match the builtin
2024-08-14 10:29:45 -07:00
Andrew Kelley
b7a1ef3e19
Merge pull request #21075 from ziglang/fuzz
...
fix several debug info bugs
2024-08-14 04:55:32 -07:00
Alex Rønne Petersen
b470d2a7de
std.debug: Support sparc32 in StackIterator.init().
2024-08-13 23:54:20 -07:00
Alex Rønne Petersen
dc77d1b66d
std.Thread: Merge riscv32/riscv64 assembly in freeAndExit().
2024-08-13 23:53:57 -07:00
Andrew Kelley
72768bddcd
std.Build.Fuzz.WebServer: sort pcs before source location lookup
...
Unfortunately, the PCs do not get sorted during linking.
2024-08-13 19:30:22 -07:00
Andrew Kelley
a726e09389
std.debug.Coverage.resolveAddressesDwarf: assert sorted
2024-08-13 19:29:55 -07:00
Andrew Kelley
022bca9b06
std.debug.Dwarf: better source location information
...
Two fixes here:
Sort by addresses after generating the line table. Debug information in
the wild is not sorted and the rest of the implementation requires this
data to be sorted.
Handle DW.LNE.end_sequence correctly. When I originally wrote this code,
I misunderstood what this opcode was supposed to do. Now I understand
that it marks the *end* of an address range, meaning the current address
does *not* map to the current line information.
This fixes source location information for a big chunk of ReleaseSafe
code.
2024-08-13 18:04:23 -07:00
Andrew Kelley
a9e7fb0e01
avoid a branch in resolveAddressesDwarf
2024-08-13 15:02:53 -07:00
Andrew Kelley
b5398180d6
std.debug.Coverage.resolveAddressesDwarf: fix broken logic
...
The implementation assumed that compilation units did not overlap, which
is not the case. The new implementation uses .debug_ranges to iterate
over the requested PCs.
This partially resolves #20990 . The dump-cov tool is fixed but the same
fix needs to be applied to `std.Build.Fuzz.WebServer` (sorting the PC
list before passing it to be resolved by debug info).
I am observing LLVM emit multiple 8-bit counters for the same PC
addresses when enabling `-fsanitize-coverage=inline-8bit-counters`. This
seems like a bug in LLVM. I can't fathom why that would be desireable.
2024-08-13 15:02:53 -07:00
YANG Xudong
76f062690c
add getcontext
2024-08-13 10:11:17 -07:00
Alex Rønne Petersen
e725d1e226
std.Thread: Fix freeAndExit() syscall numbers for mips64.
...
These just seem to have been copy/pasted from mips32.
2024-08-13 00:56:35 -07:00
Alex Rønne Petersen
d0ae803a77
std.Thread: Fix freeAndExit() assembly for powerpc.
...
Wrong source/destination register order.
2024-08-13 00:56:14 -07:00
Alex Rønne Petersen
b00f586c3d
std.os.linux: Add clone() implementation for mips64. (#21038 )
...
Only for n64; no handling for n32 yet.
Also remove pointless comment about o32 in mips64 code.
2024-08-12 16:09:52 -07:00
Alex Rønne Petersen
d6f9972594
all: Handle spirv in addition to spirv(32,64) where applicable.
...
Some of this is arbitrary since spirv (as opposed to spirv32/spirv64) refers to
the version with logical memory layout, i.e. no 'real' pointers. This change at
least matches what clang does.
2024-08-12 16:08:28 -07:00
Alex Rønne Petersen
6d23850108
std.Thread: Explain apparently pointless mips instruction in freeAndExit().
...
https://git.musl-libc.org/cgit/musl/commit/?id=ce3688eca920aa77549323f84e21f33522397115
2024-08-12 16:07:46 -07:00
Andrew Kelley
f988cea825
Merge pull request #21019 from alexrp/target-os-cleanup
...
`std.Target`: Remove `minix` and `liteos`, rename `glsl450` to `opengl`, and some minor housekeeping
2024-08-12 16:06:57 -07:00
Alex Rønne Petersen
f7fb261efd
std.os.linux.tls: Support sparc32.
2024-08-12 14:22:24 -07:00
Linus Groh
9ef16b36ce
std.os.linux: Fix definition of tc_lflag_t on MIPS
...
Regressed in #21000 .
2024-08-12 00:46:28 -07:00
Alex Rønne Petersen
7a41e2f40b
std.zig.target: Add missing thumbeb triples.
2024-08-12 00:44:56 -07:00
Alex Rønne Petersen
8af4d65108
std.Target: Remove liteos OS tag.
...
It has not seen development in 4 years.
https://github.com/LiteOS/LiteOS/commits/master
2024-08-12 08:59:49 +02:00
Alex Rønne Petersen
e211dce6fc
std.Target: Remove minix OS tag.
...
It has not seen development in 6 years. RIP.
* https://github.com/Stichting-MINIX-Research-Foundation/minix/commits/master
* https://groups.google.com/g/minix3/c/nUG1NwxXXkg
2024-08-12 08:59:49 +02:00
Alex Rønne Petersen
4d4a023042
std.Target: Remove no longer relevant TODO about SPIR-V ABIs.
2024-08-12 08:59:49 +02:00
Alex Rønne Petersen
eb4539a27d
std.Target: Rename glsl450 Arch tag to opengl.
...
Versions can simply use the normal version range mechanism, or alternatively an
Abi tag if that makes more sense. For now, we only care about 4.5 anyway.
2024-08-12 08:59:47 +02:00
Alex Rønne Petersen
15a3ee1979
std.Target: Remove supportsNewStackCall().
...
This is literally just isWasm() and has no uses in the repository.
2024-08-12 08:57:10 +02:00
Alex Rønne Petersen
0bb9db3998
std.Target: Add comments explaining the baseline CPUs for hexagon/s390x.
2024-08-12 08:57:10 +02:00
Alex Rønne Petersen
7f7008b5b2
std.Target: Sort Os tags in a hopefully more sensible way.
2024-08-12 08:57:10 +02:00
Alex Rønne Petersen
60bf1a6543
std.Target: Sort Arch tags in a hopefully more sensible way.
2024-08-12 08:57:10 +02:00
Alex Rønne Petersen
25096ed893
std.Target: Some corrections and additions to stackAlignment().
...
Sourced from LLVM and GCC backends and ABI documents.
2024-08-11 20:28:29 -07:00
Alex Rønne Petersen
8161e61548
std.os.linux.start_pie: Add support for the new RELR relocation format.
2024-08-11 20:27:09 -07:00
Andrew Kelley
61dac74128
Merge pull request #20985 from alexrp/gpu-nonsense
...
Follow-up on `std.Target` GPU changes in #20960
2024-08-11 20:23:28 -07:00
Alex Rønne Petersen
6316fd9535
std.Target: Add goff and xcoff to ObjectFormat.
...
Also improve the docs a bit, and handle driverkit and dxil in default().
2024-08-11 20:21:28 -07:00
Linus Groh
4ef956ef14
std.Target: Rename c_type_* functions to camel case
...
From https://ziglang.org/documentation/master/#Names :
> If `x` is otherwise callable, then `x` should be `camelCase`.
2024-08-12 00:36:51 +01:00
Linus Groh
fd434fcd38
std.Target: Rename feature_set_fns to FeatureSetFns
...
From https://ziglang.org/documentation/master/#Names :
> If `x` is callable, and `x`'s return type is `type`, then `x` should
> be `TitleCase`.
2024-08-12 00:34:59 +01:00
Alex Rønne Petersen
8f917870a6
std.Target: Bump maximum supported versions of all Apple OSs.
...
https://support.apple.com/en-us/HT201222
2024-08-10 20:24:22 +02:00
Alex Rønne Petersen
b99777940e
std.Target: Bump maximum supported OpenBSD version to 7.5.
2024-08-10 20:24:21 +02:00
Alex Rønne Petersen
d7e19f7f8e
std.Target: Bump minimum supported OpenBSD version to 7.3.
...
Per 0.13.0 release notes: https://ziglang.org/download/0.13.0/release-notes.html#Tier-2-Support
2024-08-10 20:24:20 +02:00
Alex Rønne Petersen
8088027e72
std.Target: Bump minimum supported Windows version to win10.
...
Per 0.13.0 release notes: https://ziglang.org/download/0.13.0/release-notes.html
2024-08-10 20:24:19 +02:00