Remove duplication of map_reg; fixes #1245
Both cranelift-codegen and wasmtime-debug need to map Cranelift registers to Gimli registers. Previously both crates had an almost-identical `map_reg` implementation. This change: - removes the wasmtime-debug implementation - improves the cranelift-codegen implementation with custom errors - exposes map_reg in `cranelift_codegen::isa::fde::map_reg` and subsequently `wasmtime_environ::isa::fde::map_reg`
This commit is contained in:
@@ -74,6 +74,12 @@ mod riscv;
|
||||
#[cfg(feature = "x86")]
|
||||
mod x86;
|
||||
|
||||
#[cfg(all(feature = "x86", feature = "unwind"))]
|
||||
/// Expose the register-mapping functionality necessary for exception handling, debug, etc.
|
||||
pub mod fde {
|
||||
pub use super::x86::map_reg;
|
||||
}
|
||||
|
||||
#[cfg(feature = "arm32")]
|
||||
mod arm32;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user