Preliminary SuperH support (#186)

* Preliminary SuperH support

* fixes

* clippy

* clippy
This commit is contained in:
sozud
2025-04-17 13:20:30 -07:00
committed by GitHub
parent b40fae5140
commit 644d4762f0
5 changed files with 2026 additions and 3 deletions

View File

@@ -25,6 +25,8 @@ pub mod arm64;
pub mod mips;
#[cfg(feature = "ppc")]
pub mod ppc;
#[cfg(feature = "superh")]
pub mod superh;
#[cfg(feature = "x86")]
pub mod x86;
@@ -313,6 +315,8 @@ pub fn new_arch(object: &object::File) -> Result<Box<dyn Arch>> {
object::Architecture::Arm => Box::new(arm::ArchArm::new(object)?),
#[cfg(feature = "arm64")]
object::Architecture::Aarch64 => Box::new(arm64::ArchArm64::new(object)?),
#[cfg(feature = "superh")]
object::Architecture::SuperH => Box::new(superh::ArchSuperH::new(object)?),
arch => bail!("Unsupported architecture: {arch:?}"),
})
}