Explicitly look for 'thumb-mode' before using __fastfail on 'arm'
This commit is contained in:
parent
9e2228d2d0
commit
d931e97402
2 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ pub unsafe extern "C" fn __rust_start_panic(_payload: usize) -> u32 {
|
|||
cfg_if::cfg_if! {
|
||||
if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
|
||||
asm!("int $$0x29", in("ecx") FAST_FAIL_FATAL_APP_EXIT);
|
||||
} else if #[cfg(target_arch = "arm")] {
|
||||
} else if #[cfg(all(target_arch = "arm", target_feature = "thumb-mode"))] {
|
||||
asm!(".inst 0xDEFB", in("r0") FAST_FAIL_FATAL_APP_EXIT);
|
||||
} else if #[cfg(target_arch = "aarch64")] {
|
||||
asm!("brk 0xF003", in("x0") FAST_FAIL_FATAL_APP_EXIT);
|
||||
|
|
|
@ -312,7 +312,7 @@ pub fn abort_internal() -> ! {
|
|||
if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
|
||||
asm!("int $$0x29", in("ecx") FAST_FAIL_FATAL_APP_EXIT);
|
||||
crate::intrinsics::unreachable();
|
||||
} else if #[cfg(target_arch = "arm")] {
|
||||
} else if #[cfg(all(target_arch = "arm", target_feature = "thumb-mode"))] {
|
||||
asm!(".inst 0xDEFB", in("r0") FAST_FAIL_FATAL_APP_EXIT);
|
||||
crate::intrinsics::unreachable();
|
||||
} else if #[cfg(target_arch = "aarch64")] {
|
||||
|
|
Loading…
Add table
Reference in a new issue