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

is there a plan to add armv7 support to cpufeatures? #850

Open
x3ccd4828 opened this issue Mar 18, 2023 · 7 comments
Open

is there a plan to add armv7 support to cpufeatures? #850

x3ccd4828 opened this issue Mar 18, 2023 · 7 comments

Comments

@x3ccd4828
Copy link

No description provided.

@x3ccd4828 x3ccd4828 changed the title is there a plan to add armv7 support? is there a plan to add armv7 support to cpufeatures? Mar 18, 2023
@tarcieri
Copy link
Member

We can potentially add it. Is there a specific feature you're interested in?

@x3ccd4828
Copy link
Author

I was trying to compile lighthouse (https://github.com/sigp/lighthouse) for armv7 target and the compile halts because of the requirement. I haven't had a chance to look into what that project needs from cpufeatures or how it's used.

I was looking around cpufeatures how to add armv7 but without any features just to allow the target compile to not fail. Is there somewhere, in particular, I should look?

@tarcieri
Copy link
Member

If cpufeatures is breaking builds, it's being misused.

It should only be used on CPU architectures where it's supported, specifically for detecting architecture-specific features, like this:

https://github.com/RustCrypto/block-ciphers/blob/48242cc/aes/Cargo.toml#L19-L20

@x3ccd4828
Copy link
Author

x3ccd4828 commented Mar 19, 2023 via email

@tarcieri
Copy link
Member

The existing ARM code needs to be extended to ARMv7.

It should hopefully be relatively straightforward, although all of the current supported instructions on ARM are ARMv8-specific, so those need to be disabled on ARMv7 targets.

It would probably make sense to implement at least one instruction that can be detected. You could do neon, which would always be auto-enabled on ARMv8 targets.

@x3ccd4828
Copy link
Author

x3ccd4828 commented Mar 19, 2023 via email

@tarcieri
Copy link
Member

See #403 as a previous attempt at neon feature detection

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

No branches or pull requests

2 participants