1
Fork 0

Switch to asm! macro and use brk instruction on ARM

This commit is contained in:
Ryan Levick 2020-08-28 11:22:16 +02:00
parent 970e7793bf
commit 8bcc4d6178
2 changed files with 7 additions and 7 deletions

View file

@ -310,13 +310,13 @@ pub fn abort_internal() -> ! {
unsafe {
cfg_if::cfg_if! {
if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
llvm_asm!("int $$0x29" :: "{ecx}"(FAST_FAIL_FATAL_APP_EXIT) ::: volatile);
asm!("int $$0x29", in("ecx") FAST_FAIL_FATAL_APP_EXIT);
crate::intrinsics::unreachable();
} else if #[cfg(target_arch = "arm")] {
llvm_asm!(".inst 0xDEFB" :: "{r0}"(FAST_FAIL_FATAL_APP_EXIT) ::: volatile);
asm!("brk 0xDEFB", in("r0") FAST_FAIL_FATAL_APP_EXIT);
crate::intrinsics::unreachable();
} else if #[cfg(target_arch = "aarch64")] {
llvm_asm!(".inst 0xF003" :: "{x0}"(FAST_FAIL_FATAL_APP_EXIT) ::: volatile);
asm!("brk 0xF003", in("x0") FAST_FAIL_FATAL_APP_EXIT);
crate::intrinsics::unreachable();
}
}