renamed NoReg to Null in common
This commit is contained in:
@@ -69,7 +69,7 @@ pub enum Register {
|
||||
Idr,
|
||||
Mmr,
|
||||
Zero,
|
||||
NoReg,
|
||||
Null, // Invalid - Triggers a fault if accessed
|
||||
|
||||
// system registers - can't be written to by instructions.
|
||||
Mar,
|
||||
@@ -106,7 +106,7 @@ impl Register {
|
||||
|
||||
impl Default for Register {
|
||||
fn default() -> Self {
|
||||
Self::NoReg
|
||||
Self::Null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ impl TryFrom<u8> for Register {
|
||||
0x14 => Self::Idr,
|
||||
0x15 => Self::Mmr,
|
||||
0x16 => Self::Zero,
|
||||
0x17 => Self::NoReg,
|
||||
0x17 => Self::Null,
|
||||
0x18 => Self::Mar,
|
||||
0x19 => Self::Mdr,
|
||||
0x1A => Self::Sts,
|
||||
@@ -183,7 +183,7 @@ impl TryFrom<&str> for Register {
|
||||
"idr" => Ok(Self::Idr),
|
||||
"mmr" => Ok(Self::Mmr),
|
||||
"zero" => Ok(Self::Zero),
|
||||
"null" => Ok(Self::NoReg),
|
||||
"null" => Ok(Self::Null),
|
||||
"pcx" => Ok(Self::Pcx),
|
||||
_ => Err(RegisterParseError::InvalidName(value.to_string())),
|
||||
}
|
||||
@@ -216,7 +216,7 @@ impl std::fmt::Display for Register {
|
||||
Self::Idr => write!(f, "idr"),
|
||||
Self::Mmr => write!(f, "mmr"),
|
||||
Self::Zero => write!(f, "zero"),
|
||||
Self::NoReg => write!(f, "noreg"),
|
||||
Self::Null => write!(f, "null"),
|
||||
Self::Mar => write!(f, "mar"),
|
||||
Self::Mdr => write!(f, "mdr"),
|
||||
Self::Sts => write!(f, "sts"),
|
||||
|
||||
Reference in New Issue
Block a user