Skip to content

Commit 4ebde94

Browse files
committed
portable ld2 of i64/f64
1 parent ba9888c commit 4ebde94

2 files changed

Lines changed: 5 additions & 28 deletions

File tree

crates/core_arch/src/aarch64/neon/generated.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11741,14 +11741,7 @@ pub unsafe fn vld2q_dup_u64(a: *const u64) -> uint64x2x2_t {
1174111741
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1174211742
#[cfg_attr(test, assert_instr(ld2))]
1174311743
pub unsafe fn vld2q_f64(a: *const f64) -> float64x2x2_t {
11744-
unsafe extern "unadjusted" {
11745-
#[cfg_attr(
11746-
any(target_arch = "aarch64", target_arch = "arm64ec"),
11747-
link_name = "llvm.aarch64.neon.ld2.v2f64.p0"
11748-
)]
11749-
fn _vld2q_f64(ptr: *const float64x2_t) -> float64x2x2_t;
11750-
}
11751-
_vld2q_f64(a as _)
11744+
crate::core_arch::macros::deinterleaving_load!(f64, 2, 2, a)
1175211745
}
1175311746
#[doc = "Load multiple 2-element structures to two registers"]
1175411747
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vld2q_s64)"]
@@ -11759,14 +11752,7 @@ pub unsafe fn vld2q_f64(a: *const f64) -> float64x2x2_t {
1175911752
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1176011753
#[cfg_attr(test, assert_instr(ld2))]
1176111754
pub unsafe fn vld2q_s64(a: *const i64) -> int64x2x2_t {
11762-
unsafe extern "unadjusted" {
11763-
#[cfg_attr(
11764-
any(target_arch = "aarch64", target_arch = "arm64ec"),
11765-
link_name = "llvm.aarch64.neon.ld2.v2i64.p0"
11766-
)]
11767-
fn _vld2q_s64(ptr: *const int64x2_t) -> int64x2x2_t;
11768-
}
11769-
_vld2q_s64(a as _)
11755+
crate::core_arch::macros::deinterleaving_load!(i64, 2, 2, a)
1177011756
}
1177111757
#[doc = "Load multiple 2-element structures to two registers"]
1177211758
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vld2q_lane_f64)"]

crates/stdarch-gen-arm/spec/neon/aarch64.spec.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3674,19 +3674,10 @@ intrinsics:
36743674
safety:
36753675
unsafe: [neon]
36763676
types:
3677-
- ["*const f64", float64x2x2_t, f64, float64x2_t]
3678-
- ["*const i64", int64x2x2_t, i64, int64x2_t]
3677+
- ["*const f64", float64x2x2_t, f64, "2"]
3678+
- ["*const i64", int64x2x2_t, i64, "2"]
36793679
compose:
3680-
- LLVMLink:
3681-
name: "vld2.{neon_type[1]}"
3682-
arguments:
3683-
- "ptr: *const {neon_type[3]}"
3684-
links:
3685-
- link: "llvm.aarch64.neon.ld2.v{neon_type[1].lane}{type[2]}.p0"
3686-
arch: aarch64,arm64ec
3687-
- FnCall:
3688-
- "_vld2{neon_type[1].nox}"
3689-
- - "a as _"
3680+
- FnCall: ["crate::core_arch::macros::deinterleaving_load!", [{ Type: "{type[2]}" }, "{type[3]}", "2", a], [], true]
36903681

36913682
- name: "vld2{neon_type[1].nox}"
36923683
doc: Load multiple 2-element structures to two registers

0 commit comments

Comments
 (0)