runtime: handle traps on Windows x32. (#1740)
This commit is contained in:
@@ -2,6 +2,9 @@ cfg_if::cfg_if! {
|
||||
if #[cfg(all(windows, target_arch = "x86_64"))] {
|
||||
mod winx64;
|
||||
pub use self::winx64::*;
|
||||
} else if #[cfg(all(windows, target_arch = "x86"))] {
|
||||
mod winx32;
|
||||
pub use self::winx32::*;
|
||||
} else if #[cfg(unix)] {
|
||||
mod systemv;
|
||||
pub use self::systemv::*;
|
||||
|
||||
20
crates/jit/src/unwind/winx32.rs
Normal file
20
crates/jit/src/unwind/winx32.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
//! Stub unwind registry for Windows x32.
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use cranelift_codegen::isa::{unwind::UnwindInfo, TargetIsa};
|
||||
|
||||
pub struct UnwindRegistry {}
|
||||
|
||||
impl UnwindRegistry {
|
||||
pub fn new(_base_address: usize) -> Self {
|
||||
Self {}
|
||||
}
|
||||
|
||||
pub fn register(&mut self, _func_start: u32, _func_len: u32, _info: &UnwindInfo) -> Result<()> {
|
||||
bail!("winx32 has no unwind registry")
|
||||
}
|
||||
|
||||
pub fn publish(&mut self, _isa: &dyn TargetIsa) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user