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

cranelift: Native feature detection for RISC-V #5044

Merged
merged 2 commits into from
Oct 11, 2022

Conversation

afonso360
Copy link
Contributor

@afonso360 afonso360 commented Oct 11, 2022

👋 Hey,

This PR enables native feature detection for RISC-V. We use the same mechanisms as S390X namely HW_CAP to query extensions. This also changes the testrunner to run tests based on capabilities instead of assuming they'll be there.

Not all extensions are supported by this method, so we ignore those. Fortunately none of them seem to be used by tests in our test suite.

cc: @yuyang-ok @cfallin

@afonso360 afonso360 force-pushed the riscv-feature-detect branch from 0e81662 to 858dff9 Compare October 11, 2022 17:08
@github-actions github-actions bot added the cranelift Issues related to the Cranelift code generator label Oct 11, 2022
Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

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

Thanks!

One question about the test-compatibility predicate below, otherwise looks good.

cranelift/native/src/lib.rs Outdated Show resolved Hide resolved
cranelift/filetests/src/test_run.rs Show resolved Hide resolved
@cfallin cfallin enabled auto-merge (squash) October 11, 2022 18:49
@cfallin cfallin merged commit 86331b9 into bytecodealliance:main Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants