Skip to main content

miri/shims/
mod.rs

1#![warn(clippy::arithmetic_side_effects)]
2
3mod aarch64;
4mod alloc;
5mod backtrace;
6mod files;
7mod loongarch;
8mod math;
9#[cfg(all(feature = "native-lib", unix))]
10pub mod native_lib;
11mod unix;
12mod windows;
13mod x86;
14
15pub mod env;
16pub mod extern_static;
17pub mod foreign_items;
18pub mod global_ctor;
19pub mod io_error;
20pub mod os_str;
21pub mod panic;
22pub mod readiness;
23pub mod sig;
24pub mod time;
25pub mod tls;
26pub mod unwind;
27
28pub use self::files::{FdId, FdTable, FileDescription, FileDescriptionRef, WeakFileDescriptionRef};
29#[cfg(all(feature = "native-lib", unix))]
30pub use self::native_lib::trace::{init_sv, register_retcode_sv};
31pub use self::unix::DirTable;
32
33/// What needs to be done after emulating an item (a shim or an intrinsic) is done.
34pub enum EmulateItemResult {
35    /// The caller is expected to jump to the return block.
36    NeedsReturn,
37    /// The caller is expected to jump to the unwind block.
38    NeedsUnwind,
39    /// Jumping to the next block has already been taken care of.
40    AlreadyJumped,
41    /// The item is not supported.
42    NotSupported,
43}