-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-riscvTarget: RISC-V architectureTarget: RISC-V architectureT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I'm trying to use Rust to compile the riscv H extension instructions, but an error occurred during compilation, The Rust target I am using is riscv64gc-unknown-none-elf. When I use rustc --print target-features --target riscv64gc-unknown-none-elf
command to check, I found information about the H extension:
h - 'H' (Hypervisor).
Subsequently, I added the following instruction to the compile command:
LOG=debug cargo rustc --release --features "libax/platform-qemu-virt-riscv libax/log-level-debug libax/alloc libax/hv libax/paging libax/irq" --manifest-path=hv/Cargo.toml -- -Ctarget-feature=+h -Clink-arg=-Thvruntime/src/linker.ld -Cforce-frame-pointers=yes
However, the compilation error remains unresolved:
error: instruction requires the following: 'H' (Hypervisor)
hsv.b t3, (a0)
What is causing this issue? And my target is specified in .cargo/config.toml
and my rustc version is rustc 1.71.0-nightly (2f2c438dc 2023-05-08)
.
Meta
rustc --version --verbose
rustc 1.71.0-nightly (2f2c438dc 2023-05-08)
binary: rustc
commit-hash: 2f2c438dce75d8cc532c3baa849eeddc0901802c
commit-date: 2023-05-08
host: aarch64-apple-darwin
release: 1.71.0-nightly
LLVM version: 16.0.2
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-riscvTarget: RISC-V architectureTarget: RISC-V architectureT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.