Skip to content

Commit 625dffe

Browse files
authored
manually const-ify shuffle arguments (#1160)
1 parent f65a198 commit 625dffe

File tree

17 files changed

+1655
-1549
lines changed

17 files changed

+1655
-1549
lines changed

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

+603-603
Large diffs are not rendered by default.

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

+14-14
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,7 @@ pub unsafe fn vext_f64<const N: i32>(a: float64x1_t, _b: float64x1_t) -> float64
15951595
#[target_feature(enable = "neon")]
15961596
#[cfg_attr(test, assert_instr(mov))]
15971597
pub unsafe fn vcombine_s8(low: int8x8_t, high: int8x8_t) -> int8x16_t {
1598-
simd_shuffle16(
1598+
simd_shuffle16!(
15991599
low,
16001600
high,
16011601
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
@@ -1607,31 +1607,31 @@ pub unsafe fn vcombine_s8(low: int8x8_t, high: int8x8_t) -> int8x16_t {
16071607
#[target_feature(enable = "neon")]
16081608
#[cfg_attr(test, assert_instr(mov))]
16091609
pub unsafe fn vcombine_s16(low: int16x4_t, high: int16x4_t) -> int16x8_t {
1610-
simd_shuffle8(low, high, [0, 1, 2, 3, 4, 5, 6, 7])
1610+
simd_shuffle8!(low, high, [0, 1, 2, 3, 4, 5, 6, 7])
16111611
}
16121612

16131613
/// Vector combine
16141614
#[inline]
16151615
#[target_feature(enable = "neon")]
16161616
#[cfg_attr(test, assert_instr(mov))]
16171617
pub unsafe fn vcombine_s32(low: int32x2_t, high: int32x2_t) -> int32x4_t {
1618-
simd_shuffle4(low, high, [0, 1, 2, 3])
1618+
simd_shuffle4!(low, high, [0, 1, 2, 3])
16191619
}
16201620

16211621
/// Vector combine
16221622
#[inline]
16231623
#[target_feature(enable = "neon")]
16241624
#[cfg_attr(test, assert_instr(mov))]
16251625
pub unsafe fn vcombine_s64(low: int64x1_t, high: int64x1_t) -> int64x2_t {
1626-
simd_shuffle2(low, high, [0, 1])
1626+
simd_shuffle2!(low, high, [0, 1])
16271627
}
16281628

16291629
/// Vector combine
16301630
#[inline]
16311631
#[target_feature(enable = "neon")]
16321632
#[cfg_attr(test, assert_instr(mov))]
16331633
pub unsafe fn vcombine_u8(low: uint8x8_t, high: uint8x8_t) -> uint8x16_t {
1634-
simd_shuffle16(
1634+
simd_shuffle16!(
16351635
low,
16361636
high,
16371637
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
@@ -1643,31 +1643,31 @@ pub unsafe fn vcombine_u8(low: uint8x8_t, high: uint8x8_t) -> uint8x16_t {
16431643
#[target_feature(enable = "neon")]
16441644
#[cfg_attr(test, assert_instr(mov))]
16451645
pub unsafe fn vcombine_u16(low: uint16x4_t, high: uint16x4_t) -> uint16x8_t {
1646-
simd_shuffle8(low, high, [0, 1, 2, 3, 4, 5, 6, 7])
1646+
simd_shuffle8!(low, high, [0, 1, 2, 3, 4, 5, 6, 7])
16471647
}
16481648

16491649
/// Vector combine
16501650
#[inline]
16511651
#[target_feature(enable = "neon")]
16521652
#[cfg_attr(test, assert_instr(mov))]
16531653
pub unsafe fn vcombine_u32(low: uint32x2_t, high: uint32x2_t) -> uint32x4_t {
1654-
simd_shuffle4(low, high, [0, 1, 2, 3])
1654+
simd_shuffle4!(low, high, [0, 1, 2, 3])
16551655
}
16561656

16571657
/// Vector combine
16581658
#[inline]
16591659
#[target_feature(enable = "neon")]
16601660
#[cfg_attr(test, assert_instr(mov))]
16611661
pub unsafe fn vcombine_u64(low: uint64x1_t, high: uint64x1_t) -> uint64x2_t {
1662-
simd_shuffle2(low, high, [0, 1])
1662+
simd_shuffle2!(low, high, [0, 1])
16631663
}
16641664

16651665
/// Vector combine
16661666
#[inline]
16671667
#[target_feature(enable = "neon")]
16681668
#[cfg_attr(test, assert_instr(mov))]
16691669
pub unsafe fn vcombine_p64(low: poly64x1_t, high: poly64x1_t) -> poly64x2_t {
1670-
simd_shuffle2(low, high, [0, 1])
1670+
simd_shuffle2!(low, high, [0, 1])
16711671
}
16721672

16731673
/// Duplicate vector element to vector or scalar
@@ -1772,7 +1772,7 @@ pub unsafe fn vget_low_p64(a: poly64x2_t) -> poly64x1_t {
17721772
#[target_feature(enable = "neon")]
17731773
#[cfg_attr(test, assert_instr(mov))]
17741774
pub unsafe fn vcombine_f16 ( low: float16x4_t, high: float16x4_t) -> float16x8_t {
1775-
simd_shuffle8(low, high, [0, 1, 2, 3, 4, 5, 6, 7])
1775+
simd_shuffle8!(low, high, [0, 1, 2, 3, 4, 5, 6, 7])
17761776
}
17771777
*/
17781778

@@ -1781,15 +1781,15 @@ pub unsafe fn vcombine_f16 ( low: float16x4_t, high: float16x4_t) -> float16x8_
17811781
#[target_feature(enable = "neon")]
17821782
#[cfg_attr(test, assert_instr(mov))]
17831783
pub unsafe fn vcombine_f32(low: float32x2_t, high: float32x2_t) -> float32x4_t {
1784-
simd_shuffle4(low, high, [0, 1, 2, 3])
1784+
simd_shuffle4!(low, high, [0, 1, 2, 3])
17851785
}
17861786

17871787
/// Vector combine
17881788
#[inline]
17891789
#[target_feature(enable = "neon")]
17901790
#[cfg_attr(test, assert_instr(mov))]
17911791
pub unsafe fn vcombine_p8(low: poly8x8_t, high: poly8x8_t) -> poly8x16_t {
1792-
simd_shuffle16(
1792+
simd_shuffle16!(
17931793
low,
17941794
high,
17951795
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
@@ -1801,15 +1801,15 @@ pub unsafe fn vcombine_p8(low: poly8x8_t, high: poly8x8_t) -> poly8x16_t {
18011801
#[target_feature(enable = "neon")]
18021802
#[cfg_attr(test, assert_instr(mov))]
18031803
pub unsafe fn vcombine_p16(low: poly16x4_t, high: poly16x4_t) -> poly16x8_t {
1804-
simd_shuffle8(low, high, [0, 1, 2, 3, 4, 5, 6, 7])
1804+
simd_shuffle8!(low, high, [0, 1, 2, 3, 4, 5, 6, 7])
18051805
}
18061806

18071807
/// Vector combine
18081808
#[inline]
18091809
#[target_feature(enable = "neon")]
18101810
#[cfg_attr(test, assert_instr(mov))]
18111811
pub unsafe fn vcombine_f64(low: float64x1_t, high: float64x1_t) -> float64x2_t {
1812-
simd_shuffle2(low, high, [0, 1])
1812+
simd_shuffle2!(low, high, [0, 1])
18131813
}
18141814

18151815
/// Table look-up

0 commit comments

Comments
 (0)