typo fixes

This commit is contained in:
Angie 2022-12-18 23:06:03 -03:00
parent 230cb489ad
commit e6a6a691a6

View File

@ -221,27 +221,29 @@ impl Instruction {
}
pub fn get_rt_o32(&self) -> registers_enum::registers::GprO32 {
self.get_rs().try_into().unwrap()
self.get_rt().try_into().unwrap()
}
pub fn get_rt_n32(&self) -> registers_enum::registers::GprN32 {
self.get_rs().try_into().unwrap()
self.get_rt().try_into().unwrap()
}
pub fn get_rd(&self) -> u32 {
if !self.has_operand_alias(operand_type_enum::OperandType::cpu_rd) {
core::panic!();
if !matches!(self.unique_id, instr_id_enum::InstrId::cpu_jalr|instr_id_enum::InstrId::rsp_jalr) {
core::panic!();
}
}
utils::shiftr(self.word, 11, 5)
}
pub fn get_rd_o32(&self) -> registers_enum::registers::GprO32 {
self.get_rs().try_into().unwrap()
self.get_rd().try_into().unwrap()
}
pub fn get_rd_n32(&self) -> registers_enum::registers::GprN32 {
self.get_rs().try_into().unwrap()
self.get_rd().try_into().unwrap()
}
pub fn get_sa(&self) -> u32 {