Skip to content

Commit cd1785b

Browse files
committed
PR feedback
1 parent 00d6c50 commit cd1785b

File tree

19 files changed

+14
-85
lines changed

19 files changed

+14
-85
lines changed

Cargo.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22
resolver = "1"
33
members = [
44
"crates/*",
5-
"examples"
6-
"crates/stdarch-verify",
7-
"crates/core_arch",
8-
"crates/std_detect",
9-
"crates/stdarch-gen-loongarch",
10-
"crates/stdarch-gen2",
11-
"crates/intrinsic-test",
12-
"examples/"
135
]
146
exclude = [
157
"crates/wasm-assert-instr-tests"

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

Lines changed: 7 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -11,89 +11,33 @@ use crate::{core_arch::simd::*, hint::unreachable_unchecked, intrinsics::simd::*
1111
#[cfg(test)]
1212
use stdarch_test::assert_instr;
1313

14-
#[unstable(feature = "stdarch_internal", issue = "none")]
1514
pub(crate) trait AsUnsigned {
1615
type Unsigned: ?Sized;
17-
unsafe fn as_unsigned(self) -> Self::Unsigned;
16+
fn as_unsigned(self) -> Self::Unsigned;
1817
}
1918

20-
#[unstable(feature = "stdarch_internal", issue = "none")]
2119
pub(crate) trait AsSigned {
2220
type Signed: ?Sized;
23-
unsafe fn as_signed(self) -> Self::Signed;
24-
}
25-
26-
macro_rules! impl_sign_conversions {
27-
($(($signed:ty, $unsigned:ty))*) => ($(
28-
#[cfg_attr(
29-
not(target_arch = "arm"),
30-
stable(feature = "neon_intrinsics", since = "1.59.0")
31-
)]
32-
#[cfg_attr(
33-
target_arch = "arm",
34-
unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800")
35-
)]
36-
impl AsUnsigned for $signed {
37-
type Unsigned = $unsigned;
38-
39-
#[inline]
40-
unsafe fn as_unsigned(self) -> $unsigned {
41-
crate::mem::transmute(self)
42-
}
43-
}
44-
45-
#[cfg_attr(
46-
not(target_arch = "arm"),
47-
stable(feature = "neon_intrinsics", since = "1.59.0")
48-
)]
49-
#[cfg_attr(
50-
target_arch = "arm",
51-
unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800")
52-
)]
53-
impl AsSigned for $unsigned {
54-
type Signed = $signed;
55-
56-
#[inline]
57-
unsafe fn as_signed(self) -> $signed {
58-
crate::mem::transmute(self)
59-
}
60-
}
61-
)*)
21+
fn as_signed(self) -> Self::Signed;
6222
}
6323

6424
macro_rules! impl_sign_conversions_neon {
6525
($(($signed:ty, $unsigned:ty))*) => ($(
66-
#[cfg_attr(
67-
not(target_arch = "arm"),
68-
stable(feature = "neon_intrinsics", since = "1.59.0")
69-
)]
70-
#[cfg_attr(
71-
target_arch = "arm",
72-
unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800")
73-
)]
7426
impl AsUnsigned for $signed {
7527
type Unsigned = $unsigned;
7628

7729
#[inline]
78-
unsafe fn as_unsigned(self) -> $unsigned {
79-
crate::mem::transmute(self)
30+
fn as_unsigned(self) -> $unsigned {
31+
unsafe { transmute(self) }
8032
}
8133
}
8234

83-
#[cfg_attr(
84-
not(target_arch = "arm"),
85-
stable(feature = "neon_intrinsics", since = "1.59.0")
86-
)]
87-
#[cfg_attr(
88-
target_arch = "arm",
89-
unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800")
90-
)]
9135
impl AsSigned for $unsigned {
9236
type Signed = $signed;
9337

9438
#[inline]
95-
unsafe fn as_signed(self) -> $signed {
96-
crate::mem::transmute(self)
39+
fn as_signed(self) -> $signed {
40+
unsafe { transmute(self) }
9741
}
9842
}
9943
)*)
@@ -1121,7 +1065,7 @@ pub struct poly64x2x4_t(
11211065
pub poly64x2_t,
11221066
);
11231067

1124-
impl_sign_conversions! {
1068+
impl_sign_conversions_neon! {
11251069
(i8, u8)
11261070
(i16, u16)
11271071
(i32, u32)
@@ -1150,9 +1094,6 @@ impl_sign_conversions! {
11501094
(uint64x2_t, int64x2_t)
11511095
(uint8x16_t, int8x16_t)
11521096
(uint8x8_t, int8x8_t)
1153-
}
1154-
1155-
impl_sign_conversions_neon! {
11561097
(int16x4x2_t, uint16x4x2_t)
11571098
(int16x4x3_t, uint16x4x3_t)
11581099
(int16x4x4_t, uint16x4x4_t)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)