-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add loongarch64 support #53
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! I'm very skeptical that we actually need the 7 argument syscall at all. I did a little searching through the Linux kernel and didn't find a single syscall that takes 7 arguments (for any architecture). Am I missing something? I know that man syscall(2)
says this architecture can have 7 arguments, but I don't see that actually happening in practice (in the Linux kernel). Is this a relic of old kernel versions?
I'd like to keep SyscallArgs
at 6 arguments, since this is the common case. If I'm wrong about there not being a real life 7 argument syscall, then I would only expose it via a direct call to syscall7
.
Also, it looks like loongarch64-unknown-linux-gnu
is supported by cross-rs. Can you try to enable it in .github/workflows/ci.yml
?
NOTE: The CI failures for thumb mode are unrelated to this PR. It looks like a recent Rust version broke this. |
I found that for now there is no macro for defining 7-arg syscall Will redo and force loongarch to not using syscall7 |
Looks like the loongarch64 CI linker failure is an issue with cross-rs. I suspect this is just because the CI for this repo is using an outdated version of cross-rs as I see there have been some recent fixes for loongarch64.
If you don't want to solve this issue, then I'm okay with simply having it disabled for now. |
On my loongarch64 machine and cross 0.2.5 (on x86 with loongarch64 toolchain) compiles just fine. I'll look if I can update ci cross version |
After installing rust from rustup everything started failing as in CI. Cross version is the same (0.2.5). I think the main cause of the error is this warning:
|
Found the problem. Right now cross version from |
PR implementing loongarch64 support
Tested on loongarch64 rust 1.80.0
Builds with debug and release flags
Passes all the tests with debug and release flags
Notes to maintainer:
clobber_abi
because it clobbers more than we needMight be useful: