Skip to content
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 support for LoongArch64 #17

Merged
merged 1 commit into from Aug 23, 2023
Merged

Add support for LoongArch64 #17

merged 1 commit into from Aug 23, 2023

Conversation

heiher
Copy link
Contributor

@heiher heiher commented May 5, 2023

This PR is depends on the stable inline asm to unblock builds. All tests and benchmarks are passed. We will add CI support after LoongArch64 is promoted to Tier 2.

@workingjubilee
Copy link

If Amanieu was willing, a new feature for nightly-only asm! architectures could be added to this crate. It would look like adding this to the top of lib.rs:

#![cfg_attr(feature = "nightly-arch", feature(asm_experimental_arch))]

and this to Cargo.toml, under [features]:

# enable experimental nightly features
nightly-arch = []

And then gating mod loongarch behind #[cfg(feature = "nightly-arch")], with perhaps a bit more effort to make the tests work.

Of course, I am not Amanieu, so I do not know if he is willing. However, it seemed better to suggest it as an alternative to waiting for the stabilization timeframe to elapse, as that might prove longer than desired. My apologies if it is not a welcome suggestion.

Copy link
Owner

@Amanieu Amanieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall!

For CI support, my recommendation would be to add a loongarch target to cross which works for Tier 3 targets.

Regarding inline asm, I think it's fine to wait for it to become stable since it's not too far off. If you need support sooner, I'm also happy to add it under an optional feature like @workingjubilee suggests.

src/arch/loongarch64.rs Outdated Show resolved Hide resolved
@heiher heiher marked this pull request as draft May 7, 2023 02:06
src/arch/loongarch64.rs Outdated Show resolved Hide resolved
src/arch/loongarch64.rs Outdated Show resolved Hide resolved
@syrusakbary
Copy link
Contributor

Hey @Amanieu, could it be possible to get this reviewed/merged soon? Thanks!

@Amanieu
Copy link
Owner

Amanieu commented Aug 22, 2023

@heiher This PR is still marked as a draft, but I believe it is ready for review?

@heiher
Copy link
Contributor Author

heiher commented Aug 23, 2023

@heiher This PR is still marked as a draft, but I believe it is ready for review?

Nice!

@heiher heiher marked this pull request as ready for review August 23, 2023 01:19
@Amanieu Amanieu merged commit 932e24c into Amanieu:master Aug 23, 2023
11 of 19 checks passed
@Amanieu
Copy link
Owner

Amanieu commented Aug 23, 2023

Published.

@heiher
Copy link
Contributor Author

heiher commented Aug 23, 2023

Published.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants