diff options
Diffstat (limited to 'src/display.rs')
-rw-r--r-- | src/display.rs | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/display.rs b/src/display.rs index ecd9a26..6e1c376 100644 --- a/src/display.rs +++ b/src/display.rs @@ -1,7 +1,7 @@ use core::fmt; use crate::{Instruction, InstructionPacket, Opcode, Operand}; -use crate::{AssignMode, BranchHint, DomainHint}; +use crate::{AssignMode, BranchHint, DomainHint, RawMode}; fn special_display_rules(op: &Opcode) -> bool { *op as u16 & 0x8000 == 0x8000 @@ -80,6 +80,12 @@ impl fmt::Display for Instruction { self.dest.as_ref().unwrap(), self.alt_dest.as_ref().unwrap(), self.opcode, self.sources[0]); } + Opcode::Any8VcmpbEq => { + return write!(f, "{} = {}any8(vcmpb.eq({}, {}))", + self.dest.as_ref().unwrap(), + if self.flags.negated { "!" } else { "" }, + self.sources[0], self.sources[1]); + } _ => { unreachable!("TODO: should be exhaustive for opcodes with special display rules"); } @@ -315,6 +321,12 @@ impl fmt::Display for Instruction { None => {} } + match self.flags.raw_mode { + Some(RawMode::Lo) => { f.write_str(":raw:lo")? }, + Some(RawMode::Hi) => { f.write_str(":raw:hi")? }, + None => {} + } + // DeallocateFrame is shown with `:raw` as a suffix, but after the taken/not-taken hint // same for DeallocReturn if self.opcode == Opcode::AllocFrame || self.opcode == Opcode::DeallocFrame || self.opcode == Opcode::DeallocReturn { @@ -586,6 +598,20 @@ impl fmt::Display for Opcode { Opcode::SfFixupr => { f.write_str("sffixupr") }, Opcode::SfInvsqrta => { f.write_str("sfinvsqrta") }, Opcode::Swiz => { f.write_str("swiz") }, + Opcode::Parity => { f.write_str("parity") }, + Opcode::Tlbmatch => { f.write_str("tlbmatch") }, + Opcode::Boundscheck => { f.write_str("boundscheck") }, + Opcode::Any8VcmpbEq => { f.write_str("any8vcmpbeq") }, + Opcode::Vmux => { f.write_str("vmux") }, + Opcode::VcmpwEq => { f.write_str("vcmpw.eq") }, + Opcode::VcmpwGt => { f.write_str("vcmpw.gt") }, + Opcode::VcmpwGtu => { f.write_str("vcmpw.gtu") }, + Opcode::VcmphEq => { f.write_str("vcmph.eq") }, + Opcode::VcmphGt => { f.write_str("vcmph.gt") }, + Opcode::VcmphGtu => { f.write_str("vcmph.gtu") }, + Opcode::VcmpbEq => { f.write_str("vcmpb.eq") }, + Opcode::VcmpbGt => { f.write_str("vcmpb.gt") }, + Opcode::VcmpbGtu => { f.write_str("vcmpb.gtu") }, } } } |