Skip to content

Commit 007e610

Browse files
authored
Merge pull request probe-rs#7 from diondokter/riscv-support
Add risc-v support
2 parents 8af3d68 + c8e3fd4 commit 007e610

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@
1515
#[cfg(all(not(test), feature = "panic-handler"))]
1616
#[panic_handler]
1717
fn panic(_info: &core::panic::PanicInfo) -> ! {
18+
#[cfg(not(any(target_arch = "arm", target_arch = "riscv32")))]
19+
compile_error!("Panic handler can only be compiled for arm and riscv32");
20+
1821
unsafe {
22+
#[cfg(target_arch = "arm")]
1923
core::arch::asm!("udf #0");
24+
#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]
25+
core::arch::asm!("UNIMP");
2026
core::hint::unreachable_unchecked();
2127
}
2228
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy