Skip to content

Commit 0ea7bce

Browse files
committed
在标准库中集成了代码生成器的sve.rs,支持了更多Intrinsics
1 parent 593cf1f commit 0ea7bce

File tree

3 files changed

+42331
-6475
lines changed

3 files changed

+42331
-6475
lines changed

library/stdarch/crates/core_arch/src/aarch64/sve/mod.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -309,17 +309,12 @@ pub use types::*;
309309

310310
// a) 外部内建
311311
unsafe extern "C" {
312-
#[link_name = "llvm.aarch64.sve.cntw"]
313-
fn __llvm_sve_cntw() -> i32;
314-
315312
#[link_name = "llvm.aarch64.sve.whilelt"]
316313
fn __llvm_sve_whilelt_i32(i: i32, n: i32) -> svbool_t;
317314
}
318315

319316
// b) 对外 API
320-
#[inline]
321-
#[target_feature(enable = "sve")]
322-
pub unsafe fn svcntw() -> i32 { __llvm_sve_cntw() }
317+
// 注意:svcntw() 函数在 sve.rs 中定义,使用正确的 LLVM 内建函数签名
323318

324319
#[inline]
325320
#[target_feature(enable = "sve")]

0 commit comments

Comments
 (0)