Skip to content

Commit 807c968

Browse files
sayantnAmanieu
authored andcommitted
Fix ldpte and lddir signature
- The 2nd argument of the LLVM intrinsic should be IMMARG
1 parent d93948e commit 807c968

File tree

1 file changed

+6
-4
lines changed
  • crates/core_arch/src/loongarch64

1 file changed

+6
-4
lines changed

crates/core_arch/src/loongarch64/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,16 +329,18 @@ pub unsafe fn asrtgt(a: i64, b: i64) {
329329

330330
/// Loads the page table directory entry
331331
#[inline]
332+
#[rustc_legacy_const_generics(1)]
332333
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
333-
pub unsafe fn lddir(a: i64, b: i64) -> i64 {
334-
__lddir(a, b)
334+
pub unsafe fn lddir<const B: i64>(a: i64) -> i64 {
335+
__lddir(a, B)
335336
}
336337

337338
/// Loads the page table entry
338339
#[inline]
340+
#[rustc_legacy_const_generics(1)]
339341
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
340-
pub unsafe fn ldpte(a: i64, b: i64) {
341-
__ldpte(a, b)
342+
pub unsafe fn ldpte<const B: i64>(a: i64) {
343+
__ldpte(a, B)
342344
}
343345

344346
/// Calculate the approximate single-precision result of 1.0 divided

0 commit comments

Comments
 (0)