(m: &str)
| 18 | |
| 19 | impl BranchKind { |
| 20 | pub fn from_mnemonic(m: &str) -> Option<Self> { |
| 21 | match m { |
| 22 | "beq" => Some(Self::Beq), |
| 23 | "bne" => Some(Self::Bne), |
| 24 | "blt" => Some(Self::Blt), |
| 25 | "bge" => Some(Self::Bge), |
| 26 | "bltu" => Some(Self::Bltu), |
| 27 | "bgeu" => Some(Self::Bgeu), |
| 28 | _ => None, |
| 29 | } |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | /// A single logical assembler token, section-aware and fully typed. |
nothing calls this directly
no outgoing calls
no test coverage detected