taylor.fish bdca0f93c4 Fix PowerPC syscalls causing invalid code from CBE
Fixes #25209.

On PowerPC, some registers are both inputs to syscalls and clobbered by
them. An example is r0, which initially contains the syscall number, but
may be overwritten during execution of the syscall.

musl and glibc use a `+` (read-write) constraint to indicate this, which
isn't supported in Zig. The current implementation of PowerPC syscalls
in the Zig standard library instead lists these registers as both inputs
and clobbers, but this results in the C backend generating code that is
invalid for at least some C compilers, like GCC, which doesn't support
the specifying the same register as both an input and a clobber.

This PR changes the PowerPC syscall functions to list such registers as
inputs and outputs rather than inputs and clobbers. Thanks to jacobly0
who pointed out that it's possible to have multiple outputs; I had
gotten the wrong idea from the documentation.
2025-09-24 02:54:55 +02:00
..
2025-07-16 10:27:39 -07:00
2025-07-16 10:27:39 -07:00
2025-07-16 10:27:39 -07:00
2025-07-16 10:27:39 -07:00
2025-07-16 10:27:40 -07:00
2025-07-16 10:27:39 -07:00
2025-07-16 10:27:39 -07:00
2025-07-16 10:27:39 -07:00
2025-07-16 10:27:39 -07:00
2025-06-18 19:53:50 -07:00
2025-07-16 10:27:39 -07:00
2025-07-16 10:27:39 -07:00
2025-07-16 10:27:39 -07:00
2025-07-16 10:27:39 -07:00