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

Build and test for RISC-V #870

Merged
merged 8 commits into from
Apr 24, 2024
Merged

Build and test for RISC-V #870

merged 8 commits into from
Apr 24, 2024

Conversation

thedataking
Copy link
Collaborator

@thedataking thedataking commented Mar 20, 2024

Build for QEMU user with:

RUSTFLAGS="-C target-feature=+crt-static,+v -C linker=riscv64-linux-gnu-gcc"  \
    cargo build --target riscv64gc-unknown-linux-gnu

(Note to self: remove ,+v in above command to test RISC-V sans assembly.)

Note: the above command seems to work on Ubuntu 22.04 which comes with ld version 2.38 but fail on Ubuntu 20.04 where ld is version 2.34.

@thedataking thedataking force-pushed the perl/risc-v-papercuts branch 3 times, most recently from 57ecd53 to 543fc93 Compare March 20, 2024 11:09
@randomPoison randomPoison added enhancement New feature or request and removed enhancement New feature or request labels Mar 20, 2024
@thedataking thedataking force-pushed the perl/risc-v-papercuts branch 2 times, most recently from f264a54 to b4b853c Compare March 20, 2024 23:47
src/decode.rs Outdated Show resolved Hide resolved
build.rs Outdated Show resolved Hide resolved
src/cpu.rs Show resolved Hide resolved
@thedataking thedataking marked this pull request as ready for review March 26, 2024 11:33
build.rs Outdated Show resolved Hide resolved
src/cpu.rs Outdated Show resolved Hide resolved
@thedataking thedataking force-pushed the perl/risc-v-papercuts branch 3 times, most recently from 4e03713 to d4d5128 Compare April 24, 2024 02:36
@kkysen kkysen self-assigned this Apr 24, 2024
@kkysen kkysen self-requested a review April 24, 2024 05:34
Copy link
Collaborator

@kkysen kkysen left a comment

Choose a reason for hiding this comment

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

Everything LGTM now except for in fn compile_time_detect, the cfg needs to be #[cfg(target_feature = "v")] because that fn is specifically for compile-time detection of features. As you can see, we similarly do #[cfg(target_feature = "neon")] for CpuFlags::NEON.

HecaiYuan and others added 8 commits April 23, 2024 23:49
For now the only CPU flag we check for is RISC-V Vector extension (RVV).
This updates the cpumask and help text in dav1d_cli_parse.rs but
does not add support for the underlying riscv assembly routines.
Removes warnings while the RISC-V code paths do not support asm.
Once assembly routines are added, we will want to gradually add
the items configured out in this commit back in.
@thedataking thedataking merged commit d4c6cc8 into main Apr 24, 2024
21 checks passed
@thedataking thedataking deleted the perl/risc-v-papercuts branch April 24, 2024 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants