diff options
author | iximeow <me@iximeow.net> | 2020-03-15 13:19:41 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-03-15 13:19:41 -0700 |
commit | 64085b1c4ca048b78f43a3eafdc1f3fdf6bd696b (patch) | |
tree | 304d99e06930e56d86d0c513ff19fdbefd1b6cac | |
parent | 0eef8df038ff3a83f31aeeb3c58d5bf652c400ec (diff) |
clean up operands some
-rw-r--r-- | src/armv7.rs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/armv7.rs b/src/armv7.rs index 4b8c608..3fe4df6 100644 --- a/src/armv7.rs +++ b/src/armv7.rs @@ -953,7 +953,6 @@ pub enum Operand { RegWBack(Reg, bool), RegList(u16), RegDeref(Reg), - RegDisp(Reg, i16), RegShift(RegShift), RegDerefPostindexRegShift(Reg, RegShift, bool, bool), // add/sub, wback RegDerefPreindexRegShift(Reg, RegShift, bool, bool), // add/sub, wback @@ -968,12 +967,12 @@ pub enum Operand { Coprocessor(u8), CoprocOption(u8), CReg(CReg), - APSR, - CPSR, - SPSR, BankedReg(Bank, Reg), BankedSPSR(Bank), StatusRegMask(StatusRegMask), + APSR, + SPSR, + CPSR, Nothing, } @@ -1022,9 +1021,6 @@ impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> Colorize<T, Color Operand::RegDeref(reg) => { write!(f, "[{}]", reg_name_colorize(*reg, colors)) } - Operand::RegDisp(reg, imm) => { - write!(f, "[{} + {:#x}]", reg_name_colorize(*reg, colors), imm) - } Operand::RegShift(shift) => { format_shift(f, *shift, colors) } @@ -1085,9 +1081,9 @@ impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> Colorize<T, Color Operand::StatusRegMask(mask) => { write!(f, "{}", mask) } - Operand::APSR => { write!(f, "apsr") }, - Operand::CPSR => { write!(f, "cpsr") }, - Operand::SPSR => { write!(f, "spsr") }, + Operand::APSR => write!(f, "apsr"), + Operand::SPSR => write!(f, "spsr"), + Operand::CPSR => write!(f, "cpsr"), Operand::Nothing => { panic!("tried to print Nothing operand") }, } } |