Skip to content

Commit

Permalink
Stabilize AArch64 SHA3 intrinsics
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri committed Apr 11, 2024
1 parent 7df81ba commit 4a5204f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 23 deletions.
42 changes: 21 additions & 21 deletions crates/core_arch/src/aarch64/neon/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use stdarch_test::assert_instr;
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(eor3))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn veor3q_s8(a: int8x16_t, b: int8x16_t, c: int8x16_t) -> int8x16_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -31,7 +31,7 @@ pub unsafe fn veor3q_s8(a: int8x16_t, b: int8x16_t, c: int8x16_t) -> int8x16_t {
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(eor3))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn veor3q_s16(a: int16x8_t, b: int16x8_t, c: int16x8_t) -> int16x8_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -47,7 +47,7 @@ pub unsafe fn veor3q_s16(a: int16x8_t, b: int16x8_t, c: int16x8_t) -> int16x8_t
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(eor3))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn veor3q_s32(a: int32x4_t, b: int32x4_t, c: int32x4_t) -> int32x4_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -63,7 +63,7 @@ pub unsafe fn veor3q_s32(a: int32x4_t, b: int32x4_t, c: int32x4_t) -> int32x4_t
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(eor3))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn veor3q_s64(a: int64x2_t, b: int64x2_t, c: int64x2_t) -> int64x2_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -79,7 +79,7 @@ pub unsafe fn veor3q_s64(a: int64x2_t, b: int64x2_t, c: int64x2_t) -> int64x2_t
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(eor3))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn veor3q_u8(a: uint8x16_t, b: uint8x16_t, c: uint8x16_t) -> uint8x16_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -95,7 +95,7 @@ pub unsafe fn veor3q_u8(a: uint8x16_t, b: uint8x16_t, c: uint8x16_t) -> uint8x16
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(eor3))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn veor3q_u16(a: uint16x8_t, b: uint16x8_t, c: uint16x8_t) -> uint16x8_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -111,7 +111,7 @@ pub unsafe fn veor3q_u16(a: uint16x8_t, b: uint16x8_t, c: uint16x8_t) -> uint16x
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(eor3))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn veor3q_u32(a: uint32x4_t, b: uint32x4_t, c: uint32x4_t) -> uint32x4_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -127,7 +127,7 @@ pub unsafe fn veor3q_u32(a: uint32x4_t, b: uint32x4_t, c: uint32x4_t) -> uint32x
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(eor3))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn veor3q_u64(a: uint64x2_t, b: uint64x2_t, c: uint64x2_t) -> uint64x2_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand Down Expand Up @@ -9977,7 +9977,7 @@ pub unsafe fn vsubl_high_u32(a: uint32x4_t, b: uint32x4_t) -> uint64x2_t {
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(bcax))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn vbcaxq_s8(a: int8x16_t, b: int8x16_t, c: int8x16_t) -> int8x16_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -9993,7 +9993,7 @@ pub unsafe fn vbcaxq_s8(a: int8x16_t, b: int8x16_t, c: int8x16_t) -> int8x16_t {
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(bcax))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn vbcaxq_s16(a: int16x8_t, b: int16x8_t, c: int16x8_t) -> int16x8_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -10009,7 +10009,7 @@ pub unsafe fn vbcaxq_s16(a: int16x8_t, b: int16x8_t, c: int16x8_t) -> int16x8_t
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(bcax))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn vbcaxq_s32(a: int32x4_t, b: int32x4_t, c: int32x4_t) -> int32x4_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -10025,7 +10025,7 @@ pub unsafe fn vbcaxq_s32(a: int32x4_t, b: int32x4_t, c: int32x4_t) -> int32x4_t
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(bcax))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn vbcaxq_s64(a: int64x2_t, b: int64x2_t, c: int64x2_t) -> int64x2_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -10041,7 +10041,7 @@ pub unsafe fn vbcaxq_s64(a: int64x2_t, b: int64x2_t, c: int64x2_t) -> int64x2_t
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(bcax))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn vbcaxq_u8(a: uint8x16_t, b: uint8x16_t, c: uint8x16_t) -> uint8x16_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -10057,7 +10057,7 @@ pub unsafe fn vbcaxq_u8(a: uint8x16_t, b: uint8x16_t, c: uint8x16_t) -> uint8x16
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(bcax))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn vbcaxq_u16(a: uint16x8_t, b: uint16x8_t, c: uint16x8_t) -> uint16x8_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -10073,7 +10073,7 @@ pub unsafe fn vbcaxq_u16(a: uint16x8_t, b: uint16x8_t, c: uint16x8_t) -> uint16x
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(bcax))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn vbcaxq_u32(a: uint32x4_t, b: uint32x4_t, c: uint32x4_t) -> uint32x4_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -10089,7 +10089,7 @@ pub unsafe fn vbcaxq_u32(a: uint32x4_t, b: uint32x4_t, c: uint32x4_t) -> uint32x
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(bcax))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn vbcaxq_u64(a: uint64x2_t, b: uint64x2_t, c: uint64x2_t) -> uint64x2_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand Down Expand Up @@ -15261,7 +15261,7 @@ pub unsafe fn vsm4eq_u32(a: uint32x4_t, b: uint32x4_t) -> uint32x4_t {
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(rax1))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn vrax1q_u64(a: uint64x2_t, b: uint64x2_t) -> uint64x2_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -15277,7 +15277,7 @@ pub unsafe fn vrax1q_u64(a: uint64x2_t, b: uint64x2_t) -> uint64x2_t {
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(sha512h))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn vsha512hq_u64(a: uint64x2_t, b: uint64x2_t, c: uint64x2_t) -> uint64x2_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -15293,7 +15293,7 @@ pub unsafe fn vsha512hq_u64(a: uint64x2_t, b: uint64x2_t, c: uint64x2_t) -> uint
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(sha512h2))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn vsha512h2q_u64(a: uint64x2_t, b: uint64x2_t, c: uint64x2_t) -> uint64x2_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -15309,7 +15309,7 @@ pub unsafe fn vsha512h2q_u64(a: uint64x2_t, b: uint64x2_t, c: uint64x2_t) -> uin
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(sha512su0))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn vsha512su0q_u64(a: uint64x2_t, b: uint64x2_t) -> uint64x2_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand All @@ -15325,7 +15325,7 @@ pub unsafe fn vsha512su0q_u64(a: uint64x2_t, b: uint64x2_t) -> uint64x2_t {
#[inline]
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(sha512su1))]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn vsha512su1q_u64(a: uint64x2_t, b: uint64x2_t, c: uint64x2_t) -> uint64x2_t {
#[allow(improper_ctypes)]
extern "unadjusted" {
Expand Down
2 changes: 1 addition & 1 deletion crates/core_arch/src/aarch64/neon/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3506,7 +3506,7 @@ pub unsafe fn vsm3tt2bq_u32<const IMM2: i32>(
#[target_feature(enable = "neon,sha3")]
#[cfg_attr(test, assert_instr(xar, IMM6 = 0))]
#[rustc_legacy_const_generics(2)]
#[unstable(feature = "stdarch_neon_sha3", issue = "117225")]
#[stable(feature = "stdarch_neon_sha3", since = "1.79.0")]
pub unsafe fn vxarq_u64<const IMM6: i32>(a: uint64x2_t, b: uint64x2_t) -> uint64x2_t {
static_assert_uimm_bits!(IMM6, 6);
#[allow(improper_ctypes)]
Expand Down
1 change: 1 addition & 0 deletions crates/intrinsic-test/src/json_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct ReturnType {
#[serde(untagged, deny_unknown_fields)]
pub enum ArgPrep {
Register {
#[allow(dead_code)]
#[serde(rename = "register")]
#[allow(dead_code)]
reg: String,
Expand Down
2 changes: 1 addition & 1 deletion crates/stdarch-gen-arm/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ impl TargetFeature {
Fcma => "unstable(feature = \"stdarch_neon_fcma\", issue = \"117222\")",
Dotprod => "unstable(feature = \"stdarch_neon_dotprod\", issue = \"117224\")",
I8MM => "unstable(feature = \"stdarch_neon_i8mm\", issue = \"117223\")",
Sha3 => "unstable(feature = \"stdarch_neon_sha3\", issue = \"117225\")",
Sha3 => "stable(feature = \"stdarch_neon_sha3\", since = \"1.79.0\")",
Rdm => "stable(feature = \"rdm_intrinsics\", since = \"1.62.0\")",
Sm4 => "unstable(feature = \"stdarch_neon_sm4\", issue = \"117226\")",
Ftts => "unstable(feature = \"stdarch_neon_ftts\", issue = \"117227\")",
Expand Down

0 comments on commit 4a5204f

Please sign in to comment.