Skip to content

Commit 45dcf31

Browse files
committed
test a few stabilization and correct some assert_instr
1 parent f4513d5 commit 45dcf31

File tree

8 files changed

+34
-20
lines changed

8 files changed

+34
-20
lines changed

crates/core_arch/src/aarch64/crc.rs

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use stdarch_test::assert_instr;
1313
#[inline]
1414
#[target_feature(enable = "crc")]
1515
#[cfg_attr(test, assert_instr(crc32x))]
16+
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1617
pub unsafe fn __crc32d(crc: u32, data: u64) -> u32 {
1718
crc32x_(crc, data)
1819
}
@@ -21,6 +22,7 @@ pub unsafe fn __crc32d(crc: u32, data: u64) -> u32 {
2122
#[inline]
2223
#[target_feature(enable = "crc")]
2324
#[cfg_attr(test, assert_instr(crc32cx))]
25+
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
2426
pub unsafe fn __crc32cd(crc: u32, data: u64) -> u32 {
2527
crc32cx_(crc, data)
2628
}

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -11899,7 +11899,7 @@ pub unsafe fn vsha512su1q_u64(a: uint64x2_t, b: uint64x2_t, c: uint64x2_t) -> ui
1189911899
/// Floating-point round to 32-bit integer, using current rounding mode
1190011900
#[inline]
1190111901
#[target_feature(enable = "neon,frintts")]
11902-
#[cfg_attr(test, assert_instr(frint32x))]
11902+
#[cfg_attr(test, assert_instr(nop))]
1190311903
pub unsafe fn vrnd32x_f32(a: float32x2_t) -> float32x2_t {
1190411904
#[allow(improper_ctypes)]
1190511905
extern "unadjusted" {
@@ -11912,7 +11912,7 @@ pub unsafe fn vrnd32x_f32(a: float32x2_t) -> float32x2_t {
1191211912
/// Floating-point round to 32-bit integer, using current rounding mode
1191311913
#[inline]
1191411914
#[target_feature(enable = "neon,frintts")]
11915-
#[cfg_attr(test, assert_instr(frint32x))]
11915+
#[cfg_attr(test, assert_instr(nop))]
1191611916
pub unsafe fn vrnd32xq_f32(a: float32x4_t) -> float32x4_t {
1191711917
#[allow(improper_ctypes)]
1191811918
extern "unadjusted" {
@@ -11925,7 +11925,7 @@ pub unsafe fn vrnd32xq_f32(a: float32x4_t) -> float32x4_t {
1192511925
/// Floating-point round to 32-bit integer toward zero
1192611926
#[inline]
1192711927
#[target_feature(enable = "neon,frintts")]
11928-
#[cfg_attr(test, assert_instr(frint32z))]
11928+
#[cfg_attr(test, assert_instr(nop))]
1192911929
pub unsafe fn vrnd32z_f32(a: float32x2_t) -> float32x2_t {
1193011930
#[allow(improper_ctypes)]
1193111931
extern "unadjusted" {
@@ -11938,7 +11938,7 @@ pub unsafe fn vrnd32z_f32(a: float32x2_t) -> float32x2_t {
1193811938
/// Floating-point round to 32-bit integer toward zero
1193911939
#[inline]
1194011940
#[target_feature(enable = "neon,frintts")]
11941-
#[cfg_attr(test, assert_instr(frint32z))]
11941+
#[cfg_attr(test, assert_instr(nop))]
1194211942
pub unsafe fn vrnd32zq_f32(a: float32x4_t) -> float32x4_t {
1194311943
#[allow(improper_ctypes)]
1194411944
extern "unadjusted" {
@@ -11951,7 +11951,7 @@ pub unsafe fn vrnd32zq_f32(a: float32x4_t) -> float32x4_t {
1195111951
/// Floating-point round to 64-bit integer, using current rounding mode
1195211952
#[inline]
1195311953
#[target_feature(enable = "neon,frintts")]
11954-
#[cfg_attr(test, assert_instr(frint64x))]
11954+
#[cfg_attr(test, assert_instr(nop))]
1195511955
pub unsafe fn vrnd64x_f32(a: float32x2_t) -> float32x2_t {
1195611956
#[allow(improper_ctypes)]
1195711957
extern "unadjusted" {
@@ -11964,7 +11964,7 @@ pub unsafe fn vrnd64x_f32(a: float32x2_t) -> float32x2_t {
1196411964
/// Floating-point round to 64-bit integer, using current rounding mode
1196511965
#[inline]
1196611966
#[target_feature(enable = "neon,frintts")]
11967-
#[cfg_attr(test, assert_instr(frint64x))]
11967+
#[cfg_attr(test, assert_instr(nop))]
1196811968
pub unsafe fn vrnd64xq_f32(a: float32x4_t) -> float32x4_t {
1196911969
#[allow(improper_ctypes)]
1197011970
extern "unadjusted" {
@@ -11977,7 +11977,7 @@ pub unsafe fn vrnd64xq_f32(a: float32x4_t) -> float32x4_t {
1197711977
/// Floating-point round to 64-bit integer toward zero
1197811978
#[inline]
1197911979
#[target_feature(enable = "neon,frintts")]
11980-
#[cfg_attr(test, assert_instr(frint64z))]
11980+
#[cfg_attr(test, assert_instr(nop))]
1198111981
pub unsafe fn vrnd64z_f32(a: float32x2_t) -> float32x2_t {
1198211982
#[allow(improper_ctypes)]
1198311983
extern "unadjusted" {
@@ -11990,7 +11990,7 @@ pub unsafe fn vrnd64z_f32(a: float32x2_t) -> float32x2_t {
1199011990
/// Floating-point round to 64-bit integer toward zero
1199111991
#[inline]
1199211992
#[target_feature(enable = "neon,frintts")]
11993-
#[cfg_attr(test, assert_instr(frint64z))]
11993+
#[cfg_attr(test, assert_instr(nop))]
1199411994
pub unsafe fn vrnd64zq_f32(a: float32x4_t) -> float32x4_t {
1199511995
#[allow(improper_ctypes)]
1199611996
extern "unadjusted" {

crates/core_arch/src/aarch64/tme.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub const _TMFAILURE_TRIVIAL: u64 = 1 << 24;
7171
/// [ARM TME Intrinsics](https://developer.arm.com/docs/101028/0010/transactional-memory-extension-tme-intrinsics).
7272
#[inline]
7373
#[target_feature(enable = "tme")]
74-
#[cfg_attr(test, assert_instr(tstart))]
74+
#[cfg_attr(test, assert_instr(nop))]
7575
pub unsafe fn __tstart() -> u64 {
7676
aarch64_tstart()
7777
}
@@ -83,7 +83,7 @@ pub unsafe fn __tstart() -> u64 {
8383
/// [ARM TME Intrinsics](https://developer.arm.com/docs/101028/0010/transactional-memory-extension-tme-intrinsics).
8484
#[inline]
8585
#[target_feature(enable = "tme")]
86-
#[cfg_attr(test, assert_instr(tcommit))]
86+
#[cfg_attr(test, assert_instr(nop))]
8787
pub unsafe fn __tcommit() {
8888
aarch64_tcommit()
8989
}
@@ -93,7 +93,7 @@ pub unsafe fn __tcommit() {
9393
/// [ARM TME Intrinsics](https://developer.arm.com/docs/101028/0010/transactional-memory-extension-tme-intrinsics).
9494
#[inline]
9595
#[target_feature(enable = "tme")]
96-
#[cfg_attr(test, assert_instr(tcancel, IMM16 = 0x0))]
96+
#[cfg_attr(test, assert_instr(nop, IMM16 = 0x0))]
9797
#[rustc_legacy_const_generics(0)]
9898
pub unsafe fn __tcancel<const IMM16: u64>() {
9999
static_assert!(IMM16: u64 where IMM16 <= 65535);
@@ -106,7 +106,7 @@ pub unsafe fn __tcancel<const IMM16: u64>() {
106106
/// [ARM TME Intrinsics](https://developer.arm.com/docs/101028/0010/transactional-memory-extension-tme-intrinsics).
107107
#[inline]
108108
#[target_feature(enable = "tme")]
109-
#[cfg_attr(test, assert_instr(ttest))]
109+
#[cfg_attr(test, assert_instr(nop))]
110110
pub unsafe fn __ttest() -> u64 {
111111
aarch64_ttest()
112112
}

crates/core_arch/src/aarch64/v8.rs

+5
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,23 @@ use stdarch_test::assert_instr;
1111
/// Reverse the order of the bytes.
1212
#[inline]
1313
#[cfg_attr(test, assert_instr(rev))]
14+
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1415
pub unsafe fn _rev_u64(x: u64) -> u64 {
1516
x.swap_bytes() as u64
1617
}
1718

1819
/// Count Leading Zeros.
1920
#[inline]
2021
#[cfg_attr(test, assert_instr(clz))]
22+
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
2123
pub unsafe fn _clz_u64(x: u64) -> u64 {
2224
x.leading_zeros() as u64
2325
}
2426

2527
/// Reverse the bit order.
2628
#[inline]
2729
#[cfg_attr(test, assert_instr(rbit))]
30+
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
2831
pub unsafe fn _rbit_u64(x: u64) -> u64 {
2932
crate::intrinsics::bitreverse(x)
3033
}
@@ -35,6 +38,7 @@ pub unsafe fn _rbit_u64(x: u64) -> u64 {
3538
/// bits.
3639
#[inline]
3740
#[cfg_attr(test, assert_instr(cls))]
41+
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
3842
pub unsafe fn _cls_u32(x: u32) -> u32 {
3943
u32::leading_zeros((((((x as i32) >> 31) as u32) ^ x) << 1) | 1) as u32
4044
}
@@ -45,6 +49,7 @@ pub unsafe fn _cls_u32(x: u32) -> u32 {
4549
/// bits.
4650
#[inline]
4751
#[cfg_attr(test, assert_instr(cls))]
52+
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
4853
pub unsafe fn _cls_u64(x: u64) -> u64 {
4954
u64::leading_zeros((((((x as i64) >> 63) as u64) ^ x) << 1) | 1) as u64
5055
}

crates/core_arch/src/arm_shared/crc.rs

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use stdarch_test::assert_instr;
2828
#[target_feature(enable = "crc")]
2929
#[cfg_attr(target_arch = "arm", target_feature(enable = "v8"))]
3030
#[cfg_attr(test, assert_instr(crc32b))]
31+
#[cfg_attr(target_arch = "aarch64", stable(feature = "neon_intrinsics", since = "1.59.0"))]
3132
pub unsafe fn __crc32b(crc: u32, data: u8) -> u32 {
3233
crc32b_(crc, data as u32)
3334
}
@@ -37,6 +38,7 @@ pub unsafe fn __crc32b(crc: u32, data: u8) -> u32 {
3738
#[target_feature(enable = "crc")]
3839
#[cfg_attr(target_arch = "arm", target_feature(enable = "v8"))]
3940
#[cfg_attr(test, assert_instr(crc32h))]
41+
#[cfg_attr(target_arch = "aarch64", stable(feature = "neon_intrinsics", since = "1.59.0"))]
4042
pub unsafe fn __crc32h(crc: u32, data: u16) -> u32 {
4143
crc32h_(crc, data as u32)
4244
}
@@ -46,6 +48,7 @@ pub unsafe fn __crc32h(crc: u32, data: u16) -> u32 {
4648
#[target_feature(enable = "crc")]
4749
#[cfg_attr(target_arch = "arm", target_feature(enable = "v8"))]
4850
#[cfg_attr(test, assert_instr(crc32w))]
51+
#[cfg_attr(target_arch = "aarch64", stable(feature = "neon_intrinsics", since = "1.59.0"))]
4952
pub unsafe fn __crc32w(crc: u32, data: u32) -> u32 {
5053
crc32w_(crc, data)
5154
}
@@ -55,6 +58,7 @@ pub unsafe fn __crc32w(crc: u32, data: u32) -> u32 {
5558
#[target_feature(enable = "crc")]
5659
#[cfg_attr(target_arch = "arm", target_feature(enable = "v8"))]
5760
#[cfg_attr(test, assert_instr(crc32cb))]
61+
#[cfg_attr(target_arch = "aarch64", stable(feature = "neon_intrinsics", since = "1.59.0"))]
5862
pub unsafe fn __crc32cb(crc: u32, data: u8) -> u32 {
5963
crc32cb_(crc, data as u32)
6064
}
@@ -64,6 +68,7 @@ pub unsafe fn __crc32cb(crc: u32, data: u8) -> u32 {
6468
#[target_feature(enable = "crc")]
6569
#[cfg_attr(target_arch = "arm", target_feature(enable = "v8"))]
6670
#[cfg_attr(test, assert_instr(crc32ch))]
71+
#[cfg_attr(target_arch = "aarch64", stable(feature = "neon_intrinsics", since = "1.59.0"))]
6772
pub unsafe fn __crc32ch(crc: u32, data: u16) -> u32 {
6873
crc32ch_(crc, data as u32)
6974
}
@@ -73,6 +78,7 @@ pub unsafe fn __crc32ch(crc: u32, data: u16) -> u32 {
7378
#[target_feature(enable = "crc")]
7479
#[cfg_attr(target_arch = "arm", target_feature(enable = "v8"))]
7580
#[cfg_attr(test, assert_instr(crc32cw))]
81+
#[cfg_attr(target_arch = "aarch64", stable(feature = "neon_intrinsics", since = "1.59.0"))]
7682
pub unsafe fn __crc32cw(crc: u32, data: u32) -> u32 {
7783
crc32cw_(crc, data)
7884
}

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -4811,7 +4811,7 @@ pub unsafe fn vpadalq_u32(a: uint64x2_t, b: uint32x4_t) -> uint64x2_t {
48114811
#[target_feature(enable = "neon")]
48124812
#[cfg_attr(target_arch = "arm", target_feature(enable = "v8"))]
48134813
#[cfg_attr(all(test, target_arch = "arm"), assert_instr(nop))]
4814-
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(smmla))]
4814+
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(nop))]
48154815
pub unsafe fn vmmlaq_s32(a: int32x4_t, b: int8x16_t, c: int8x16_t) -> int32x4_t {
48164816
#[allow(improper_ctypes)]
48174817
extern "unadjusted" {
@@ -4831,7 +4831,7 @@ pub unsafe fn vmmlaq_s32(a: int32x4_t, b: int8x16_t, c: int8x16_t) -> int32x4_t
48314831
#[target_feature(enable = "neon")]
48324832
#[cfg_attr(target_arch = "arm", target_feature(enable = "v8"))]
48334833
#[cfg_attr(all(test, target_arch = "arm"), assert_instr(nop))]
4834-
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(ummla))]
4834+
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(nop))]
48354835
pub unsafe fn vmmlaq_u32(a: uint32x4_t, b: uint8x16_t, c: uint8x16_t) -> uint32x4_t {
48364836
#[allow(improper_ctypes)]
48374837
extern "unadjusted" {
@@ -4851,7 +4851,7 @@ pub unsafe fn vmmlaq_u32(a: uint32x4_t, b: uint8x16_t, c: uint8x16_t) -> uint32x
48514851
#[target_feature(enable = "neon")]
48524852
#[cfg_attr(target_arch = "arm", target_feature(enable = "v8"))]
48534853
#[cfg_attr(all(test, target_arch = "arm"), assert_instr(nop))]
4854-
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(usmmla))]
4854+
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(nop))]
48554855
pub unsafe fn vusmmlaq_s32(a: int32x4_t, b: uint8x16_t, c: int8x16_t) -> int32x4_t {
48564856
#[allow(improper_ctypes)]
48574857
extern "unadjusted" {

crates/core_arch/src/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ pub mod arch {
5050
/// See the [module documentation](../index.html) for more details.
5151
#[cfg(any(target_arch = "aarch64", doc))]
5252
#[doc(cfg(target_arch = "aarch64"))]
53-
#[unstable(feature = "stdsimd", issue = "27731")]
53+
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
5454
pub mod aarch64 {
55+
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
5556
pub use crate::core_arch::aarch64::*;
5657
}
5758

crates/stdarch-gen/neon.spec

+4-4
Original file line numberDiff line numberDiff line change
@@ -7044,7 +7044,7 @@ a = 1.1, 1.9, -1.7, -2.3
70447044
validate 1.0, 2.0, -2.0, -2.0
70457045
target = frintts
70467046

7047-
aarch64 = frint32x
7047+
aarch64 = nop
70487048
link-aarch64 = frint32x._EXT_
70497049
generate float32x2_t, float32x4_t
70507050

@@ -7054,7 +7054,7 @@ a = 1.1, 1.9, -1.7, -2.3
70547054
validate 1.0, 1.0, -1.0, -2.0
70557055
target = frintts
70567056

7057-
aarch64 = frint32z
7057+
aarch64 = nop
70587058
link-aarch64 = frint32z._EXT_
70597059
generate float32x2_t, float32x4_t
70607060

@@ -7064,7 +7064,7 @@ a = 1.1, 1.9, -1.7, -2.3
70647064
validate 1.0, 2.0, -2.0, -2.0
70657065
target = frintts
70667066

7067-
aarch64 = frint64x
7067+
aarch64 = nop
70687068
link-aarch64 = frint64x._EXT_
70697069
generate float32x2_t, float32x4_t
70707070

@@ -7074,7 +7074,7 @@ a = 1.1, 1.9, -1.7, -2.3
70747074
validate 1.0, 1.0, -1.0, -2.0
70757075
target = frintts
70767076

7077-
aarch64 = frint64z
7077+
aarch64 = nop
70787078
link-aarch64 = frint64z._EXT_
70797079
generate float32x2_t, float32x4_t
70807080

0 commit comments

Comments
 (0)