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 sig;
23pub mod time;
24pub mod tls;
25pub mod unwind;
26
27pub use self::files::{FdId, FdTable, FileDescription, FileDescriptionRef, WeakFileDescriptionRef};
28#[cfg(all(feature = "native-lib", unix))]
29pub use self::native_lib::trace::{init_sv, register_retcode_sv};
30pub use self::unix::{DirTable, Epoll, EpollEvalContextExt, EpollInterestTable};
31
32/// What needs to be done after emulating an item (a shim or an intrinsic) is done.
33pub enum EmulateItemResult {
34    /// The caller is expected to jump to the return block.
35    NeedsReturn,
36    /// The caller is expected to jump to the unwind block.
37    NeedsUnwind,
38    /// Jumping to the next block has already been taken care of.
39    AlreadyJumped,
40    /// The item is not supported.
41    NotSupported,
42}