Alex Rønne Petersen
148b5b4c78
Merge pull request #21608 from mikdusan/ppc64
...
ppc64: get further along into system bootstrap
2024-10-06 17:26:40 +02:00
Alex Rønne Petersen
be5378b038
Merge pull request #21587 from alexrp/hexagon-porting
...
Some initial `hexagon-linux` port work
2024-10-06 13:35:56 +02:00
achan1989
1d8844dd56
Copy in WASI rights_t documentation
2024-10-06 09:44:52 +01:00
Michael Dusan
f7da960a33
stage1 ppc64: remove inline-asm overlapping clobbers
...
Required when bootstrapping with GCC.
2024-10-05 10:26:47 -04:00
Jonathan Marler
73de620ad5
std.os.windows.ReadFile: handle ERROR_LOCK_VIOLATION
...
fixes #21500
2024-10-05 00:36:49 -07:00
Alex Rønne Petersen
b23a5b56c2
Merge pull request #21578 from alexrp/s390x-porting
...
Get module tests passing for `s390x-linux` and add it to CI
2024-10-04 14:40:32 +02:00
Alex Rønne Petersen
cd6795fc06
std.os.linux: Fix mmap() syscall invocation for s390x.
...
The s390x mmap() syscall existed before Linux supported syscalls with 5+
parameters, so it takes a single pointer to an array of arguments instead.
2024-10-04 00:26:53 +02:00
Alex Rønne Petersen
9b273f6b9a
Merge pull request #21570 from alexrp/windows-itanium
...
Initial port work for `*-windows-itanium` support.
2024-10-03 21:53:22 +02:00
Alex Rønne Petersen
8060fad425
generate_linux_syscalls: Rename mmap_pgoff to mmap2.
2024-10-03 09:12:35 +02:00
Alex Rønne Petersen
fe30df6b8c
std.os.linux: Add hexagon arch bits.
2024-10-03 09:12:35 +02:00
Alex Rønne Petersen
c560e26fb7
std.os.linux: Rename some arch bits files to match std.Target.Cpu.Arch tags.
2024-10-03 09:12:35 +02:00
Alex Rønne Petersen
537a873b17
Initial port work for *-windows-itanium support.
...
https://llvm.org/docs/HowToBuildWindowsItaniumPrograms.html
This is a weird middle ground between `*-windows-gnu` and `*-windows-msvc`. It
uses the C++ ABI of the former while using the system libraries of the latter.
2024-09-28 21:43:52 +02:00
pseudoc
0d00c733de
std.os.linux: extend rtattr.type to support IFA_*
...
This is a breaking change which updates the `rtattr.type` from `IFLA` to
`union { IFLA, IFA }`. `IFLA` is for the `RTM_*LINK` messages and `IFA`
is for the `RTM_*ADDR` messages.
2024-09-26 10:54:18 +08:00
Meghan Denny
5e4da1ff30
std: add arch bits for s390x-linux ( #21342 )
...
see #21402
2024-09-24 13:35:12 -07:00
Nameless
8d76c02f9a
uefi: erroneous alignment check in pool_allocator
...
Fixes #21446
Both UefiPoolAllocator and UefiRawPoolAllocator were
passing the value of `log2_ptr_align` directly to
`mem.alignAllocLen` which expects a alignment value.
Both of these calls to `mem.alignAllocLen` are pointless
and the result of the alignment both always true, and
was thrown away anyway.
I have removed these calls entirely.
2024-09-24 13:30:53 -07:00
Linus Groh
72fc164178
std.os.linux: Fix tc_oflag_t for PowerPC
...
std/os/linux.zig:6504:20: error: expected type 'os.linux.NLDLY__enum_11313', found 'comptime_int'
2024-09-19 16:55:00 -07:00
Alex Rønne Petersen
af04404b49
std: Fix assembler comment syntax for sparc.
2024-09-07 13:16:22 -07:00
Alex Rønne Petersen
8043197995
std.os.linux: Add clock_nanosleep() syscall wrapper.
2024-09-06 20:03:00 +02:00
Alex Rønne Petersen
68bb788df5
std.os.linux: Make nanosleep() a compile error on riscv32.
...
This should eventually be converted to the void/{} pattern along with the other
syscalls that are compile errors for riscv32.
2024-08-31 03:31:58 +02:00
Alex Rønne Petersen
6364995d3f
std.os.linux: Also use kernel_timespec for riscv32 when libc is linked.
...
Both glibc and musl use time64 as the base ABI for riscv32. This fixes the
`sleep` test in `std.time` hanging forever due to the libc functions reading
bogus values.
2024-08-31 03:31:58 +02:00
Alex Rønne Petersen
537cb49eb2
std.os.linux: Define the Stat struct for riscv32.
...
The kernel does define the struct, it just doesn't use it. Yet both glibc and
musl expose it directly as their public stat struct, and std.c takes it from
std.os.linux. So just define it after all.
2024-08-31 03:31:58 +02:00
Alex Rønne Petersen
cb0e6d8aa6
std.os.linux: Fix syscall6() when building for PIC/PIE.
...
LLVM would run out of registers due to the edi usage. Just extend what we're
already doing for ebp to edi as well.
2024-08-30 14:48:17 -07:00
Andrew Kelley
a4cc43c42b
Merge pull request #21174 from alexrp/win-arm
...
Change `arm-windows-gnu` to `thumb-windows-gnu`, plus some initial port work
2024-08-30 14:34:53 -07:00
mlugg
4330c40596
std: avoid field/decl name conflicts
...
Most of these changes seem like improvements. The PDB thing had a TODO
saying it used to crash; I anticipate it works now, we'll see what CI
does.
The `std.os.uefi` field renames are a notable breaking change.
2024-08-29 20:39:11 +01:00
mlugg
0fe3fd01dd
std: update std.builtin.Type fields to follow naming conventions
...
The compiler actually doesn't need any functional changes for this: Sema
does reification based on the tag indices of `std.builtin.Type` already!
So, no zig1.wasm update is necessary.
This change is necessary to disallow name clashes between fields and
decls on a type, which is a prerequisite of #9938 .
2024-08-28 08:39:59 +01:00
Alex Rønne Petersen
d702a21bbc
std.os.windows: Define CONTEXT, RUNTIME_FUNCTION, and KNONVOLATILE_CONTEXT_POINTERS for thumb.
2024-08-28 03:13:01 +02:00
Alex Rønne Petersen
2e2441a89d
std.os.windows: Implement teb() for thumb.
...
6e15604c48/include/winnt.h (L2503)
Closes #4645 .
2024-08-28 03:13:01 +02:00
Jacob Young
f289b82d0e
Dwarf: implement .eh_frame
2024-08-27 03:55:56 -04:00
mlugg
a3a737e9a6
lib,test,tools,doc: update usages of @export
2024-08-27 00:44:35 +01:00
Michał Drozd
206e5e4d7d
std.os.linux: Fix bunch of compilation errors ( #21138 )
...
* Correct layout of IntInfo according to https://www.kernel.org/doc/html/latest/bpf/btf.html#btf-kind-int
* Fix VFS errors
* Fix std.os.linux.sendmmsg
* Fix std.os.linux.sigismember. Add tests
* Fix futex2 functions
2024-08-23 14:21:19 +00:00
Andrew Kelley
60011d28d3
Merge pull request #21137 from Aransentin/af_packet
...
std.os.linux: Add support for AF_PACKET V3
2024-08-23 00:46:18 -07:00
Andrew Kelley
ee84deda98
Merge pull request #21095 from alexrp/mips64-tests
...
Get `mips64(el)-linux` working and start testing it
2024-08-22 20:09:08 -07:00
Jens Goldberg
c3214bcd96
Inline the variant union
2024-08-21 10:10:19 +02:00
Jens Goldberg
6f24c4485c
Add tpacket_hdr and tpacket_block variant unions
2024-08-20 10:10:14 +02:00
Mohanavel S K
82b676ef79
Added Constants Related To Ioctl (sockios.h)
2024-08-19 20:21:26 +03:00
Jens Goldberg
1950e52c6c
Remove FASTROUTE; invisible to userspace, and collides with USER
2024-08-19 16:19:05 +02:00
Jens Goldberg
af007ec1ff
std.os.linux: Add support for AF_PACKET V3
2024-08-19 15:01:58 +02:00
Alex Rønne Petersen
ea38009f3d
std.os.linux: Fix Stat struct for mips/mips64.
2024-08-18 07:27:23 +02:00
Alex Rønne Petersen
ed9a502dff
std.os.linux: Fix rlimit_resource for mips64; move out of arch bits.
...
It is usually generic, so no point having it in arch bits.
2024-08-18 07:27:23 +02:00
Alex Rønne Petersen
d4973c9922
std.os.linux: Fix syscall errno value handling for mips.
...
The kernel sets r7 to 0 (success) or -1 (error), and stores the result in r2.
When r7 is -1 and the result is positive, it needs to be negated to get the
errno value that higher-level code, such as errnoFromSyscall(), expects to see.
The old code was missing the check that r2 is positive, but was also doing the
r7 check incorrectly; since it can only be set to 0 or -1, the blez instruction
would always branch.
In practice, this fix is necessary for e.g. the ENOSYS error to be interpreted
correctly. This manifested as hitting an unreachable branch when calling
process_vm_readv() in std.debug.MemoryAccessor.
2024-08-18 07:27:23 +02:00
Alex Rønne Petersen
bcf41c8594
std.os.linux: Fix E definition for mips64.
2024-08-18 07:27:23 +02:00
YANG Xudong
8e91c229e1
loongarch: fix asm to set thread pointer ( #21086 )
...
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2024-08-15 15:40:44 -07:00
reokodoku
20f4be4cf9
std.os.linux: add mseal syscall
2024-08-14 22:48:13 -07:00
YANG Xudong
76f062690c
add getcontext
2024-08-13 10:11:17 -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
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
8161e61548
std.os.linux.start_pie: Add support for the new RELR relocation format.
2024-08-11 20:27:09 -07:00
Alex Rønne Petersen
ae5bf2faab
std.os.linux: Retranslate and port some ioctl-related types and values.
2024-08-09 13:10:51 -07:00
Andrew Kelley
71a27ebd84
Merge pull request #21004 from alexrp/linux-6.10
...
Linux 6.10 headers/syscalls
2024-08-09 13:08:39 -07:00