ziglang/zig
262
5.9k
Fork
You've already forked zig
761

Add psp os #31609

Merged
alexrp merged 4 commits from IridescentRose/zig:psp-os-target into master 2026年03月25日 00:51:04 +01:00
Contributor
Copy link

Adds target information for the PSP OS and minimal profile in std.posix to build a functional std.Io vtable.

Adds target information for the PSP OS and minimal profile in std.posix to build a functional std.Io vtable. * https://codeberg.org/ziglang/zig/issues/31341 * https://github.com/zPSP-Dev/Zig-PSP/issues/41
IridescentRose force-pushed psp-os-target from 650e48b51e
Some checks are pending
ci / aarch64-freebsd-debug (pull_request) Blocked by required conditions
ci / aarch64-freebsd-release (pull_request) Blocked by required conditions
ci / aarch64-linux-debug (pull_request) Blocked by required conditions
ci / aarch64-linux-release (pull_request) Blocked by required conditions
ci / aarch64-netbsd-debug (pull_request) Blocked by required conditions
ci / aarch64-netbsd-release (pull_request) Blocked by required conditions
ci / aarch64-macos-debug (pull_request) Blocked by required conditions
ci / aarch64-macos-release (pull_request) Blocked by required conditions
ci / loongarch64-linux-debug (pull_request) Blocked by required conditions
ci / loongarch64-linux-release (pull_request) Blocked by required conditions
ci / powerpc64le-linux-debug (pull_request) Blocked by required conditions
ci / powerpc64le-linux-release (pull_request) Blocked by required conditions
ci / riscv64-linux-debug (pull_request) Blocked by required conditions
ci / riscv64-linux-release (pull_request) Blocked by required conditions
ci / s390x-linux-debug (pull_request) Blocked by required conditions
ci / s390x-linux-release (pull_request) Blocked by required conditions
ci / x86_64-freebsd-debug (pull_request) Blocked by required conditions
ci / x86_64-freebsd-release (pull_request) Blocked by required conditions
ci / x86_64-linux-debug (pull_request) Blocked by required conditions
ci / x86_64-linux-debug-llvm (pull_request) Blocked by required conditions
ci / x86_64-linux-release (pull_request) Blocked by required conditions
ci / x86_64-netbsd-debug (pull_request) Blocked by required conditions
ci / x86_64-netbsd-release (pull_request) Blocked by required conditions
ci / x86_64-openbsd-debug (pull_request) Blocked by required conditions
ci / x86_64-openbsd-release (pull_request) Blocked by required conditions
ci / x86_64-windows-debug (pull_request) Blocked by required conditions
ci / x86_64-windows-release (pull_request) Blocked by required conditions
to fdf19984b8
Some checks are pending
ci / aarch64-freebsd-debug (pull_request) Blocked by required conditions
ci / aarch64-freebsd-release (pull_request) Blocked by required conditions
ci / aarch64-linux-debug (pull_request) Blocked by required conditions
ci / aarch64-linux-release (pull_request) Blocked by required conditions
ci / aarch64-netbsd-debug (pull_request) Blocked by required conditions
ci / aarch64-netbsd-release (pull_request) Blocked by required conditions
ci / aarch64-macos-debug (pull_request) Blocked by required conditions
ci / aarch64-macos-release (pull_request) Blocked by required conditions
ci / loongarch64-linux-debug (pull_request) Blocked by required conditions
ci / loongarch64-linux-release (pull_request) Blocked by required conditions
ci / powerpc64le-linux-debug (pull_request) Blocked by required conditions
ci / powerpc64le-linux-release (pull_request) Blocked by required conditions
ci / riscv64-linux-debug (pull_request) Blocked by required conditions
ci / riscv64-linux-release (pull_request) Blocked by required conditions
ci / s390x-linux-debug (pull_request) Blocked by required conditions
ci / s390x-linux-release (pull_request) Blocked by required conditions
ci / x86_64-freebsd-debug (pull_request) Blocked by required conditions
ci / x86_64-freebsd-release (pull_request) Blocked by required conditions
ci / x86_64-linux-debug (pull_request) Blocked by required conditions
ci / x86_64-linux-debug-llvm (pull_request) Blocked by required conditions
ci / x86_64-linux-release (pull_request) Blocked by required conditions
ci / x86_64-netbsd-debug (pull_request) Blocked by required conditions
ci / x86_64-netbsd-release (pull_request) Blocked by required conditions
ci / x86_64-openbsd-debug (pull_request) Blocked by required conditions
ci / x86_64-openbsd-release (pull_request) Blocked by required conditions
ci / x86_64-windows-debug (pull_request) Blocked by required conditions
ci / x86_64-windows-release (pull_request) Blocked by required conditions
2026年03月21日 07:56:36 +01:00
Compare
std.posix: Minimal set to build an Io on PSP
Some checks failed
ci / x86_64-netbsd-release (pull_request) Successful in 30m47s
ci / x86_64-freebsd-release (pull_request) Successful in 33m9s
ci / aarch64-linux-debug (pull_request) Has been cancelled
ci / aarch64-linux-release (pull_request) Has been cancelled
ci / x86_64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-macos-debug (pull_request) Has been cancelled
ci / aarch64-macos-release (pull_request) Has been cancelled
ci / x86_64-linux-debug-llvm (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / x86_64-linux-debug (pull_request) Has been cancelled
ci / x86_64-openbsd-release (pull_request) Has been cancelled
ci / s390x-linux-debug (pull_request) Has been cancelled
ci / s390x-linux-release (pull_request) Has been cancelled
ci / x86_64-openbsd-debug (pull_request) Has been cancelled
ci / x86_64-windows-debug (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / powerpc64le-linux-release (pull_request) Has been cancelled
ci / x86_64-netbsd-debug (pull_request) Has been cancelled
ci / x86_64-windows-release (pull_request) Has been cancelled
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / riscv64-linux-debug (pull_request) Has been cancelled
ci / riscv64-linux-release (pull_request) Has been cancelled
2037dba90f
IridescentRose changed title from (削除) std.Target: add psp os (削除ここまで) to Add psp os 2026年03月21日 11:54:34 +01:00
andrewrk approved these changes 2026年03月21日 23:44:57 +01:00
Dismissed
andrewrk left a comment
Copy link

Nice!

Nice!
@ -2025,2 +2035,3 @@
.m68k=>&m68k.cpu.M68000,
.mips,.mipsel=>&mips.cpu.mips32r2,
.mips,.mipsel=>switch(os.tag){
.psp=>&mips.cpu.mips2,// mips2 with some custom instructions, no trap instructions
Owner
Copy link

"no trap instructions" should be reflected in mips target CPU features and then another CPU model can be added which has this feature enabled.

file to edit is tools/update_cpu_features.zig

"no trap instructions" should be reflected in mips target CPU features and then another CPU model can be added which has this feature enabled. file to edit is tools/update_cpu_features.zig
Author
Contributor
Copy link

Thanks, I was able to modify this and re-ran the tool

Thanks, I was able to modify this and re-ran the tool
Owner
Copy link

Looks good. This will enable codegen backends to prevent traps from being emitted.

What should @trap() do then, when targeting this system?

Looks good. This will enable codegen backends to prevent traps from being emitted. What should `@trap()` do then, when targeting this system?
Author
Contributor
Copy link

On this system in general, traps should instead be converted to breaks, as that's what the allegrex custom GCC does, which allows someone using the psp debugger to catch it rather than an illegal instruction exception.

On this system in general, traps should instead be converted to breaks, as that's what the allegrex custom GCC does, which allows someone using the psp debugger to catch it rather than an illegal instruction exception.
Owner
Copy link

ok perfect. now that you added that cpu feature, the llvm backend can be adjusted to lower @trap() into break instruction instead.

edit: actually probably break followed by infinite loop because @trap() is no-return.

ok perfect. now that you added that cpu feature, the llvm backend can be adjusted to lower `@trap()` into break instruction instead. edit: actually probably break followed by infinite loop because `@trap()` is no-return.
Author
Contributor
Copy link

Working:

PSPLink debug output:

Load/Start host0:/app.prx UID: 0x04398213 Name: SDK Hello World
host0:/> Exception - Breakpoint
Thread ID - 0x04371F1F
Th Name - zig_user_main
Module ID - 0x04398213
Mod Name - SDK Hello World
EPC - 0x0882651C
Cause - 0x10000024
BadVAddr - 0x8E8DA9C9
Status - 0x40088613
Address - 0x0002251C
zr:0x00000000 at:0x00000000 v0:0x0000000F v1:0x00000000
a0:0x0BEBFE14 a1:0x00000070 a2:0x00000000 a3:0x00000021
t0:0xDEADBEEF t1:0xDEADBEEF t2:0xDEADBEEF t3:0xDEADBEEF
t4:0xDEADBEEF t5:0xDEADBEEF t6:0xDEADBEEF t7:0xDEADBEEF
s0:0xDEADBEEF s1:0xDEADBEEF s2:0xDEADBEEF s3:0xDEADBEEF
s4:0xDEADBEEF s5:0xDEADBEEF s6:0xDEADBEEF s7:0xDEADBEEF
t8:0xDEADBEEF t9:0xDEADBEEF k0:0x0BEBFF00 k1:0x00000000
gp:0x088B1540 sp:0x0BEBFD58 fp:0x0BEBFD58 ra:0x0882651C
0x0882651C: 0x0000000D '....' - break 0x0
disasm 0x0882651C 3
0x0882651C: 0x0000000D '....' - break 0x0
0x08826520: 0x0A209948 'H. .' - j 0x08826520
0x08826524: 0x00000000 '....' - nop
Working: PSPLink debug output: ``` Load/Start host0:/app.prx UID: 0x04398213 Name: SDK Hello World host0:/> Exception - Breakpoint Thread ID - 0x04371F1F Th Name - zig_user_main Module ID - 0x04398213 Mod Name - SDK Hello World EPC - 0x0882651C Cause - 0x10000024 BadVAddr - 0x8E8DA9C9 Status - 0x40088613 Address - 0x0002251C zr:0x00000000 at:0x00000000 v0:0x0000000F v1:0x00000000 a0:0x0BEBFE14 a1:0x00000070 a2:0x00000000 a3:0x00000021 t0:0xDEADBEEF t1:0xDEADBEEF t2:0xDEADBEEF t3:0xDEADBEEF t4:0xDEADBEEF t5:0xDEADBEEF t6:0xDEADBEEF t7:0xDEADBEEF s0:0xDEADBEEF s1:0xDEADBEEF s2:0xDEADBEEF s3:0xDEADBEEF s4:0xDEADBEEF s5:0xDEADBEEF s6:0xDEADBEEF s7:0xDEADBEEF t8:0xDEADBEEF t9:0xDEADBEEF k0:0x0BEBFF00 k1:0x00000000 gp:0x088B1540 sp:0x0BEBFD58 fp:0x0BEBFD58 ra:0x0882651C 0x0882651C: 0x0000000D '....' - break 0x0 disasm 0x0882651C 3 0x0882651C: 0x0000000D '....' - break 0x0 0x08826520: 0x0A209948 'H. .' - j 0x08826520 0x08826524: 0x00000000 '....' - nop ```
alexrp marked this conversation as resolved
@ -615,0 +617,4 @@
.psp=>.{
.semver=.{
.min=.{.major=1,.minor=0,.patch=0},
.max=.{.major=6,.minor=61,.patch=0},
Owner
Copy link

Where are these sourced from?

Where are these sourced from?
Author
Contributor
Copy link

https://www.psdevwiki.com/psp/Official_Firmware_(OFW)#1.00_(1.0.3)

6.61 is the last public version of firmware
1.00 is the first public version by name although it says 1.03 internally. I went with the more obvious 1.00 but glad to change or add a source in code.

https://www.psdevwiki.com/psp/Official_Firmware_(OFW)#1.00_(1.0.3) 6.61 is the last public version of firmware 1.00 is the first public version by name although it says 1.03 internally. I went with the more obvious 1.00 but glad to change or add a source in code.
Owner
Copy link

@IridescentRose wrote in #31609 (comment):

1.00 is the first public version by name although it says 1.03 internally. I went with the more obvious 1.00 but glad to change or add a source in code.

I think we should use whichever numbers the actual software uses.

@IridescentRose wrote in https://codeberg.org/ziglang/zig/pulls/31609#issuecomment-11911269: > 1.00 is the first public version by name although it says 1.03 internally. I went with the more obvious 1.00 but glad to change or add a source in code. I think we should use whichever numbers the actual software uses.
Author
Contributor
Copy link

Alright, will change to 1.03 as I would assume that to be the version in software

Alright, will change to 1.03 as I would assume that to be the version in software
Author
Contributor
Copy link

Updated

Updated
alexrp marked this conversation as resolved
@ -6420,6 +6420,7 @@ fn addCommonCCArgs(
.illumos=>tryargv.append("__illumos__"),
// Homebrew targets without LLVM support; use communities's preferred macros.
.@"3ds"=>tryargv.append("-D__3DS__"),
.psp=>tryargv.append("-D__PSP__"),
Owner
Copy link

Does an existing compiler define this?

Does an existing compiler define this?
Author
Contributor
Copy link

Yes: https://github.com/pspdev/pspsdk/blob/master/src/base/pspdev.cmake#L33

There's actually another one I could add to this too, but I believe __PSP__ is more common in the community

Yes: https://github.com/pspdev/pspsdk/blob/master/src/base/pspdev.cmake#L33 There's actually another one I could add to this too, but I believe `__PSP__` is more common in the community
Owner
Copy link

Definitely let's not perpetuate usage of macros like PSP. __PSP__ is reasonable.

Definitely let's not perpetuate usage of macros like `PSP`. `__PSP__` is reasonable.
alexrp marked this conversation as resolved
misc: Add allegrex CPU & features, run tool, update semver
Some checks failed
ci / x86_64-netbsd-release (pull_request) Successful in 33m59s
ci / x86_64-freebsd-release (pull_request) Successful in 34m52s
ci / x86_64-netbsd-debug (pull_request) Successful in 43m56s
ci / x86_64-freebsd-debug (pull_request) Successful in 46m7s
ci / x86_64-openbsd-release (pull_request) Successful in 47m20s
ci / aarch64-macos-release (pull_request) Successful in 51m50s
ci / x86_64-openbsd-debug (pull_request) Successful in 1h3m9s
ci / x86_64-linux-debug (pull_request) Successful in 1h12m47s
ci / aarch64-macos-debug (pull_request) Successful in 1h16m0s
ci / x86_64-windows-debug (pull_request) Successful in 1h23m44s
ci / aarch64-linux-release (pull_request) Successful in 1h28m19s
ci / s390x-linux-release (pull_request) Successful in 1h32m16s
ci / powerpc64le-linux-release (pull_request) Successful in 1h34m28s
ci / aarch64-linux-debug (pull_request) Has been cancelled
ci / x86_64-windows-release (pull_request) Has been cancelled
ci / x86_64-linux-debug-llvm (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / s390x-linux-debug (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / riscv64-linux-debug (pull_request) Has been cancelled
ci / riscv64-linux-release (pull_request) Has been cancelled
c824ce954e
@ -806,2 +806,4 @@
else=>null,
},
.psp=>switch(builtin.cpu.arch){
// minimum block allocation by testing sceKernel
Owner
Copy link

Can you elaborate a bit on what this means? Is this really related to pages?

Can you elaborate a bit on what this means? Is this really related to pages?
Author
Contributor
Copy link

When allocating using the sceKernel API, the system must call sceKernelAllocPartitionMemory() which allocates a memory block from either the userspace or kernelspace partition.

The minimum size of a block is always 256 bytes, and the size of any block allocated rounds up to the nearest 256 bytes.

The PSP may not have pages in the exact sense since it lacks a sophisticated MMU. However, not including an entry here leads to compilation errors on the PSP target.

When allocating using the sceKernel API, the system must call `sceKernelAllocPartitionMemory()` which allocates a memory block from either the userspace or kernelspace partition. The minimum size of a block is always 256 bytes, and the size of any block allocated rounds up to the nearest 256 bytes. The PSP may not have pages in the exact sense since it lacks a sophisticated MMU. However, not including an entry here leads to compilation errors on the PSP target.
Owner
Copy link

I don't think "page size" is a meaningful concept when there is no MMU in effect.

@IridescentRose wrote in #31609 (comment):

The PSP may not have pages in the exact sense since it lacks a sophisticated MMU. However, not including an entry here leads to compilation errors on the PSP target.

Which errors?

I don't think "page size" is a meaningful concept when there is no MMU in effect. @IridescentRose wrote in https://codeberg.org/ziglang/zig/pulls/31609#issuecomment-11912355: > The PSP may not have pages in the exact sense since it lacks a sophisticated MMU. However, not including an entry here leads to compilation errors on the PSP target. Which errors?
Author
Contributor
Copy link

The root of this error is that the MemoryMap.zig file references []align(std.heap.page_size_min) u8 which is a struct referenced by Io which when providing a minimal IO implementation (even though this function is @panic("Unimplemented")) triggers an error at comptime.

/home/n/zig/build/stage3/lib/zig/std/heap.zig:48:97: error: mipsel-psp has unknown page_size_min; populate std.options.page_size_min
pub const page_size_min: usize = std.options.page_size_min orelse (page_size_min_default orelse @compileError(@tagName(builtin.cpu.arch) ++ "-" ++ @tagName(builtin.os.tag) ++ " has unknown page_size_min; populate std.options.page_size_min"));
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
 Io.File.MemoryMap: /home/n/zig/build/stage3/lib/zig/std/Io/File/MemoryMap.zig:18:25
 fileMemoryMapCreate: src/utils/Io.zig:1012:108
 vtable: src/utils/Io.zig:97:28
 psp_io: src/utils/Io.zig:25:16
 _module_main_thread: src/utils/module.zig:51:21
 module_start: src/utils/module.zig:254:67
 module_start: src/utils/module.zig:252:5
 module: src/pspsdk.zig:878:32
 comptime: examples/network.zig:35:26
 root: /home/n/zig/build/stage3/lib/zig/std/start.zig:13:22
 3 reference(s) hidden; use '-freference-trace=13' to see all references
The root of this error is that the MemoryMap.zig file references `[]align(std.heap.page_size_min) u8` which is a struct referenced by `Io` which when providing a minimal IO implementation (even though this function is @panic("Unimplemented")) triggers an error at comptime. ``` /home/n/zig/build/stage3/lib/zig/std/heap.zig:48:97: error: mipsel-psp has unknown page_size_min; populate std.options.page_size_min pub const page_size_min: usize = std.options.page_size_min orelse (page_size_min_default orelse @compileError(@tagName(builtin.cpu.arch) ++ "-" ++ @tagName(builtin.os.tag) ++ " has unknown page_size_min; populate std.options.page_size_min")); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ referenced by: Io.File.MemoryMap: /home/n/zig/build/stage3/lib/zig/std/Io/File/MemoryMap.zig:18:25 fileMemoryMapCreate: src/utils/Io.zig:1012:108 vtable: src/utils/Io.zig:97:28 psp_io: src/utils/Io.zig:25:16 _module_main_thread: src/utils/module.zig:51:21 module_start: src/utils/module.zig:254:67 module_start: src/utils/module.zig:252:5 module: src/pspsdk.zig:878:32 comptime: examples/network.zig:35:26 root: /home/n/zig/build/stage3/lib/zig/std/start.zig:13:22 3 reference(s) hidden; use '-freference-trace=13' to see all references ```
Owner
Copy link

That's a bit unfortunate.

I wonder if this could tie into #31235 somehow? cc @GasInfinity

That's a bit unfortunate. I wonder if this could tie into https://codeberg.org/ziglang/zig/pulls/31235 somehow? cc @GasInfinity
Author
Contributor
Copy link

If there is / will be a better solution I have ways to hack around this until there's a better solution and could remove the offending code from this PR.

If there is / will be a better solution I have ways to hack around this until there's a better solution and could remove the offending code from this PR.
Owner
Copy link

I think 256 is a good value for this.

I think 256 is a good value for this.
Contributor
Copy link

@alexrp wrote in #31609 (comment):

That's a bit unfortunate.

I wonder if this could tie into #31235 somehow? cc @GasInfinity

It would still have to be overridden with the PR, instead of living in std it would live in whatever package exposes std_os_options.

I agree with andrew that 256 is a good value as even if it doesn't have an MMU, a lot of code would still expect page_size to be available.

@alexrp wrote in https://codeberg.org/ziglang/zig/pulls/31609#issuecomment-11915103: > That's a bit unfortunate. > > I wonder if this could tie into #31235 somehow? cc @GasInfinity It would still have to be overridden with the PR, instead of living in `std` it would live in whatever package exposes `std_os_options`. I agree with andrew that 256 is a good value as even if it doesn't have an MMU, a lot of code would still expect `page_size` to be available.
Owner
Copy link

I had a chat with @mlugg about this. We agreed that 256 is okay as a value here. However, we also agreed that, both as a result of this change and how these constants are already used in practice, "page size" is a poor name for them, and the doc comments also aren't great.

My contention is basically that pages have to do with virtual memory, and the value being introduced here has nothing to do with pages because there's no MMU. Matthew pointed out that what we really care about at the end of the day is the system's granularity of mmap (or the OS's equivalent allocation function) regardless of whether that function actually works with pages in the hardware sense. We really only use the term "page size" because we've inherited it from the POSIX era of systems, but there's no hard rule saying that the granularity of mmap (or the OS equivalent) should have any connection to the page size that the underlying MMU is configured for; an OS could present the illusion of 8k "pages" on a 4k MMU, for example.

Matthew suggested mmap_align_min/mmap_align_max/mmapAlign(), and for the constants to be typed as std.mem.Alignment to encode the power-of-two requirement (and the fact that they really are alignment values).

I'll file a follow-up issue for this. Edit: #31652

I had a chat with @mlugg about this. We agreed that 256 is okay as a value here. However, we also agreed that, both as a result of this change and how these constants are already used in practice, "page size" is a poor name for them, and the doc comments also aren't great. My contention is basically that pages have to do with virtual memory, and the value being introduced here has nothing to do with pages because there's no MMU. Matthew pointed out that what we really care about at the end of the day is the system's granularity of `mmap` (or the OS's equivalent allocation function) regardless of whether that function actually works with pages in the hardware sense. We really only use the term "page size" because we've inherited it from the POSIX era of systems, but there's no hard rule saying that the granularity of `mmap` (or the OS equivalent) should have any connection to the page size that the underlying MMU is configured for; an OS could present the illusion of 8k "pages" on a 4k MMU, for example. Matthew suggested `mmap_align_min`/`mmap_align_max`/`mmapAlign()`, and for the constants to be typed as `std.mem.Alignment` to encode the power-of-two requirement (and the fact that they really *are* alignment values). I'll file a follow-up issue for this. Edit: https://codeberg.org/ziglang/zig/issues/31652
alexrp marked this conversation as resolved
codegen: notraps on mips causes break and infinite loop on @trap()
All checks were successful
ci / x86_64-netbsd-release (pull_request) Successful in 32m29s
ci / x86_64-freebsd-release (pull_request) Successful in 34m0s
ci / aarch64-macos-release (pull_request) Successful in 36m36s
ci / x86_64-freebsd-debug (pull_request) Successful in 40m53s
ci / x86_64-netbsd-debug (pull_request) Successful in 46m2s
ci / x86_64-openbsd-release (pull_request) Successful in 52m36s
ci / x86_64-openbsd-debug (pull_request) Successful in 1h1m44s
ci / aarch64-macos-debug (pull_request) Successful in 1h3m22s
ci / x86_64-windows-debug (pull_request) Successful in 1h5m31s
ci / x86_64-linux-debug (pull_request) Successful in 1h8m8s
ci / x86_64-windows-release (pull_request) Successful in 56m54s
ci / aarch64-linux-release (pull_request) Successful in 1h24m15s
ci / powerpc64le-linux-release (pull_request) Successful in 1h28m57s
ci / s390x-linux-release (pull_request) Successful in 1h36m8s
ci / x86_64-linux-release (pull_request) Successful in 2h7m23s
ci / s390x-linux-debug (pull_request) Successful in 2h21m0s
ci / aarch64-linux-debug (pull_request) Successful in 2h34m23s
ci / powerpc64le-linux-debug (pull_request) Successful in 4h19m54s
ci / loongarch64-linux-release (pull_request) Successful in 2h8m43s
ci / loongarch64-linux-debug (pull_request) Successful in 3h31m51s
ci / x86_64-linux-debug-llvm (pull_request) Successful in 2h56m17s
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
ci / aarch64-netbsd-debug (pull_request) Successful in 3h32m28s
ci / aarch64-netbsd-release (pull_request) Successful in 2h52m8s
ci / aarch64-freebsd-debug (pull_request) Successful in 3h35m28s
ci / aarch64-freebsd-release (pull_request) Successful in 2h46m46s
164d01c1dc
andrewrk left a comment
Copy link

Added commit to the LLVM backend looks good. @alexrp please merge unless you have any further requested changes.

Added commit to the LLVM backend looks good. @alexrp please merge unless you have any further requested changes.
alexrp removed their assignment 2026年03月25日 08:06:27 +01:00

@IridescentRose was it intentional that psp wasn't added here?

.freestanding,.other,.@"3ds",.vita=>{
@IridescentRose was it intentional that `psp` wasn't added here? https://codeberg.org/ziglang/zig/src/commit/3a6ddce4cf303d7a2bb618223043898d7b1bcc49/lib/std/debug.zig#L498
Author
Contributor
Copy link

Not intentional, however we do provide a panic handler in Zig-PSP that is recommended as a default.

Not intentional, however we do provide a panic handler in Zig-PSP that is recommended as a default.
All checks were successful
ci / x86_64-netbsd-release (pull_request) Successful in 32m29s
ci / x86_64-freebsd-release (pull_request) Successful in 34m0s
ci / aarch64-macos-release (pull_request) Successful in 36m36s
ci / x86_64-freebsd-debug (pull_request) Successful in 40m53s
ci / x86_64-netbsd-debug (pull_request) Successful in 46m2s
ci / x86_64-openbsd-release (pull_request) Successful in 52m36s
ci / x86_64-openbsd-debug (pull_request) Successful in 1h1m44s
ci / aarch64-macos-debug (pull_request) Successful in 1h3m22s
ci / x86_64-windows-debug (pull_request) Successful in 1h5m31s
ci / x86_64-linux-debug (pull_request) Successful in 1h8m8s
ci / x86_64-windows-release (pull_request) Successful in 56m54s
ci / aarch64-linux-release (pull_request) Successful in 1h24m15s
ci / powerpc64le-linux-release (pull_request) Successful in 1h28m57s
ci / s390x-linux-release (pull_request) Successful in 1h36m8s
ci / x86_64-linux-release (pull_request) Successful in 2h7m23s
ci / s390x-linux-debug (pull_request) Successful in 2h21m0s
ci / aarch64-linux-debug (pull_request) Successful in 2h34m23s
ci / powerpc64le-linux-debug (pull_request) Successful in 4h19m54s
ci / loongarch64-linux-release (pull_request) Successful in 2h8m43s
ci / loongarch64-linux-debug (pull_request) Successful in 3h31m51s
ci / x86_64-linux-debug-llvm (pull_request) Successful in 2h56m17s
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
ci / aarch64-netbsd-debug (pull_request) Successful in 3h32m28s
ci / aarch64-netbsd-release (pull_request) Successful in 2h52m8s
ci / aarch64-freebsd-debug (pull_request) Successful in 3h35m28s
ci / aarch64-freebsd-release (pull_request) Successful in 2h46m46s
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
abi/f32
abi/ilp32
abi/sf
accepted
This proposal is planned.
arch/21k
arch/6502
arch/aarch64
arch/alpha
arch/amdgcn
arch/arc
arch/arc32
arch/arc64
arch/arm
arch/avr
arch/bfin
arch/bpf
arch/colossus
arch/cris
arch/csky
arch/dlx
arch/epiphany
arch/fr30
arch/frv
arch/hexagon
arch/hppa
arch/hppa64
arch/ia64
arch/kalimba
arch/kvx
arch/lanai
arch/lm32
arch/loongarch32
arch/loongarch64
arch/m32r
arch/m68k
arch/m88k
arch/mcore
arch/microblaze
arch/mips
arch/mips64
arch/mmix
arch/moxie
arch/mrisc32
arch/msp430
arch/nds32
arch/ns32k
arch/nvptx
arch/or1k
arch/powerpc
arch/powerpc64
arch/propeller
arch/riscv32
arch/riscv64
arch/rl78
arch/rx
arch/s390x
arch/sh
arch/sparc
arch/sparc64
arch/spirv
arch/spu
arch/tricore
arch/v850
arch/vax
arch/vc4
arch/ve
arch/wasm
arch/x86
arch/x86_64
arch/xcore
arch/xtensa
autodoc
The web application for interactive documentation and generation of its assets.
backend/c
The C backend outputs C source code.
backend/llvm
The LLVM backend outputs an LLVM bitcode module.
backend/self-hosted
The self-hosted backends produce machine code directly.
binutils
Zig's included binary utilities: zig ar, zig dlltool, zig lib, zig ranlib, zig objcopy, and zig rc.
breaking
Implementing this issue could cause existing code to no longer compile or have different behavior.
build system
The Zig build system - zig build, std.Build, the build runner, and package management.
debug info
An issue related to debug information (e.g. DWARF) produced by the Zig compiler.
docs
An issue with documentation, e.g. the language reference or standard library doc comments.
error message
This issue points out an error message that is unhelpful and should be improved.
frontend
Tokenization, parsing, AstGen, ZonGen, Sema, Legalize, and Liveness.
fuzzing
An issue related to Zig's integrated fuzz testing.
incremental
Reuse of internal compiler state for faster compilation.
lib/c
This issue relates to Zig's libc implementation and/or vendored libcs.
lib/compiler-rt
This issue relates to Zig's compiler-rt library.
lib/cxx
This issue relates to Zig's vendored libc++ and/or libc++abi.
lib/std
This issue relates to Zig's standard library.
lib/tsan
This issue relates to Zig's vendored libtsan.
lib/ubsan-rt
This issue relates to Zig's ubsan-rt library.
lib/unwind
This issue relates to Zig's vendored libunwind.
linking
Zig's integrated object file and incremental linker.
miscompilation
The compiler reports success but produces semantically incorrect code.
os/android
os/contiki
os/dragonfly
os/driverkit
os/emscripten
os/freebsd
os/fuchsia
os/haiku
os/hermit
os/hurd
os/illumos
os/ios
os/linux
os/maccatalyst
os/macos
os/managarm
os/netbsd
os/ohos
os/openbsd
os/plan9
os/redox
os/rtems
os/serenity
os/tvos
os/uefi
os/visionos
os/wasi
os/watchos
os/windows
proposal
This issue suggests language modifications. If it also has the "accepted" label then it is planned.
release notes
This issue or pull request should be mentioned in the release notes.
testing
This issue is related to testing the compiler, standard library, or other parts of Zig.
zig cc
Zig as a drop-in C-family compiler.
zig fmt
The Zig source code formatter.
zig reduce
The Zig source code reduction tool.
bounty
https://ziglang.org/news/announcing-donor-bounties
bug
Observed behavior contradicts documented or intended behavior.
contributor-friendly
This issue is limited in scope and/or knowledge of project internals.
downstream
An issue with a third-party project that uses this project.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
infra
An issue related to project infrastructure, e.g. continuous integration.
optimization
A task to improve performance and/or resource usage.
question
No questions on the issue tracker; use a community space instead.
regression
Something that used to work in a previous version stopped working
upstream
An issue with a third-party project that this project uses.
use case
Describes a real use case that is difficult or impossible, but does not propose a solution.
No labels
abi/f32
abi/ilp32
abi/sf
accepted
arch/21k
arch/6502
arch/aarch64
arch/alpha
arch/amdgcn
arch/arc
arch/arc32
arch/arc64
arch/arm
arch/avr
arch/bfin
arch/bpf
arch/colossus
arch/cris
arch/csky
arch/dlx
arch/epiphany
arch/fr30
arch/frv
arch/hexagon
arch/hppa
arch/hppa64
arch/ia64
arch/kalimba
arch/kvx
arch/lanai
arch/lm32
arch/loongarch32
arch/loongarch64
arch/m32r
arch/m68k
arch/m88k
arch/mcore
arch/microblaze
arch/mips
arch/mips64
arch/mmix
arch/moxie
arch/mrisc32
arch/msp430
arch/nds32
arch/ns32k
arch/nvptx
arch/or1k
arch/powerpc
arch/powerpc64
arch/propeller
arch/riscv32
arch/riscv64
arch/rl78
arch/rx
arch/s390x
arch/sh
arch/sparc
arch/sparc64
arch/spirv
arch/spu
arch/tricore
arch/v850
arch/vax
arch/vc4
arch/ve
arch/wasm
arch/x86
arch/x86_64
arch/xcore
arch/xtensa
autodoc
backend/c
backend/llvm
backend/self-hosted
binutils
breaking
build system
debug info
docs
error message
frontend
fuzzing
incremental
lib/c
lib/compiler-rt
lib/cxx
lib/std
lib/tsan
lib/ubsan-rt
lib/unwind
linking
miscompilation
os/android
os/contiki
os/dragonfly
os/driverkit
os/emscripten
os/freebsd
os/fuchsia
os/haiku
os/hermit
os/hurd
os/illumos
os/ios
os/linux
os/maccatalyst
os/macos
os/managarm
os/netbsd
os/ohos
os/openbsd
os/plan9
os/redox
os/rtems
os/serenity
os/tvos
os/uefi
os/visionos
os/wasi
os/watchos
os/windows
proposal
release notes
testing
zig cc
zig fmt
zig reduce
bounty
bug
contributor-friendly
downstream
enhancement
infra
optimization
question
regression
upstream
use case
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ziglang/zig!31609
Reference in a new issue
ziglang/zig
No description provided.
Delete branch "IridescentRose/zig:psp-os-target"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?