@@ -1235,7 +1235,6 @@ pub unsafe fn vget_lane_u8(v: uint8x8_t, imm5: i32) -> u8 {
1235
1235
}
1236
1236
1237
1237
/// Duplicate vector element to vector or scalar
1238
- // int8x16_t vdupq_n_s8 (int8_t value)
1239
1238
#[ inline]
1240
1239
#[ target_feature( enable = "neon" ) ]
1241
1240
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "v7" ) ) ]
@@ -1249,7 +1248,6 @@ pub unsafe fn vdupq_n_s8(value: i8) -> int8x16_t {
1249
1248
}
1250
1249
1251
1250
/// Duplicate vector element to vector or scalar
1252
- // uint8x16_t vdupq_n_u8 (uint8_t value)
1253
1251
#[ inline]
1254
1252
#[ target_feature( enable = "neon" ) ]
1255
1253
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "v7" ) ) ]
@@ -1263,7 +1261,6 @@ pub unsafe fn vdupq_n_u8(value: u8) -> uint8x16_t {
1263
1261
}
1264
1262
1265
1263
/// Duplicate vector element to vector or scalar
1266
- // uint8x16_t vmovq_n_u8 (uint8_t value)
1267
1264
#[ inline]
1268
1265
#[ target_feature( enable = "neon" ) ]
1269
1266
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "v7" ) ) ]
@@ -1273,38 +1270,55 @@ pub unsafe fn vmovq_n_u8(value: u8) -> uint8x16_t {
1273
1270
vdupq_n_u8 ( value)
1274
1271
}
1275
1272
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)
1286
1279
}
1287
1280
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
+ }
1293
1288
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
+ }
1296
1296
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
+ }
1299
1304
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
+ }
1302
1312
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
+ }
1305
1320
1306
1321
/// Unsigned shift right
1307
- //uint8x16_t vshrq_n_u8 (uint8x16_t a, const int n)
1308
1322
#[ inline]
1309
1323
#[ target_feature( enable = "neon" ) ]
1310
1324
#[ 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 {
1336
1350
}
1337
1351
1338
1352
/// Shift right
1339
- //uint8x16_t vshlq_n_u8 (uint8x16_t a, const int n)
1340
1353
#[ inline]
1341
1354
#[ target_feature( enable = "neon" ) ]
1342
1355
#[ 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 {
1473
1486
}
1474
1487
1475
1488
/// Extract vector from pair of vectors
1476
- //uint8x16_t vextq_s8 (uint8x16_t a, uint8x16_t b, const int n)
1477
1489
#[ inline]
1478
1490
#[ target_feature( enable = "neon" ) ]
1479
1491
#[ 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 {
1579
1591
}
1580
1592
1581
1593
/// Load multiple single-element structures to one, two, three, or four registers
1582
- // int8x16_t vld1q_s8 (int8_t const * ptr)
1583
1594
#[ inline]
1584
1595
#[ target_feature( enable = "neon" ) ]
1585
1596
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "v7" ) ) ]
@@ -1591,7 +1602,6 @@ pub unsafe fn vld1q_s8(addr: *const i8) -> int8x16_t {
1591
1602
}
1592
1603
1593
1604
/// Load multiple single-element structures to one, two, three, or four registers
1594
- // int8x16_t vld1q_u8 (uint8_t const * ptr)
1595
1605
#[ inline]
1596
1606
#[ target_feature( enable = "neon" ) ]
1597
1607
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "v7" ) ) ]
@@ -2284,5 +2294,4 @@ mod tests {
2284
2294
2285
2295
#[ cfg( test) ]
2286
2296
#[ cfg( target_endian = "little" ) ]
2287
- //#[path = "table_lookup_tests.rs"]
2288
2297
mod table_lookup_tests;
0 commit comments