Skip to content

Commit d1013a2

Browse files
committed
put the idx arguments of simd_insert and simd_extract into const blocks
1 parent 5ef6eb4 commit d1013a2

File tree

19 files changed

+793
-776
lines changed

19 files changed

+793
-776
lines changed

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

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

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

+12-12
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ pub unsafe fn vcopy_laneq_s64<const LANE1: i32, const LANE2: i32>(
436436
) -> int64x1_t {
437437
static_assert!(LANE1 == 0);
438438
static_assert_uimm_bits!(LANE2, 1);
439-
transmute::<i64, _>(simd_extract(b, LANE2 as u32))
439+
transmute::<i64, _>(simd_extract!(b, LANE2 as u32))
440440
}
441441

442442
/// Duplicate vector element to vector or scalar
@@ -451,7 +451,7 @@ pub unsafe fn vcopy_laneq_u64<const LANE1: i32, const LANE2: i32>(
451451
) -> uint64x1_t {
452452
static_assert!(LANE1 == 0);
453453
static_assert_uimm_bits!(LANE2, 1);
454-
transmute::<u64, _>(simd_extract(b, LANE2 as u32))
454+
transmute::<u64, _>(simd_extract!(b, LANE2 as u32))
455455
}
456456

457457
/// Duplicate vector element to vector or scalar
@@ -466,7 +466,7 @@ pub unsafe fn vcopy_laneq_p64<const LANE1: i32, const LANE2: i32>(
466466
) -> poly64x1_t {
467467
static_assert!(LANE1 == 0);
468468
static_assert_uimm_bits!(LANE2, 1);
469-
transmute::<u64, _>(simd_extract(b, LANE2 as u32))
469+
transmute::<u64, _>(simd_extract!(b, LANE2 as u32))
470470
}
471471

472472
/// Duplicate vector element to vector or scalar
@@ -481,7 +481,7 @@ pub unsafe fn vcopy_laneq_f64<const LANE1: i32, const LANE2: i32>(
481481
) -> float64x1_t {
482482
static_assert!(LANE1 == 0);
483483
static_assert_uimm_bits!(LANE2, 1);
484-
transmute::<f64, _>(simd_extract(b, LANE2 as u32))
484+
transmute::<f64, _>(simd_extract!(b, LANE2 as u32))
485485
}
486486

487487
/// Load multiple single-element structures to one, two, three, or four registers.
@@ -749,7 +749,7 @@ pub unsafe fn vld1q_dup_f64(ptr: *const f64) -> float64x2_t {
749749
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
750750
pub unsafe fn vld1_lane_f64<const LANE: i32>(ptr: *const f64, src: float64x1_t) -> float64x1_t {
751751
static_assert!(LANE == 0);
752-
simd_insert(src, LANE as u32, *ptr)
752+
simd_insert!(src, LANE as u32, *ptr)
753753
}
754754

755755
/// Load one single-element structure to one lane of one register.
@@ -760,7 +760,7 @@ pub unsafe fn vld1_lane_f64<const LANE: i32>(ptr: *const f64, src: float64x1_t)
760760
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
761761
pub unsafe fn vld1q_lane_f64<const LANE: i32>(ptr: *const f64, src: float64x2_t) -> float64x2_t {
762762
static_assert_uimm_bits!(LANE, 1);
763-
simd_insert(src, LANE as u32, *ptr)
763+
simd_insert!(src, LANE as u32, *ptr)
764764
}
765765

766766
/// Store multiple single-element structures from one, two, three, or four registers.
@@ -2038,7 +2038,7 @@ pub unsafe fn vmovq_n_f64(value: f64) -> float64x2_t {
20382038
#[cfg_attr(test, assert_instr(mov))]
20392039
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
20402040
pub unsafe fn vget_high_f64(a: float64x2_t) -> float64x1_t {
2041-
float64x1_t(simd_extract(a, 1))
2041+
float64x1_t(simd_extract!(a, 1))
20422042
}
20432043

20442044
/// Duplicate vector element to vector or scalar
@@ -2047,7 +2047,7 @@ pub unsafe fn vget_high_f64(a: float64x2_t) -> float64x1_t {
20472047
#[cfg_attr(test, assert_instr(ext))]
20482048
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
20492049
pub unsafe fn vget_high_p64(a: poly64x2_t) -> poly64x1_t {
2050-
transmute(u64x1::new(simd_extract(a, 1)))
2050+
transmute(u64x1::new(simd_extract!(a, 1)))
20512051
}
20522052

20532053
/// Duplicate vector element to vector or scalar
@@ -2056,7 +2056,7 @@ pub unsafe fn vget_high_p64(a: poly64x2_t) -> poly64x1_t {
20562056
#[cfg_attr(test, assert_instr(nop))]
20572057
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
20582058
pub unsafe fn vget_low_f64(a: float64x2_t) -> float64x1_t {
2059-
float64x1_t(simd_extract(a, 0))
2059+
float64x1_t(simd_extract!(a, 0))
20602060
}
20612061

20622062
/// Duplicate vector element to vector or scalar
@@ -2065,7 +2065,7 @@ pub unsafe fn vget_low_f64(a: float64x2_t) -> float64x1_t {
20652065
#[cfg_attr(test, assert_instr(nop))]
20662066
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
20672067
pub unsafe fn vget_low_p64(a: poly64x2_t) -> poly64x1_t {
2068-
transmute(u64x1::new(simd_extract(a, 0)))
2068+
transmute(u64x1::new(simd_extract!(a, 0)))
20692069
}
20702070

20712071
/// Duplicate vector element to vector or scalar
@@ -2076,7 +2076,7 @@ pub unsafe fn vget_low_p64(a: poly64x2_t) -> poly64x1_t {
20762076
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(nop, IMM5 = 0))]
20772077
pub unsafe fn vget_lane_f64<const IMM5: i32>(v: float64x1_t) -> f64 {
20782078
static_assert!(IMM5 == 0);
2079-
simd_extract(v, IMM5 as u32)
2079+
simd_extract!(v, IMM5 as u32)
20802080
}
20812081

20822082
/// Duplicate vector element to vector or scalar
@@ -2087,7 +2087,7 @@ pub unsafe fn vget_lane_f64<const IMM5: i32>(v: float64x1_t) -> f64 {
20872087
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(nop, IMM5 = 0))]
20882088
pub unsafe fn vgetq_lane_f64<const IMM5: i32>(v: float64x2_t) -> f64 {
20892089
static_assert_uimm_bits!(IMM5, 1);
2090-
simd_extract(v, IMM5 as u32)
2090+
simd_extract!(v, IMM5 as u32)
20912091
}
20922092

20932093
/// Vector combine

0 commit comments

Comments
 (0)