feat: add support for sparc32#23381
Conversation
You also need to verify that all the types are correct for 32-bit. In general, for SPARC, the best references are going to be the Linux kernel and glibc source trees. Just be mindful that the types that glibc exposes publicly don't always have the same layout as the types the kernel exposes in the syscall interface, and
Similarly, you can check what glibc is doing.
It'll actually take a lot more to get |
| .hexagon => @import("linux/hexagon.zig"), | ||
| .riscv32 => @import("linux/riscv32.zig"), | ||
| .riscv64 => @import("linux/riscv64.zig"), | ||
| .sparc => @import("linux/sparc32.zig"), |
There was a problem hiding this comment.
The file name should just be sparc.zig to match the target triple spelling.
|
This pull request is not ready for review because:
Since we have moved development to Codeberg, please open your pull request there if you would like to continue these efforts. |
Hi, this is an attempt to give support for SPARC32! As I noticed Zig has already support for SPARC64 I've copied and pasted the code changing the syscall instruction from
t 0x6dtot 0x10as this manpage highlight: syscall(2) — Linux manual page.Also, I didn't find the references in
forkcall for the 32bit but I think it'll the same as 64bit where the result is two values.Note
I really want to get into contributing to Zig, so if you think this is not a good start issue or something like that let me know where I can improve and study more. Thanks.
ref #23081