1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//! Implementations for the MIPS architecture.

use crate::arch::Arch;

pub mod reg;

/// Implements `Arch` for 32-bit MIPS.
#[derive(Eq, PartialEq)]
pub struct Mips;

/// Implements `Arch` for 64-bit MIPS.
#[derive(Eq, PartialEq)]
pub struct Mips64;

impl Arch for Mips {
    type Usize = u32;
    type Registers = reg::MipsCoreRegs<u32>;

    fn target_description_xml() -> Option<&'static str> {
        Some(r#"<target version="1.0"><architecture>mips</architecture></target>"#)
    }
}

impl Arch for Mips64 {
    type Usize = u64;
    type Registers = reg::MipsCoreRegs<u64>;

    fn target_description_xml() -> Option<&'static str> {
        Some(r#"<target version="1.0"><architecture>mips64</architecture></target>"#)
    }
}