Skip to content

Commit 569366d

Browse files
committed
Remove comments
1 parent 367096d commit 569366d

File tree

1 file changed

+41
-32
lines changed
  • crates/core_arch/src/arm/neon

1 file changed

+41
-32
lines changed

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

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,6 @@ pub unsafe fn vget_lane_u8(v: uint8x8_t, imm5: i32) -> u8 {
12351235
}
12361236

12371237
/// Duplicate vector element to vector or scalar
1238-
// int8x16_t vdupq_n_s8 (int8_t value)
12391238
#[inline]
12401239
#[target_feature(enable = "neon")]
12411240
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
@@ -1249,7 +1248,6 @@ pub unsafe fn vdupq_n_s8(value: i8) -> int8x16_t {
12491248
}
12501249

12511250
/// Duplicate vector element to vector or scalar
1252-
// uint8x16_t vdupq_n_u8 (uint8_t value)
12531251
#[inline]
12541252
#[target_feature(enable = "neon")]
12551253
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
@@ -1263,7 +1261,6 @@ pub unsafe fn vdupq_n_u8(value: u8) -> uint8x16_t {
12631261
}
12641262

12651263
/// Duplicate vector element to vector or scalar
1266-
// uint8x16_t vmovq_n_u8 (uint8_t value)
12671264
#[inline]
12681265
#[target_feature(enable = "neon")]
12691266
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
@@ -1273,38 +1270,55 @@ pub unsafe fn vmovq_n_u8(value: u8) -> uint8x16_t {
12731270
vdupq_n_u8(value)
12741271
}
12751272

1276-
macro_rules! arm_reinterpret {
1277-
($name:ident, $from:ty, $to:ty) => {
1278-
/// Vector reinterpret cast operation
1279-
#[inline]
1280-
#[target_feature(enable = "neon")]
1281-
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
1282-
pub unsafe fn $name(a: $from) -> $to {
1283-
transmute(a)
1284-
}
1285-
};
1273+
/// Vector reinterpret cast operation
1274+
#[inline]
1275+
#[target_feature(enable = "neon")]
1276+
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
1277+
pub unsafe fn vreinterpret_u64_u32(a: uint32x2_t) -> uint64x1_t {
1278+
transmute(a)
12861279
}
12871280

1288-
// uint64x1_t vreinterpret_u64_u32 (uint32x2_t a)
1289-
arm_reinterpret!(vreinterpret_u64_u32, uint32x2_t, uint64x1_t);
1290-
1291-
// int8x16_t vreinterpretq_s8_u8 (uint8x16_t a)
1292-
arm_reinterpret!(vreinterpretq_s8_u8, uint8x16_t, int8x16_t);
1281+
/// Vector reinterpret cast operation
1282+
#[inline]
1283+
#[target_feature(enable = "neon")]
1284+
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
1285+
pub unsafe fn vreinterpretq_s8_u8(a: uint8x16_t) -> int8x16_t {
1286+
transmute(a)
1287+
}
12931288

1294-
// uint16x8_t vreinterpretq_u16_u8 (uint8x16_t a)
1295-
arm_reinterpret!(vreinterpretq_u16_u8, uint8x16_t, uint16x8_t);
1289+
/// Vector reinterpret cast operation
1290+
#[inline]
1291+
#[target_feature(enable = "neon")]
1292+
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
1293+
pub unsafe fn vreinterpretq_u16_u8(a: uint8x16_t) -> uint16x8_t {
1294+
transmute(a)
1295+
}
12961296

1297-
// uint32x4_t vreinterpretq_u32_u8 (uint8x16_t a)
1298-
arm_reinterpret!(vreinterpretq_u32_u8, uint8x16_t, uint32x4_t);
1297+
/// Vector reinterpret cast operation
1298+
#[inline]
1299+
#[target_feature(enable = "neon")]
1300+
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
1301+
pub unsafe fn vreinterpretq_u32_u8(a: uint8x16_t) -> uint32x4_t {
1302+
transmute(a)
1303+
}
12991304

1300-
// uint64x2_t vreinterpretq_u64_u8 (uint8x16_t a)
1301-
arm_reinterpret!(vreinterpretq_u64_u8, uint8x16_t, uint64x2_t);
1305+
/// Vector reinterpret cast operation
1306+
#[inline]
1307+
#[target_feature(enable = "neon")]
1308+
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
1309+
pub unsafe fn vreinterpretq_u64_u8(a: uint8x16_t) -> uint64x2_t {
1310+
transmute(a)
1311+
}
13021312

1303-
// uint8x16_t vreinterpretq_u8_s8 (int8x16_t a)
1304-
arm_reinterpret!(vreinterpretq_u8_s8, int8x16_t, uint8x16_t);
1313+
/// Vector reinterpret cast operation
1314+
#[inline]
1315+
#[target_feature(enable = "neon")]
1316+
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
1317+
pub unsafe fn vreinterpretq_u8_s8(a: uint8x16_t) -> uint8x16_t {
1318+
transmute(a)
1319+
}
13051320

13061321
/// Unsigned shift right
1307-
//uint8x16_t vshrq_n_u8 (uint8x16_t a, const int n)
13081322
#[inline]
13091323
#[target_feature(enable = "neon")]
13101324
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
@@ -1336,7 +1350,6 @@ pub unsafe fn vshrq_n_u8(a: uint8x16_t, imm3: i32) -> uint8x16_t {
13361350
}
13371351

13381352
/// Shift right
1339-
//uint8x16_t vshlq_n_u8 (uint8x16_t a, const int n)
13401353
#[inline]
13411354
#[target_feature(enable = "neon")]
13421355
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
@@ -1473,7 +1486,6 @@ pub unsafe fn vextq_s8(a: int8x16_t, b: int8x16_t, n: i32) -> int8x16_t {
14731486
}
14741487

14751488
/// Extract vector from pair of vectors
1476-
//uint8x16_t vextq_s8 (uint8x16_t a, uint8x16_t b, const int n)
14771489
#[inline]
14781490
#[target_feature(enable = "neon")]
14791491
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
@@ -1579,7 +1591,6 @@ pub unsafe fn vextq_u8(a: uint8x16_t, b: uint8x16_t, n: i32) -> uint8x16_t {
15791591
}
15801592

15811593
/// Load multiple single-element structures to one, two, three, or four registers
1582-
// int8x16_t vld1q_s8 (int8_t const * ptr)
15831594
#[inline]
15841595
#[target_feature(enable = "neon")]
15851596
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
@@ -1591,7 +1602,6 @@ pub unsafe fn vld1q_s8(addr: *const i8) -> int8x16_t {
15911602
}
15921603

15931604
/// Load multiple single-element structures to one, two, three, or four registers
1594-
// int8x16_t vld1q_u8 (uint8_t const * ptr)
15951605
#[inline]
15961606
#[target_feature(enable = "neon")]
15971607
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
@@ -2284,5 +2294,4 @@ mod tests {
22842294

22852295
#[cfg(test)]
22862296
#[cfg(target_endian = "little")]
2287-
//#[path = "table_lookup_tests.rs"]
22882297
mod table_lookup_tests;

0 commit comments

Comments
 (0)