Skip to content

Commit 05ced9d

Browse files
authored
Merge pull request #2120 from lupodevelop/stabilize-neon-dotprod
Stabilize the `stdarch_neon_dotprod` feature
2 parents f722891 + 9f82c79 commit 05ced9d

2 files changed

Lines changed: 60 additions & 22 deletions

File tree

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

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9597,7 +9597,7 @@ pub fn vcvtq_u32_f32(a: float32x4_t) -> uint32x4_t {
95979597
#[rustc_legacy_const_generics(3)]
95989598
#[cfg_attr(
95999599
not(target_arch = "arm"),
9600-
unstable(feature = "stdarch_neon_dotprod", issue = "117224")
9600+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
96019601
)]
96029602
#[cfg_attr(
96039603
target_arch = "arm",
@@ -9622,7 +9622,7 @@ pub fn vdot_lane_s32<const LANE: i32>(a: int32x2_t, b: int8x8_t, c: int8x8_t) ->
96229622
#[rustc_legacy_const_generics(3)]
96239623
#[cfg_attr(
96249624
not(target_arch = "arm"),
9625-
unstable(feature = "stdarch_neon_dotprod", issue = "117224")
9625+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
96269626
)]
96279627
#[cfg_attr(
96289628
target_arch = "arm",
@@ -9647,7 +9647,7 @@ pub fn vdotq_lane_s32<const LANE: i32>(a: int32x4_t, b: int8x16_t, c: int8x8_t)
96479647
#[rustc_legacy_const_generics(3)]
96489648
#[cfg_attr(
96499649
not(target_arch = "arm"),
9650-
unstable(feature = "stdarch_neon_dotprod", issue = "117224")
9650+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
96519651
)]
96529652
#[cfg_attr(
96539653
target_arch = "arm",
@@ -9672,7 +9672,7 @@ pub fn vdot_lane_u32<const LANE: i32>(a: uint32x2_t, b: uint8x8_t, c: uint8x8_t)
96729672
#[rustc_legacy_const_generics(3)]
96739673
#[cfg_attr(
96749674
not(target_arch = "arm"),
9675-
unstable(feature = "stdarch_neon_dotprod", issue = "117224")
9675+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
96769676
)]
96779677
#[cfg_attr(
96789678
target_arch = "arm",
@@ -9695,7 +9695,14 @@ pub fn vdotq_lane_u32<const LANE: i32>(a: uint32x4_t, b: uint8x16_t, c: uint8x8_
96959695
assert_instr(sdot, LANE = 0)
96969696
)]
96979697
#[rustc_legacy_const_generics(3)]
9698-
#[unstable(feature = "stdarch_neon_dotprod", issue = "117224")]
9698+
#[cfg_attr(
9699+
not(target_arch = "arm"),
9700+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
9701+
)]
9702+
#[cfg_attr(
9703+
target_arch = "arm",
9704+
unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800")
9705+
)]
96999706
pub fn vdot_laneq_s32<const LANE: i32>(a: int32x2_t, b: int8x8_t, c: int8x16_t) -> int32x2_t {
97009707
static_assert_uimm_bits!(LANE, 2);
97019708
let c = vreinterpretq_s32_s8(c);
@@ -9713,7 +9720,14 @@ pub fn vdot_laneq_s32<const LANE: i32>(a: int32x2_t, b: int8x8_t, c: int8x16_t)
97139720
assert_instr(sdot, LANE = 0)
97149721
)]
97159722
#[rustc_legacy_const_generics(3)]
9716-
#[unstable(feature = "stdarch_neon_dotprod", issue = "117224")]
9723+
#[cfg_attr(
9724+
not(target_arch = "arm"),
9725+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
9726+
)]
9727+
#[cfg_attr(
9728+
target_arch = "arm",
9729+
unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800")
9730+
)]
97179731
pub fn vdotq_laneq_s32<const LANE: i32>(a: int32x4_t, b: int8x16_t, c: int8x16_t) -> int32x4_t {
97189732
static_assert_uimm_bits!(LANE, 2);
97199733
let c = vreinterpretq_s32_s8(c);
@@ -9731,7 +9745,14 @@ pub fn vdotq_laneq_s32<const LANE: i32>(a: int32x4_t, b: int8x16_t, c: int8x16_t
97319745
assert_instr(udot, LANE = 0)
97329746
)]
97339747
#[rustc_legacy_const_generics(3)]
9734-
#[unstable(feature = "stdarch_neon_dotprod", issue = "117224")]
9748+
#[cfg_attr(
9749+
not(target_arch = "arm"),
9750+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
9751+
)]
9752+
#[cfg_attr(
9753+
target_arch = "arm",
9754+
unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800")
9755+
)]
97359756
pub fn vdot_laneq_u32<const LANE: i32>(a: uint32x2_t, b: uint8x8_t, c: uint8x16_t) -> uint32x2_t {
97369757
static_assert_uimm_bits!(LANE, 2);
97379758
let c = vreinterpretq_u32_u8(c);
@@ -9749,7 +9770,14 @@ pub fn vdot_laneq_u32<const LANE: i32>(a: uint32x2_t, b: uint8x8_t, c: uint8x16_
97499770
assert_instr(udot, LANE = 0)
97509771
)]
97519772
#[rustc_legacy_const_generics(3)]
9752-
#[unstable(feature = "stdarch_neon_dotprod", issue = "117224")]
9773+
#[cfg_attr(
9774+
not(target_arch = "arm"),
9775+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
9776+
)]
9777+
#[cfg_attr(
9778+
target_arch = "arm",
9779+
unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800")
9780+
)]
97539781
pub fn vdotq_laneq_u32<const LANE: i32>(a: uint32x4_t, b: uint8x16_t, c: uint8x16_t) -> uint32x4_t {
97549782
static_assert_uimm_bits!(LANE, 2);
97559783
let c = vreinterpretq_u32_u8(c);
@@ -9769,7 +9797,7 @@ pub fn vdotq_laneq_u32<const LANE: i32>(a: uint32x4_t, b: uint8x16_t, c: uint8x1
97699797
)]
97709798
#[cfg_attr(
97719799
not(target_arch = "arm"),
9772-
unstable(feature = "stdarch_neon_dotprod", issue = "117224")
9800+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
97739801
)]
97749802
#[cfg_attr(
97759803
target_arch = "arm",
@@ -9799,7 +9827,7 @@ pub fn vdot_s32(a: int32x2_t, b: int8x8_t, c: int8x8_t) -> int32x2_t {
97999827
)]
98009828
#[cfg_attr(
98019829
not(target_arch = "arm"),
9802-
unstable(feature = "stdarch_neon_dotprod", issue = "117224")
9830+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
98039831
)]
98049832
#[cfg_attr(
98059833
target_arch = "arm",
@@ -9835,7 +9863,7 @@ pub fn vdot_s32(a: int32x2_t, b: int8x8_t, c: int8x8_t) -> int32x2_t {
98359863
)]
98369864
#[cfg_attr(
98379865
not(target_arch = "arm"),
9838-
unstable(feature = "stdarch_neon_dotprod", issue = "117224")
9866+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
98399867
)]
98409868
#[cfg_attr(
98419869
target_arch = "arm",
@@ -9865,7 +9893,7 @@ pub fn vdotq_s32(a: int32x4_t, b: int8x16_t, c: int8x16_t) -> int32x4_t {
98659893
)]
98669894
#[cfg_attr(
98679895
not(target_arch = "arm"),
9868-
unstable(feature = "stdarch_neon_dotprod", issue = "117224")
9896+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
98699897
)]
98709898
#[cfg_attr(
98719899
target_arch = "arm",
@@ -9903,7 +9931,7 @@ pub fn vdotq_s32(a: int32x4_t, b: int8x16_t, c: int8x16_t) -> int32x4_t {
99039931
)]
99049932
#[cfg_attr(
99059933
not(target_arch = "arm"),
9906-
unstable(feature = "stdarch_neon_dotprod", issue = "117224")
9934+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
99079935
)]
99089936
#[cfg_attr(
99099937
target_arch = "arm",
@@ -9933,7 +9961,7 @@ pub fn vdot_u32(a: uint32x2_t, b: uint8x8_t, c: uint8x8_t) -> uint32x2_t {
99339961
)]
99349962
#[cfg_attr(
99359963
not(target_arch = "arm"),
9936-
unstable(feature = "stdarch_neon_dotprod", issue = "117224")
9964+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
99379965
)]
99389966
#[cfg_attr(
99399967
target_arch = "arm",
@@ -9969,7 +9997,7 @@ pub fn vdot_u32(a: uint32x2_t, b: uint8x8_t, c: uint8x8_t) -> uint32x2_t {
99699997
)]
99709998
#[cfg_attr(
99719999
not(target_arch = "arm"),
9972-
unstable(feature = "stdarch_neon_dotprod", issue = "117224")
10000+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
997310001
)]
997410002
#[cfg_attr(
997510003
target_arch = "arm",
@@ -9999,7 +10027,7 @@ pub fn vdotq_u32(a: uint32x4_t, b: uint8x16_t, c: uint8x16_t) -> uint32x4_t {
999910027
)]
1000010028
#[cfg_attr(
1000110029
not(target_arch = "arm"),
10002-
unstable(feature = "stdarch_neon_dotprod", issue = "117224")
10030+
stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")
1000310031
)]
1000410032
#[cfg_attr(
1000510033
target_arch = "arm",

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

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ neon-stable: &neon-stable
1414
neon-stable-fp16: &neon-stable-fp16
1515
FnCall: [stable, ['feature = "stdarch_neon_fp16"', 'since = "1.94.0"']]
1616

17+
# #[stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION")]
18+
neon-stable-dotprod: &neon-stable-dotprod
19+
FnCall: [stable, ['feature = "stdarch_neon_dotprod"', 'since = "CURRENT_RUSTC_VERSION"']]
20+
1721
# #[cfg_attr(target_arch = "arm", unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800"))]
1822
neon-cfg-arm-unstable: &neon-cfg-arm-unstable
1923
FnCall: ['cfg_attr', ['target_arch = "arm"', {FnCall: ['unstable', ['feature = "stdarch_arm_neon_intrinsics"', 'issue = "111800"']]}]]
@@ -59,6 +63,10 @@ neon-not-arm-stable: &neon-not-arm-stable
5963
neon-not-arm-stable-fp16: &neon-not-arm-stable-fp16
6064
FnCall: [cfg_attr, [{ FnCall: [not, ['target_arch = "arm"']]}, {FnCall: [stable, ['feature = "stdarch_neon_fp16"', 'since = "1.94.0"']]}]]
6165

66+
# #[cfg_attr(not(target_arch = "arm"), stable(feature = "stdarch_neon_dotprod", since = "CURRENT_RUSTC_VERSION"))]
67+
neon-not-arm-stable-dotprod: &neon-not-arm-stable-dotprod
68+
FnCall: [cfg_attr, [{ FnCall: [not, ['target_arch = "arm"']]}, {FnCall: [stable, ['feature = "stdarch_neon_dotprod"', 'since = "CURRENT_RUSTC_VERSION"']]}]]
69+
6270
# #[cfg_attr(all(test, not(target_env = "msvc"))]
6371
msvc-disabled: &msvc-disabled
6472
FnCall: [all, [test, {FnCall: [not, ['target_env = "msvc"']]}]]
@@ -7033,7 +7041,8 @@ intrinsics:
70337041
- FnCall: [cfg_attr, [*test-is-arm, {FnCall: [assert_instr, [vsdot, 'LANE = 0']]}]]
70347042
- FnCall: [cfg_attr, [*neon-target-aarch64-arm64ec, {FnCall: [assert_instr, [sdot, 'LANE = 0']]}]]
70357043
- FnCall: [rustc_legacy_const_generics, ['3']]
7036-
- FnCall: [unstable, ['feature = "stdarch_neon_dotprod"', 'issue = "117224"']]
7044+
- *neon-not-arm-stable-dotprod
7045+
- *neon-cfg-arm-unstable
70377046
safety: safe
70387047
types:
70397048
- [int32x2_t, int8x8_t, int8x16_t, '']
@@ -7063,7 +7072,8 @@ intrinsics:
70637072
- FnCall: [cfg_attr, [*test-is-arm, {FnCall: [assert_instr, [vudot, 'LANE = 0']]}]]
70647073
- FnCall: [cfg_attr, [*neon-target-aarch64-arm64ec, {FnCall: [assert_instr, [udot, 'LANE = 0']]}]]
70657074
- FnCall: [rustc_legacy_const_generics, ['3']]
7066-
- FnCall: [unstable, ['feature = "stdarch_neon_dotprod"', 'issue = "117224"']]
7075+
- *neon-not-arm-stable-dotprod
7076+
- *neon-cfg-arm-unstable
70677077
safety: safe
70687078
types:
70697079
- [uint32x2_t, uint8x8_t, uint8x16_t, '']
@@ -7091,7 +7101,7 @@ intrinsics:
70917101
- FnCall: [target_feature, ['enable = "neon,dotprod"']]
70927102
- FnCall: [cfg_attr, [*test-is-arm, {FnCall: [assert_instr, [vsdot]]}]]
70937103
- FnCall: [cfg_attr, [*neon-target-aarch64-arm64ec, {FnCall: [assert_instr, [sdot]]}]]
7094-
- FnCall: [cfg_attr, [{FnCall: [not, ['target_arch = "arm"']]}, {FnCall: [unstable, ['feature = "stdarch_neon_dotprod"', 'issue = "117224"']]}]]
7104+
- *neon-not-arm-stable-dotprod
70957105
- *neon-cfg-arm-unstable
70967106
safety: safe
70977107
big_endian_inverse: true
@@ -7116,7 +7126,7 @@ intrinsics:
71167126
- FnCall: [target_feature, ['enable = "neon,dotprod"']]
71177127
- FnCall: [cfg_attr, [*test-is-arm, {FnCall: [assert_instr, [vudot]]}]]
71187128
- FnCall: [cfg_attr, [*neon-target-aarch64-arm64ec, {FnCall: [assert_instr, [udot]]}]]
7119-
- FnCall: [cfg_attr, [{FnCall: [not, ['target_arch = "arm"']]}, {FnCall: [unstable, ['feature = "stdarch_neon_dotprod"', 'issue = "117224"']]}]]
7129+
- *neon-not-arm-stable-dotprod
71207130
- *neon-cfg-arm-unstable
71217131
safety: safe
71227132
big_endian_inverse: true
@@ -7143,7 +7153,7 @@ intrinsics:
71437153
- FnCall: [cfg_attr, [*test-is-arm, {FnCall: [assert_instr, [vsdot, 'LANE = 0']]}]]
71447154
- FnCall: [cfg_attr, [*neon-target-aarch64-arm64ec, {FnCall: [assert_instr, [sdot, 'LANE = 0']]}]]
71457155
- FnCall: [rustc_legacy_const_generics, ['3']]
7146-
- FnCall: [cfg_attr, [{FnCall: [not, ['target_arch = "arm"']]}, {FnCall: [unstable, ['feature = "stdarch_neon_dotprod"', 'issue = "117224"']]}]]
7156+
- *neon-not-arm-stable-dotprod
71477157
- *neon-cfg-arm-unstable
71487158
safety: safe
71497159
types:
@@ -7174,7 +7184,7 @@ intrinsics:
71747184
- FnCall: [cfg_attr, [*test-is-arm, {FnCall: [assert_instr, [vudot, 'LANE = 0']]}]]
71757185
- FnCall: [cfg_attr, [*neon-target-aarch64-arm64ec, {FnCall: [assert_instr, [udot, 'LANE = 0']]}]]
71767186
- FnCall: [rustc_legacy_const_generics, ['3']]
7177-
- FnCall: [cfg_attr, [{FnCall: [not, ['target_arch = "arm"']]}, {FnCall: [unstable, ['feature = "stdarch_neon_dotprod"', 'issue = "117224"']]}]]
7187+
- *neon-not-arm-stable-dotprod
71787188
- *neon-cfg-arm-unstable
71797189
safety: safe
71807190
types:

0 commit comments

Comments
 (0)