about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsayantn <sayantn05@gmail.com>2025-05-28 02:04:34 +0530
committerAmanieu d'Antras <amanieu@gmail.com>2025-05-30 18:02:17 +0000
commit79654521eeab8b6e4af054e6fe7190c2e2e620b8 (patch)
tree0728e14b97c85a5200794f51b02cdee6ee0d9415
parenta4a7184370b0efaf36a8a87b7421c8530040375d (diff)
downloadrust-79654521eeab8b6e4af054e6fe7190c2e2e620b8.tar.gz
rust-79654521eeab8b6e4af054e6fe7190c2e2e620b8.zip
Fix `ldpte` and `lddir` signature
 - The 2nd argument of the LLVM intrinsic should be IMMARG
-rw-r--r--library/stdarch/crates/core_arch/src/loongarch64/mod.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/library/stdarch/crates/core_arch/src/loongarch64/mod.rs b/library/stdarch/crates/core_arch/src/loongarch64/mod.rs
index ed4bcc06f7c..b1704bbb48d 100644
--- a/library/stdarch/crates/core_arch/src/loongarch64/mod.rs
+++ b/library/stdarch/crates/core_arch/src/loongarch64/mod.rs
@@ -329,16 +329,18 @@ pub unsafe fn asrtgt(a: i64, b: i64) {
 
 /// Loads the page table directory entry
 #[inline]
+#[rustc_legacy_const_generics(1)]
 #[unstable(feature = "stdarch_loongarch", issue = "117427")]
-pub unsafe fn lddir(a: i64, b: i64) -> i64 {
-    __lddir(a, b)
+pub unsafe fn lddir<const B: i64>(a: i64) -> i64 {
+    __lddir(a, B)
 }
 
 /// Loads the page table entry
 #[inline]
+#[rustc_legacy_const_generics(1)]
 #[unstable(feature = "stdarch_loongarch", issue = "117427")]
-pub unsafe fn ldpte(a: i64, b: i64) {
-    __ldpte(a, b)
+pub unsafe fn ldpte<const B: i64>(a: i64) {
+    __ldpte(a, B)
 }
 
 /// Calculate the approximate single-precision result of 1.0 divided