Skip to content

Commit f7266e8

Browse files
committed
make vld4q portable
1 parent 5c1c65d commit f7266e8

3 files changed

Lines changed: 8 additions & 27 deletions

File tree

aarch64-miri-tests.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
test_vld3q
1+
test_vld3
2+
test_vld4
23
neon::load_tests
34
neon::store_tests

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

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12521,14 +12521,7 @@ pub unsafe fn vld4q_dup_u64(a: *const u64) -> uint64x2x4_t {
1252112521
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1252212522
#[cfg_attr(test, assert_instr(ld4))]
1252312523
pub unsafe fn vld4q_f64(a: *const f64) -> float64x2x4_t {
12524-
unsafe extern "unadjusted" {
12525-
#[cfg_attr(
12526-
any(target_arch = "aarch64", target_arch = "arm64ec"),
12527-
link_name = "llvm.aarch64.neon.ld4.v2f64.p0"
12528-
)]
12529-
fn _vld4q_f64(ptr: *const float64x2_t) -> float64x2x4_t;
12530-
}
12531-
_vld4q_f64(a as _)
12524+
crate::core_arch::macros::deinterleaving_load!(f64, 2, 4, a)
1253212525
}
1253312526
#[doc = "Load multiple 4-element structures to four registers"]
1253412527
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vld4q_s64)"]
@@ -12539,14 +12532,7 @@ pub unsafe fn vld4q_f64(a: *const f64) -> float64x2x4_t {
1253912532
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1254012533
#[cfg_attr(test, assert_instr(ld4))]
1254112534
pub unsafe fn vld4q_s64(a: *const i64) -> int64x2x4_t {
12542-
unsafe extern "unadjusted" {
12543-
#[cfg_attr(
12544-
any(target_arch = "aarch64", target_arch = "arm64ec"),
12545-
link_name = "llvm.aarch64.neon.ld4.v2i64.p0"
12546-
)]
12547-
fn _vld4q_s64(ptr: *const int64x2_t) -> int64x2x4_t;
12548-
}
12549-
_vld4q_s64(a as _)
12535+
crate::core_arch::macros::deinterleaving_load!(i64, 2, 4, a)
1255012536
}
1255112537
#[doc = "Load multiple 4-element structures to four registers"]
1255212538
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vld4q_lane_f64)"]

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4167,17 +4167,11 @@ intrinsics:
41674167
safety:
41684168
unsafe: [neon]
41694169
types:
4170-
- ['*const f64', float64x2x4_t, f64, '*const float64x2_t']
4171-
- ['*const i64', int64x2x4_t, i64, '*const int64x2_t']
4170+
- ['*const f64', float64x2x4_t, f64, "2"]
4171+
- ['*const i64', int64x2x4_t, i64, "2"]
41724172
compose:
4173-
- LLVMLink:
4174-
name: 'vld4{neon_type[1].nox}'
4175-
arguments:
4176-
- 'ptr: {type[3]}'
4177-
links:
4178-
- link: 'llvm.aarch64.neon.ld4.v{neon_type[1].lane}{type[2]}.p0'
4179-
arch: aarch64,arm64ec
4180-
- FnCall: ['_vld4{neon_type[1].nox}', ['a as _']]
4173+
- FnCall: ["crate::core_arch::macros::deinterleaving_load!", [{ Type: "{type[2]}" }, "{type[3]}", "4", a], [], true]
4174+
41814175

41824176
- name: "vld4{neon_type[1].nox}"
41834177
doc: Load multiple 4-element structures to four registers

0 commit comments

Comments
 (0)