Skip to content

Commit 3f5efb1

Browse files
committed
bugfix in asm
1 parent 180c1f4 commit 3f5efb1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/asm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ mod hypervisor_extension {
8888
match () {
8989
#[cfg(all(riscv, feature = "inline-asm"))]
9090
// Since LLVM does not recognize the two registers, we assume they are placed in a0 and a1, correspondingly.
91-
() => llvm_asm!($asm ::"{a0}"(rs1),"{a1}"(rs2):: "volatile"),
91+
() => llvm_asm!($asm ::"{x10}"(rs1),"{x11}"(rs2):: "volatile"),
9292

9393
#[cfg(all(riscv, not(feature = "inline-asm")))]
9494
() => {
@@ -113,7 +113,7 @@ mod hypervisor_extension {
113113
#[cfg(all(riscv, feature = "inline-asm"))]
114114
() => {
115115
let mut result : usize;
116-
llvm_asm!($asm :"={a0}"(result):"{a0}"(rs1):: "volatile");
116+
llvm_asm!($asm :"={x10}"(result):"{x10}"(rs1):: "volatile");
117117
return result;
118118
}
119119

0 commit comments

Comments
 (0)