Skip to content

Commit 2ada72b

Browse files
committed
Split vcopyq_lane{q}_p64 due to vsetq_lane_p64 requiring aes
1 parent 962b1a6 commit 2ada72b

2 files changed

Lines changed: 37 additions & 4 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4618,7 +4618,7 @@ pub fn vcopyq_lane_p64<const LANE1: i32, const LANE2: i32>(
46184618
static_assert_uimm_bits!(LANE1, 1);
46194619
static_assert!(LANE2 == 0);
46204620
let b: poly64x2_t = vcombine_p64(b, b);
4621-
vsetq_lane_p64::<LANE1>(vgetq_lane_p64::<LANE2>(b), a)
4621+
unsafe { simd_insert!(a, LANE1 as u32, simd_extract!(b, LANE2 as u32, p64)) }
46224622
}
46234623
#[doc = "Insert vector element from another vector element"]
46244624
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcopyq_lane_s8)"]
@@ -5001,7 +5001,7 @@ pub fn vcopyq_laneq_p64<const LANE1: i32, const LANE2: i32>(
50015001
) -> poly64x2_t {
50025002
static_assert_uimm_bits!(LANE1, 1);
50035003
static_assert_uimm_bits!(LANE2, 1);
5004-
vsetq_lane_p64::<LANE1>(vgetq_lane_p64::<LANE2>(b), a)
5004+
unsafe { simd_insert!(a, LANE1 as u32, simd_extract!(b, LANE2 as u32, p64)) }
50055005
}
50065006
#[doc = "Insert vector element from another vector element"]
50075007
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcreate_f64)"]

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

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8856,14 +8856,30 @@ intrinsics:
88568856
- [uint64x2_t, uint64x2_t, uint64x2_t, '1', '1']
88578857
- [poly8x16_t, poly8x16_t, poly8x16_t, '4', '4']
88588858
- [poly16x8_t, poly16x8_t, poly16x8_t, '3', '3']
8859-
- [poly64x2_t, poly64x2_t, poly64x2_t, '1', '1']
88608859
- [float32x4_t, float32x4_t, float32x4_t, '2', '2']
88618860
- [float64x2_t, float64x2_t, float64x2_t, '1', '1']
88628861
compose:
88638862
- FnCall: [static_assert_uimm_bits!, [LANE1, '{type[3]}']]
88648863
- FnCall: [static_assert_uimm_bits!, [LANE2, '{type[4]}']]
88658864
- FnCall: ['vset{neon_type[0].lane_nox}', [{FnCall: ['vget{neon_type[1].lane_nox}', [b], [LANE2]]}, a], [LANE1]]
88668865

8866+
- name: "vcopy{neon_type[0].laneq_nox}"
8867+
doc: "Insert vector element from another vector element"
8868+
arguments: ["a: {neon_type[0]}", "b: {neon_type[1]}"]
8869+
return_type: "{neon_type[2]}"
8870+
attr:
8871+
- FnCall: [cfg_attr, [*all-test-little-endian, {FnCall: [assert_instr, [mov, 'LANE1 = 0', 'LANE2 = 0']]}]]
8872+
- FnCall: [rustc_legacy_const_generics, ['1', '3']]
8873+
- *neon-stable
8874+
static_defs: ['const LANE1: i32, const LANE2: i32']
8875+
safety: safe
8876+
types:
8877+
- [poly64x2_t, poly64x2_t, poly64x2_t, '1', '1']
8878+
compose:
8879+
- FnCall: [static_assert_uimm_bits!, [LANE1, '{type[3]}']]
8880+
- FnCall: [static_assert_uimm_bits!, [LANE2, '{type[4]}']]
8881+
- FnCall: [simd_insert!, [a, LANE1 as u32, {FnCall: [simd_extract!, [b, LANE2 as u32, p64]]}]]
8882+
88678883
- name: "vcopy{neon_type[0].laneq_nox}"
88688884
doc: "Insert vector element from another vector element"
88698885
arguments: ["a: {neon_type[0]}", "b: {neon_type[1]}"]
@@ -8902,14 +8918,31 @@ intrinsics:
89028918
types:
89038919
- [int64x2_t, int64x1_t]
89048920
- [uint64x2_t, uint64x1_t]
8905-
- [poly64x2_t, poly64x1_t]
89068921
- [float64x2_t, float64x1_t]
89078922
compose:
89088923
- FnCall: [static_assert_uimm_bits!, [LANE1, '1']]
89098924
- FnCall: [static_assert!, ['LANE2 == 0']]
89108925
- Let: [b, '{neon_type[0]}', {FnCall: ['vcombine{neon_type[1].no}', [b, b]]}]
89118926
- FnCall: ['vset{neon_type[0].lane_nox}', [{FnCall: ['vget{neon_type[0].lane_nox}', [b], [LANE2]]}, a], [LANE1]]
89128927

8928+
- name: "vcopyq_lane_{neon_type[0]}"
8929+
doc: "Insert vector element from another vector element"
8930+
arguments: ["a: {neon_type[0]}", "b: {neon_type[1]}"]
8931+
return_type: "{neon_type[0]}"
8932+
attr:
8933+
- FnCall: [cfg_attr, [*all-test-little-endian, {FnCall: [assert_instr, [mov, 'LANE1 = 1', 'LANE2 = 0']]}]]
8934+
- FnCall: [rustc_legacy_const_generics, ['1', '3']]
8935+
- *neon-stable
8936+
static_defs: ['const LANE1: i32, const LANE2: i32']
8937+
safety: safe
8938+
types:
8939+
- [poly64x2_t, poly64x1_t]
8940+
compose:
8941+
- FnCall: [static_assert_uimm_bits!, [LANE1, '1']]
8942+
- FnCall: [static_assert!, ['LANE2 == 0']]
8943+
- Let: [b, '{neon_type[0]}', {FnCall: ['vcombine{neon_type[1].no}', [b, b]]}]
8944+
- FnCall: [simd_insert!, [a, LANE1 as u32, {FnCall: [simd_extract!, [b, LANE2 as u32, p64]]}]]
8945+
89138946
- name: "vcopyq_lane_f32"
89148947
doc: "Insert vector element from another vector element"
89158948
arguments: ["a: {neon_type[0]}", "b: {neon_type[1]}"]

0 commit comments

Comments
 (0)