Skip to content

Commit 7480389

Browse files
committed
Auto merge of rust-lang#100911 - tmiasko:update-stdarch, r=Amanieu
Update stdarch submodule Changes from stdarch: * Fix links in documentation of cmpxchg16b * Use load intrinsic and loop for intrinsic-test programs. Add --release flag back to intrinsic-test programs. * Properly fix vext intrinsic tests * Replace some calls to `pointer::offset` with `add` and `sub` * Allow internal use of stdsimd from detect_feature * fix target name in contributing.md * Tweak constant for ARM vext instruction tests * Use `llvm.ppc.altivec.lvx` intrinsic for `vec_ld` * Adding doc links for arm neon intrinsics * Adding doc links for arm crypto and aes intrinsics * Remove instruction tests for `__mmask*` intrinsics * Update ubuntu 21.10 docker containers to 22.04 * Adding documentation links for arm crc32 intrinsics * Remove restrictions on compare-exchange memory ordering. * Fix a typo in the document. * Allow mapping a runtime feature to a set of target_features * Update atomic intrinsics * Fully qualify recursive macro calls * Ensure the neon vector aggregates like `float32x4x4_t` are `#[repr(C)]` * Remove useless conditional compilation * Fix ARM vbsl* NEON intrinsics r? `@Amanieu`
2 parents 4d45b07 + 5f4d23d commit 7480389

File tree

3 files changed

+10
-28
lines changed

3 files changed

+10
-28
lines changed

library/core/src/intrinsics.rs

-21
Original file line numberDiff line numberDiff line change
@@ -737,28 +737,7 @@ extern "rust-intrinsic" {
737737
/// [`atomic::compiler_fence`] by passing [`Ordering::AcqRel`]
738738
/// as the `order`.
739739
pub fn atomic_singlethreadfence_acqrel();
740-
}
741-
742-
// These have been renamed.
743-
//
744-
// These are the aliases for the old names.
745-
// To be removed when stdarch and panic_unwind have been updated.
746-
mod atomics {
747-
pub use super::atomic_cxchg_acqrel_acquire as atomic_cxchg_acqrel;
748-
pub use super::atomic_cxchg_acqrel_relaxed as atomic_cxchg_acqrel_failrelaxed;
749-
pub use super::atomic_cxchg_acquire_acquire as atomic_cxchg_acq;
750-
pub use super::atomic_cxchg_acquire_relaxed as atomic_cxchg_acq_failrelaxed;
751-
pub use super::atomic_cxchg_relaxed_relaxed as atomic_cxchg_relaxed;
752-
pub use super::atomic_cxchg_release_relaxed as atomic_cxchg_rel;
753-
pub use super::atomic_cxchg_seqcst_acquire as atomic_cxchg_failacq;
754-
pub use super::atomic_cxchg_seqcst_relaxed as atomic_cxchg_failrelaxed;
755-
pub use super::atomic_cxchg_seqcst_seqcst as atomic_cxchg;
756-
pub use super::atomic_store_seqcst as atomic_store;
757-
}
758740

759-
pub use atomics::*;
760-
761-
extern "rust-intrinsic" {
762741
/// The `prefetch` intrinsic is a hint to the code generator to insert a prefetch instruction
763742
/// if supported; otherwise, it is a no-op.
764743
/// Prefetches have no effect on the behavior of the program but can change its performance

library/panic_unwind/src/seh.rs

+9-6
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ cfg_if::cfg_if! {
256256
}
257257

258258
pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
259-
use core::intrinsics::atomic_store;
259+
use core::intrinsics::atomic_store_seqcst;
260260

261261
// _CxxThrowException executes entirely on this stack frame, so there's no
262262
// need to otherwise transfer `data` to the heap. We just pass a stack
@@ -288,20 +288,23 @@ pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
288288
//
289289
// In any case, we basically need to do something like this until we can
290290
// express more operations in statics (and we may never be able to).
291-
atomic_store(&mut THROW_INFO.pmfnUnwind as *mut _ as *mut u32, ptr!(exception_cleanup) as u32);
292-
atomic_store(
291+
atomic_store_seqcst(
292+
&mut THROW_INFO.pmfnUnwind as *mut _ as *mut u32,
293+
ptr!(exception_cleanup) as u32,
294+
);
295+
atomic_store_seqcst(
293296
&mut THROW_INFO.pCatchableTypeArray as *mut _ as *mut u32,
294297
ptr!(&CATCHABLE_TYPE_ARRAY as *const _) as u32,
295298
);
296-
atomic_store(
299+
atomic_store_seqcst(
297300
&mut CATCHABLE_TYPE_ARRAY.arrayOfCatchableTypes[0] as *mut _ as *mut u32,
298301
ptr!(&CATCHABLE_TYPE as *const _) as u32,
299302
);
300-
atomic_store(
303+
atomic_store_seqcst(
301304
&mut CATCHABLE_TYPE.pType as *mut _ as *mut u32,
302305
ptr!(&TYPE_DESCRIPTOR as *const _) as u32,
303306
);
304-
atomic_store(
307+
atomic_store_seqcst(
305308
&mut CATCHABLE_TYPE.copyFunction as *mut _ as *mut u32,
306309
ptr!(exception_copy) as u32,
307310
);

0 commit comments

Comments
 (0)