Make rust-intrinsic ABI unwindable
Stick `#[rustc_nounwind]` to all except `const_eval_select` to undo the change for all other intrinsics.
This commit is contained in:
parent
9be9b5e09a
commit
229b0a0fdc
@ -1226,10 +1226,11 @@ pub fn fn_can_unwind(tcx: TyCtxt<'_>, fn_def_id: Option<DefId>, abi: SpecAbi) ->
|
|||||||
| AvrNonBlockingInterrupt
|
| AvrNonBlockingInterrupt
|
||||||
| CCmseNonSecureCall
|
| CCmseNonSecureCall
|
||||||
| Wasm
|
| Wasm
|
||||||
| RustIntrinsic
|
|
||||||
| PlatformIntrinsic
|
| PlatformIntrinsic
|
||||||
| Unadjusted => false,
|
| Unadjusted => false,
|
||||||
Rust | RustCall | RustCold => tcx.sess.panic_strategy() == PanicStrategy::Unwind,
|
Rust | RustCall | RustCold | RustIntrinsic => {
|
||||||
|
tcx.sess.panic_strategy() == PanicStrategy::Unwind
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,12 +615,15 @@ impl<'f> Drop for VaListImpl<'f> {
|
|||||||
extern "rust-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
/// Destroy the arglist `ap` after initialization with `va_start` or
|
/// Destroy the arglist `ap` after initialization with `va_start` or
|
||||||
/// `va_copy`.
|
/// `va_copy`.
|
||||||
|
#[rustc_nounwind]
|
||||||
fn va_end(ap: &mut VaListImpl<'_>);
|
fn va_end(ap: &mut VaListImpl<'_>);
|
||||||
|
|
||||||
/// Copies the current location of arglist `src` to the arglist `dst`.
|
/// Copies the current location of arglist `src` to the arglist `dst`.
|
||||||
|
#[rustc_nounwind]
|
||||||
fn va_copy<'f>(dest: *mut VaListImpl<'f>, src: &VaListImpl<'f>);
|
fn va_copy<'f>(dest: *mut VaListImpl<'f>, src: &VaListImpl<'f>);
|
||||||
|
|
||||||
/// Loads an argument of type `T` from the `va_list` `ap` and increment the
|
/// Loads an argument of type `T` from the `va_list` `ap` and increment the
|
||||||
/// argument `ap` points to.
|
/// argument `ap` points to.
|
||||||
|
#[rustc_nounwind]
|
||||||
fn va_arg<T: sealed_trait::VaArgSafe>(ap: &mut VaListImpl<'_>) -> T;
|
fn va_arg<T: sealed_trait::VaArgSafe>(ap: &mut VaListImpl<'_>) -> T;
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1371,6 +1371,7 @@ pub const unsafe fn write<T>(dst: *mut T, src: T) {
|
|||||||
// as `intrinsics::copy_nonoverlapping` is a wrapper function.
|
// as `intrinsics::copy_nonoverlapping` is a wrapper function.
|
||||||
extern "rust-intrinsic" {
|
extern "rust-intrinsic" {
|
||||||
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
|
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.63.0")]
|
||||||
|
#[rustc_nounwind]
|
||||||
fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
|
fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user