-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tier 1 Support for x86_64-plan9 #7153
Comments
Targeting plan9 might be a bit trickier, since it uses a custom binary format which LLVM does not currently support (see http://man.cat-v.org/plan_9/6/a.out). From what I read, outputting that format should be doable with a custom linker script and |
@zigazeljko is that not the same |
No. The From Wikipedia:
|
I am working on this right now for stage2. |
Still being worked? Seems extremely interesting! |
Yes, I am just waiting for the self hosted compiler to get better at codegen. Once that happens, progress will be really quick and contributor friendly for adding plan 9 stuff to the stdlib. (The linking backend is already in place) |
@g-w1 By the way, is the plan9 syscall ABI (i.e. the stuff in |
The syscalls are here http://aiju.de/plan_9/plan9-syscalls, and the abi is the same as the c one. |
The page you linked describes the API provided by libc. What I'm looking for is the underlying ABI (application binary interface) provided by the kernel -- how the values are passed to/from kernel and what instructions to use to actually perform the system call. Taking your
|
Reading generated code from the c compiler (syscall abi is the same as c fncall abi)/playing around a LOT. I don't know if there is a manpage for the abi itself. |
Hi, I'm currently using Plan 9 (9front), is there anything I can do to help Plan 9 support along? |
Hello! |
The handling of register clobbering from syscalls in std/os/plan9/x86_64.zig seems to be incomplete. I've been working on partially porting musl to 9, and I found that it seems 9 makes no guarantees about saving the values of any registers on amd64 syscalls. I had to save all the relevant registers (https://git.sr.ht/~euclaise/cross9/tree/master/item/musl/p9/x86_64/sys9.s), saving only the ones that were saved here still left registers getting clobbered, although it's possible that I'm missing something. |
You are probably correct. I have not tested the syscalls extensively because the |
Plan 9 is caller-saves per my recollection.https://9p.io/sys/doc/compiler.htmlSent from my iPhoneOn Mar 5, 2023, at 4:58 PM, g-w1 ***@***.***> wrote:
You are probably correct. I have not tested the syscalls extensively because the x86_64 backend codegen is incomplete and was the bottleneck for me (it's been a few months since I last tried, so it may have gotten better).
Feel free to make a pull request fixing this if you want.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
https://9p.io/plan9/
The text was updated successfully, but these errors were encountered: