diff options
author | iximeow <me@iximeow.net> | 2020-12-06 11:36:52 -0800 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-12-06 11:58:57 -0800 |
commit | f483afc2654391962a821ae41f4a50b484ad9bae (patch) | |
tree | 3ab3d41c1975552b3231225569c6f5bf554a2c7b /src/armv7.rs | |
parent | 9e919c5cccf3b72498505043a93e08b428c356f3 (diff) |
remove "Incomplete" opcode from arm7 non-thumb decoder
Diffstat (limited to 'src/armv7.rs')
-rw-r--r-- | src/armv7.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/armv7.rs b/src/armv7.rs index c7fb6e4..91b65bd 100644 --- a/src/armv7.rs +++ b/src/armv7.rs @@ -175,9 +175,6 @@ impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> ShowContextual<u3 _ => { unreachable!(); } } }, - Opcode::Incomplete(word) => { - write!(out, "incomplete: {:#x}", word) - }, Opcode::STC2L(coproc) => { write!(out, "stc2l p{}", coproc)?; let ops = self.operands.iter(); @@ -331,7 +328,6 @@ impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> ShowContextual<u3 impl <T: fmt::Write, Color: fmt::Display, Y: YaxColors<Color>> Colorize<T, Color, Y> for ConditionedOpcode { fn colorize(&self, colors: &Y, out: &mut T) -> fmt::Result { match self.0 { - Opcode::Incomplete(_) | Opcode::UDF | Opcode::Invalid => { write!(out, "{}", colors.invalid_op(self)) }, Opcode::TBB | @@ -528,7 +524,6 @@ impl Display for Opcode { Opcode::QSUB => { write!(f, "qsub") }, Opcode::QDADD => { write!(f, "qdadd") }, Opcode::QDSUB => { write!(f, "qdsub") }, - Opcode::Incomplete(word) => { write!(f, "incomplete: {:#x}", word) }, Opcode::Invalid => { write!(f, "invalid") }, Opcode::POP => { write!(f, "pop") }, Opcode::PUSH => { write!(f, "push") }, @@ -675,7 +670,6 @@ impl Display for Opcode { #[derive(Debug, Copy, Clone, PartialEq, Eq)] #[allow(non_camel_case_types)] pub enum Opcode { - Incomplete(u32), Invalid, /* * These two don't really have direct encodings, but are for the specific instances @@ -2022,7 +2016,7 @@ impl Decoder<Instruction> for InstDecoder { } else { // op1=0xxxxxxx, "Memory hints, Advanced SIMD instructions, and miscellaneous // instructions on pge A5-215" - inst.opcode = Opcode::Incomplete(word); + return Err(DecodeError::Incomplete); } return Ok(()); } else { @@ -3429,8 +3423,7 @@ impl Decoder<Instruction> for InstDecoder { // coprocessor instructions and supervisor call // page A5-213 // low bit of 0b110 or 0b111 corresponds to high bit of op1 - inst.opcode = Opcode::Incomplete(word); - return Ok(()); + return Err(DecodeError::Incomplete); }, _ => { unreachable!(); } } |