Skip to content

Commit 49d647b

Browse files
committed
Fix __crc32d and __crc32cd not showing up in standard library docs
1 parent 2e8df3c commit 49d647b

File tree

1 file changed

+6
-34
lines changed
  • crates/core_arch/src/arm_shared

1 file changed

+6
-34
lines changed

crates/core_arch/src/arm_shared/crc.rs

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,9 @@ pub unsafe fn __crc32cw(crc: u32, data: u32) -> u32 {
170170
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/__crc32d)
171171
#[inline]
172172
#[target_feature(enable = "crc")]
173-
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec"))]
173+
#[cfg(not(target_arch = "arm"))]
174174
#[cfg_attr(test, assert_instr(crc32x))]
175-
#[cfg_attr(
176-
target_arch = "arm",
177-
unstable(feature = "stdarch_aarch32_crc32", issue = "125085")
178-
)]
179-
#[cfg_attr(
180-
not(target_arch = "arm"),
181-
stable(feature = "stdarch_aarch64_crc32", since = "1.80.0")
182-
)]
175+
#[stable(feature = "stdarch_aarch64_crc32", since = "1.80.0")]
183176
pub unsafe fn __crc32d(crc: u32, data: u64) -> u32 {
184177
crc32x_(crc, data)
185178
}
@@ -191,14 +184,7 @@ pub unsafe fn __crc32d(crc: u32, data: u64) -> u32 {
191184
#[target_feature(enable = "crc")]
192185
#[cfg(target_arch = "arm")]
193186
#[cfg_attr(test, assert_instr(crc32w))]
194-
#[cfg_attr(
195-
target_arch = "arm",
196-
unstable(feature = "stdarch_aarch32_crc32", issue = "125085")
197-
)]
198-
#[cfg_attr(
199-
not(target_arch = "arm"),
200-
stable(feature = "stdarch_aarch64_crc32", since = "1.80.0")
201-
)]
187+
#[unstable(feature = "stdarch_aarch32_crc32", issue = "125085")]
202188
pub unsafe fn __crc32d(crc: u32, data: u64) -> u32 {
203189
// On 32-bit ARM this intrinsic emits a chain of two `crc32_w` instructions
204190
// and truncates the data to 32 bits in both clang and gcc
@@ -213,16 +199,9 @@ pub unsafe fn __crc32d(crc: u32, data: u64) -> u32 {
213199
/// [Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/__crc32cd)
214200
#[inline]
215201
#[target_feature(enable = "crc")]
216-
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec"))]
202+
#[cfg(not(target_arch = "arm"))]
217203
#[cfg_attr(test, assert_instr(crc32cx))]
218-
#[cfg_attr(
219-
target_arch = "arm",
220-
unstable(feature = "stdarch_aarch32_crc32", issue = "125085")
221-
)]
222-
#[cfg_attr(
223-
not(target_arch = "arm"),
224-
stable(feature = "stdarch_aarch64_crc32", since = "1.80.0")
225-
)]
204+
#[stable(feature = "stdarch_aarch64_crc32", since = "1.80.0")]
226205
pub unsafe fn __crc32cd(crc: u32, data: u64) -> u32 {
227206
crc32cx_(crc, data)
228207
}
@@ -234,14 +213,7 @@ pub unsafe fn __crc32cd(crc: u32, data: u64) -> u32 {
234213
#[target_feature(enable = "crc")]
235214
#[cfg(target_arch = "arm")]
236215
#[cfg_attr(test, assert_instr(crc32cw))]
237-
#[cfg_attr(
238-
target_arch = "arm",
239-
unstable(feature = "stdarch_aarch32_crc32", issue = "125085")
240-
)]
241-
#[cfg_attr(
242-
not(target_arch = "arm"),
243-
stable(feature = "stdarch_aarch64_crc32", since = "1.80.0")
244-
)]
216+
#[unstable(feature = "stdarch_aarch32_crc32", issue = "125085")]
245217
pub unsafe fn __crc32cd(crc: u32, data: u64) -> u32 {
246218
// On 32-bit ARM this intrinsic emits a chain of two `crc32_cw` instructions
247219
// and truncates the data to 32 bits in both clang and gcc

0 commit comments

Comments
 (0)